TPTP 4.1.0 Platform Project
Public API Specification

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

java.lang.Object
  extended byorg.eclipse.hyades.uml2sd.ui.core.GraphNode
      extended byorg.eclipse.hyades.uml2sd.ui.core.Stop

public class Stop
extends GraphNode

It is the UML2 stop graphcal representation in the sequence diagram viewer.
This draw a cross on the lifeline. The stop y coordinate depend on the event occurrence when it appears.
A stop is never drawn it is assigned to a lifeline.

See Also:
org.eclipse.hyades.uml2sd.ui.core.Lifeline#setStop(Stop)

Field Summary
protected  int eventOccurrence
          This basicaly represents the time when the stop occurs on the owning Lifeline
protected  Lifeline lifeline
          The owning lifeline on which the stop appears
static java.lang.String STOP
          The graphNode ID
 
Fields inherited from class org.eclipse.hyades.uml2sd.ui.core.GraphNode
bnodes, bSort, endEventOccurrence, fnodes, fSort, hasChilds, indexes, nodes, prefId, startEventOccurrence
 
Constructor Summary
Stop()
           
 
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 getHeight()
          Returns the graph node height
 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
 void setEventOccurrence(int occurrence)
          Set the event occurence when this stop appears
 void setLifeline(Lifeline theLifeline)
          Set the lifeline on which the stop must be draw
 
Methods inherited from class org.eclipse.hyades.uml2sd.ui.core.GraphNode
addNode, contains, drawChildsNodes, drawFocus, getBackComparator, getComparator, getEndOccurrence, getName, getNodeAt, getNodeFromListAt, getNodeList, getStartOccurrence, hasFocus, isSameAs, isSelected, isVisible, positiveDistanceToPoint, 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
The owning lifeline on which the stop appears


STOP

public static final java.lang.String STOP
The graphNode ID

See Also:
Constant Field Values

eventOccurrence

protected int eventOccurrence
This basicaly represents the time when the stop occurs on the owning Lifeline

See Also:
Lifeline for more event occurence details
Constructor Detail

Stop

public Stop()
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

setLifeline

public void setLifeline(Lifeline theLifeline)
Set the lifeline on which the stop must be draw

Parameters:
theLifeline - The the stop owing lifeline

setEventOccurrence

public void setEventOccurrence(int occurrence)
Set the event occurence when this stop appears

Parameters:
occurrence - the eventOccurence to assign to the stop

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

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

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

TPTP 4.1.0 Platform Project
Public API Specification