|
TPTP 4.1.0 Platform Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.hyades.uml2sd.ui.core.GraphNode
org.eclipse.hyades.uml2sd.ui.core.Lifeline
Lifeline is the UML2 lifeline graphical representation.
Each lifeline owns a set of event occurrences. An event occurrence is the base element in UML2
to set an event in a sequence diagram.
Event occurence define the drawing order of graph node along a lifeline.
In this lifeline implementation, event occurrences are just integer index. The event occurrences
with the same value on different lifelines will correspond the same y corrdinate value.
| Field Summary | |
|---|---|
protected int |
category
|
protected int |
eventOccurrence
The current event occurrence created in the lifeline |
protected boolean |
hasTime
|
protected int |
indexInFrame
The lifeline position in the containing frame |
static java.lang.String |
LIFELINE_TAG
|
| Fields inherited from class org.eclipse.hyades.uml2sd.ui.core.GraphNode |
|---|
bnodes, bSort, endEventOccurrence, fnodes, fSort, hasChilds, indexes, nodes, prefId, startEventOccurrence |
| Constructor Summary | |
|---|---|
Lifeline()
|
|
| Method Summary | |
|---|---|
void |
addExecution(BasicExecutionOccurrence exec)
Adds the execution occurence given in paramater to the lifeline. A Execution Occurence is never drawn in the frame intead it is added to a lifeline |
boolean |
contains(int _x,
int _y)
Returns true if the graph node contains the point given in parameter, return false otherwise. |
void |
draw(IGC context)
Draws the graph node in the given context |
void |
draw(IGC context,
int x,
int y)
Force the lifeline to be drawn at the given coordinate |
protected void |
drawName(IGC context)
|
java.lang.String |
getArrayId()
Return the node type for all class instances. |
int |
getEventOccurrence()
Returns the last created event occurrence along the lifeline. |
int |
getExecOccurrenceDrawIndex()
Returns the index of the first visible Execution Occurrence in the execution occurrence array. Execution Occurrences are Y ordered in this array |
java.util.List |
getExecutions()
Returns the list of execution occurence on this lifeline |
protected Frame |
getFrame()
Returns the frame which this lifeline is drawn |
int |
getHeight()
Returns the graph node height |
int |
getIndex()
Returns the lifeline position in de the containing frame |
int |
getNewEventOccurrence()
Creates a new event occurrence along the lifeline. |
GraphNode |
getNodeAt(int x,
int y)
Returns the graph node which contains the point given in parameter WARNING: Only graph nodes in the current visible area can be returned |
java.lang.String |
getToolTipText()
Returns the tooltip text for the lifeline It is the combinaison between the categorie name(if any) and the lifeline name |
int |
getWidth()
Returns the graph node width |
int |
getX()
Returns the x coordinate of the graph node |
int |
getY()
Returns the y coordinate of the graph node |
boolean |
hasTimeInfo()
|
void |
highlightExecOccurrenceRegion(IGC context,
int startEvent,
int nbEvent,
IColor color)
Draws the select execution occurence region using the given color |
boolean |
isVisible(int vx,
int vy,
int vwidth,
int vheight)
Returns the lifeline visibility for the given visible area |
boolean |
positiveDistanceToPoint(int x,
int y)
Return true if the distance from the GraphNode to the given point is positif |
void |
setCategory(int arrayIndex)
Set the lifeline categorie for this lifeline. |
void |
setCurrentEventOccurrence(int eventOcc)
Set the lifeline event occurrence to the value given in parameter This only change the current event occurrence, greater event created on this lifeline are still valid and usable. |
protected void |
setFrame(Frame parentFrame)
Set the frame on which this lifeline must be drawn |
protected void |
setIndex(int index)
Set the lifeline position index in the containing frame |
protected void |
setTimeInfo(boolean value)
|
| Methods inherited from class org.eclipse.hyades.uml2sd.ui.core.GraphNode |
|---|
addNode, contains, drawChildsNodes, drawFocus, getBackComparator, getComparator, getEndOccurrence, getName, getNodeFromListAt, getNodeList, getStartOccurrence, hasFocus, isSameAs, isSelected, resetIndex, setFocused, setName, setSelected, updateIndex |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int indexInFrame
protected int eventOccurrence
public static final java.lang.String LIFELINE_TAG
protected int category
protected boolean hasTime
| Constructor Detail |
public Lifeline()
| Method Detail |
public int getX()
GraphNode
getX in class GraphNodepublic int getY()
GraphNode
getY in class GraphNodepublic int getWidth()
GraphNode
getWidth in class GraphNodepublic int getHeight()
GraphNode
getHeight in class GraphNodepublic void setCategory(int arrayIndex)
arrayIndex - the index of the categorie to useFrame.setLifelineCategories(LifelineCategories[])public java.lang.String getToolTipText()
public int getExecOccurrenceDrawIndex()
protected void setFrame(Frame parentFrame)
parentFrame - protected Frame getFrame()
protected void setIndex(int index)
index - the lifeline X positionpublic int getIndex()
public void setCurrentEventOccurrence(int eventOcc)
public int getEventOccurrence()
public int getNewEventOccurrence()
public void addExecution(BasicExecutionOccurrence exec)
exec - the execution occurence to addprotected void setTimeInfo(boolean value)
public boolean hasTimeInfo()
public java.util.List getExecutions()
public boolean contains(int _x,
int _y)
GraphNode
contains in class GraphNode_x - the x coordinate of the point to test containment
public boolean isVisible(int vx,
int vy,
int vwidth,
int vheight)
isVisible in class GraphNodevx - vy - vwidth - vheight -
protected void drawName(IGC context)
public void draw(IGC context,
int x,
int y)
context - - the context to draw into
public void highlightExecOccurrenceRegion(IGC context,
int startEvent,
int nbEvent,
IColor color)
context - the graphical contextstartEvent - the region startnbEvent - the region hightcolor - the color to usepublic void draw(IGC context)
GraphNode
draw in class GraphNodecontext - the graphical context to draw inpublic java.lang.String getArrayId()
GraphNode
getArrayId in class GraphNode
public boolean positiveDistanceToPoint(int x,
int y)
GraphNode
positiveDistanceToPoint in class GraphNodex - the point x coordinatey - the point y coordinate
public GraphNode getNodeAt(int x,
int y)
GraphNode
getNodeAt in class GraphNodex - the x coordinate of the point to testy - the y coordinate of the point to test
|
TPTP 4.1.0 Platform Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||