TPTP 4.4.0 Platform Project
Public API Specification

org.eclipse.hyades.uml2sd.ui.core
Class BasicExecutionOccurrence

java.lang.Object
  extended byorg.eclipse.hyades.uml2sd.ui.core.GraphNode
      extended byorg.eclipse.hyades.uml2sd.ui.core.BasicExecutionOccurrence
Direct Known Subclasses:
ExecutionOccurrence

public class BasicExecutionOccurrence
extends GraphNode

BasicExecutionOccurrence is the UML2 execution occurrence graphical representation. It is attached to one Lifeline, the event occurrence "duration" along the lifeline is defined by two event occurrences

See Also:
Lifeline for more event occurence details

Field Summary
static java.lang.String EXEC_OCC_TAG
           
protected  Lifeline lifeline
           
 
Fields inherited from class org.eclipse.hyades.uml2sd.ui.core.GraphNode
bnodes, bSort, endEventOccurrence, fnodes, fSort, hasChilds, indexes, nodes, prefId, startEventOccurrence
 
Constructor Summary
BasicExecutionOccurrence()
           
 
Method Summary
 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
 java.lang.String getArrayId()
          Return the node type for all class instances.
 int getEndOccurrence()
          Set the execution end event occurrence
 int getHeight()
          Returns the graph node height
 Lifeline getLifeline()
          Get the lifeline on which the execution occurrence appears.
 java.lang.String getName()
          Returns the graph node name.
 int getStartOccurrence()
          Get the execution start event occurrence
 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 isVisible(int x, int y, int width, int height)
          Returns the GraphNode 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 setEndOccurrence(int occurrence)
          Set the execution end event occurrence
 void setLifeline(Lifeline theLifeline)
          Set the lifeline on which the execution occurrence appears.
 void setStartOccurrence(int occurrence)
          Set the execution start event occurrence
protected  IColor setUnselectedFillColor(IGC context)
          Rewrite this method in your extension in order to support customized fill colors
protected  IColor setUnselectedStrokeColor(IGC context)
          Rewrite this method in your extension in order to support customized stroke colors
 
Methods inherited from class org.eclipse.hyades.uml2sd.ui.core.GraphNode
addNode, contains, drawChildsNodes, drawFocus, getBackComparator, getComparator, getNodeAt, getNodeFromListAt, getNodeList, 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

lifeline

protected Lifeline lifeline

EXEC_OCC_TAG

public static final java.lang.String EXEC_OCC_TAG
See Also:
Constant Field Values
Constructor Detail

BasicExecutionOccurrence

public BasicExecutionOccurrence()
Method Detail

getX

public int getX()
Description copied from class: GraphNode
Returns the x coordinate of the graph node

Specified by:
getX in class GraphNode
Returns:
the x coordinate

getY

public int getY()
Description copied from class: GraphNode
Returns the y coordinate of the graph node

Specified by:
getY in class GraphNode
Returns:
the y coordinate

getWidth

public int getWidth()
Description copied from class: GraphNode
Returns the graph node width

Specified by:
getWidth in class GraphNode
Returns:
the graph node width

getHeight

public int getHeight()
Description copied from class: GraphNode
Returns the graph node height

Specified by:
getHeight in class GraphNode
Returns:
the graph node height

contains

public boolean contains(int _x,
                        int _y)
Description copied from class: GraphNode
Returns true if the graph node contains the point given in parameter, return false otherwise.

Specified by:
contains in class GraphNode
Parameters:
_x - the x coordinate of the point to test containment
y the y coordinate of the point to test containment
Returns:
true if contained, false otherwise

getName

public java.lang.String getName()
Description copied from class: GraphNode
Returns the graph node name.
It is the name display in the view to label the graph node.

Overrides:
getName in class GraphNode
Returns:
the graph node name

setLifeline

public void setLifeline(Lifeline theLifeline)
Set the lifeline on which the execution occurrence appears.

Parameters:
theLifeline - - the parent lifeline

getLifeline

public Lifeline getLifeline()
Get the lifeline on which the execution occurrence appears.

Returns:
- the parent lifeline

getStartOccurrence

public int getStartOccurrence()
Get the execution start event occurrence

Overrides:
getStartOccurrence in class GraphNode
Returns:
the start event occurrence to set

getEndOccurrence

public int getEndOccurrence()
Set the execution end event occurrence

Overrides:
getEndOccurrence in class GraphNode
Returns:
the end event occurrence to set

setStartOccurrence

public void setStartOccurrence(int occurrence)
Set the execution start event occurrence

Parameters:
occurrence - the start event occurrence to set

setEndOccurrence

public void setEndOccurrence(int occurrence)
Set the execution end event occurrence

Parameters:
occurrence - the end event occurrence to set

draw

public void draw(IGC context)
Description copied from class: GraphNode
Draws the graph node in the given context

Specified by:
draw in class GraphNode
Parameters:
context - the graphical context to draw in

setUnselectedFillColor

protected IColor setUnselectedFillColor(IGC context)
Rewrite this method in your extension in order to support customized fill colors

Parameters:
context -
Returns:
IColor

setUnselectedStrokeColor

protected IColor setUnselectedStrokeColor(IGC context)
Rewrite this method in your extension in order to support customized stroke colors

Parameters:
context -
Returns:
IColor

getArrayId

public java.lang.String getArrayId()
Description copied from class: GraphNode
Return the node type for all class instances. This id is used to store the same nodes kind in the same ordered array.

Specified by:
getArrayId in class GraphNode
Returns:
the node type identifier

positiveDistanceToPoint

public boolean positiveDistanceToPoint(int x,
                                       int y)
Description copied from class: GraphNode
Return true if the distance from the GraphNode to the given point is positif

Overrides:
positiveDistanceToPoint in class GraphNode
Parameters:
x - the point x coordinate
y - the point y coordinate
Returns:
true if positif false otherwise

isVisible

public boolean isVisible(int x,
                         int y,
                         int width,
                         int height)
Description copied from class: GraphNode
Returns the GraphNode visibility for the given visible area. Wrong visibity calculation, may strongly impact drawing performance

Overrides:
isVisible in class GraphNode
Returns:
true if visible false otherwise

TPTP 4.4.0 Platform Project
Public API Specification