|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sdedit.diagram.Diagram
public final class Diagram
This class encapsulates the data for and the process of the generation of a sequence diagram. That process consists - roughly spoken - of these steps:
| Field Summary | |
|---|---|
int |
arrowSize
|
int |
mainLifelineWidth
|
int |
messageLabelSpace
|
int |
messagePadding
|
boolean |
returnArrowVisible
|
int |
subLifelineWidth
|
Color[] |
threadColors
|
| Fields inherited from interface net.sf.sdedit.Constants |
|---|
ACTIVE_LIFELINE_COLOR, ANTI_ALIAS, dashed, DEFAULT_CODE_FONT, DEFAULT_CURSOR, DEFAULT_ENCODING_SCHEME, dotted, emptyStroke, GLOBAL_CONF_FILE, HAND_CURSOR, MOVE_CURSOR, SAVE_AS_FILE_PROPERTY, SAVE_AS_TYPE_PROPERTY, solid, TEST_FREEHEP_CLASSNAME, thick, thick_dashed, THREAD_COLORS |
| Constructor Summary | |
|---|---|
Diagram(Configuration configuration,
DiagramDataProvider provider,
PaintDevice paintDevice)
Creates a new diagram that is to be generated based on the data delivered by the given DiagramDataProvider. |
|
| Method Summary | |
|---|---|
void |
associateLifeline(String lifelineName,
String mnemonic,
Lifeline lifeline)
|
void |
associateMessage(int number,
Message msg)
|
void |
clearMnemonic(Lifeline lifeline)
|
void |
extendLifelines(int amount)
|
void |
finish()
All pending answers are sent back to the callers, all lifelines become inactive. |
void |
generate()
Generates the diagram, based on the data of the DiagramDataProvider passed to the constructor. |
Collection<Lifeline> |
getAllLifelines()
Returns a collection of all lifelines, whether visible or not, and whether already destroyed or not. |
int |
getCallerThread()
|
Configuration |
getConfiguration()
Returns the diagram configuration |
DiagramDataProvider |
getDataProvider()
Returns the text handler that reads the text line by line and creates objects and message data from them. |
Drawable |
getDrawableForState(Object state)
|
FragmentManager |
getFragmentManager()
|
Lifeline |
getLifeline(String name)
|
Lifeline |
getLifelineAt(int position)
|
Lifeline |
getLifelineByMnemonic(String lifelineName,
String mnemonic)
|
Collection<Lifeline> |
getLifelines()
Returns a collection of the (not yet destroyed) lifelines appearing in the diagram. |
int |
getNextFreeNoteNumber()
|
int |
getNumberOfLifelines()
|
int |
getNumberOfThreads()
|
PaintDevice |
getPaintDevice()
|
Object |
getStateForDrawable(Drawable drawable)
Returns the state, represented by an Object, the DiagramDataProvider used by this Diagram was in when the data from which the given Drawable object has been created, was read. |
int |
getVerticalPosition()
|
boolean |
isFinished()
|
boolean |
isThreaded()
|
void |
removeLifeline(String name)
Removes a lifeline, denoted by its name, from the diagram, including all of its sub lifelines. |
void |
sendAnswer(Message answer)
|
void |
sendAnswer(Message answer,
boolean removeFromStack)
|
void |
setCallerThread(int callerThread)
|
void |
toggleWaitingStatus(int thread)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final int arrowSize
public final int messagePadding
public final int subLifelineWidth
public final int mainLifelineWidth
public final int messageLabelSpace
public final boolean returnArrowVisible
public final Color[] threadColors
| Constructor Detail |
|---|
public Diagram(Configuration configuration,
DiagramDataProvider provider,
PaintDevice paintDevice)
configuration - the configuration of the diagramprovider - for reading the object and message specificationspaintDevice - for storing and drawing the boxes, arrows etc.| Method Detail |
|---|
public void generate()
throws SemanticError,
SyntaxError
SyntaxError - if a message or object specification is syntactically wrong
SemanticError - if a message or object specification is semantically wrongpublic final boolean isFinished()
public int getNextFreeNoteNumber()
public FragmentManager getFragmentManager()
public Object getStateForDrawable(Drawable drawable)
drawable - a drawable corresponding to some data
public Drawable getDrawableForState(Object state)
public final void extendLifelines(int amount)
public boolean isThreaded()
public int getCallerThread()
public void setCallerThread(int callerThread)
public PaintDevice getPaintDevice()
public DiagramDataProvider getDataProvider()
public Configuration getConfiguration()
public Collection<Lifeline> getLifelines()
public Collection<Lifeline> getAllLifelines()
public void removeLifeline(String name)
name - the name of the object of which the lifeline is to be removedpublic void sendAnswer(Message answer)
public void sendAnswer(Message answer,
boolean removeFromStack)
public void finish()
public Lifeline getLifelineAt(int position)
public Lifeline getLifeline(String name)
public int getNumberOfLifelines()
public int getVerticalPosition()
public int getNumberOfThreads()
public Lifeline getLifelineByMnemonic(String lifelineName,
String mnemonic)
public void associateLifeline(String lifelineName,
String mnemonic,
Lifeline lifeline)
throws SemanticError
SemanticError
public void associateMessage(int number,
Message msg)
public void clearMnemonic(Lifeline lifeline)
public void toggleWaitingStatus(int thread)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||