|
TPTP 4.4.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
The base class used for all UML2 graph nodes displayed in the Sequence Diagram SDWidget.
| Field Summary | |
|---|---|
protected java.util.HashMap |
bnodes
|
protected java.util.HashMap |
bSort
|
protected int |
endEventOccurrence
|
protected java.util.HashMap |
fnodes
|
protected java.util.HashMap |
fSort
|
protected boolean |
hasChilds
|
protected java.util.HashMap |
indexes
|
protected java.util.HashMap |
nodes
|
java.lang.String |
prefId
Preference ColorId to use to draw font |
protected int |
startEventOccurrence
|
| Constructor Summary | |
|---|---|
GraphNode()
|
|
| Method Summary | |
|---|---|
void |
addNode(GraphNode nodeToAdd)
Add a GraphNode into the receiver |
abstract boolean |
contains(int x,
int y)
Returns true if the graph node contains the point given in parameter, return false otherwise. |
static boolean |
contains(int x,
int y,
int width,
int height,
int px,
int py)
Determine if the given point (px,py) is contained in the rectangle (x,y,width,height) |
protected abstract void |
draw(IGC context)
Draws the graph node in the given context |
protected void |
drawChildsNodes(IGC context)
Draws the childs nodes on the given context. |
void |
drawFocus(IGC context)
|
abstract java.lang.String |
getArrayId()
Return the node type for all class instances. |
java.util.Comparator |
getBackComparator()
If needed, return a different comparator to backward scan the GraphNode array |
java.util.Comparator |
getComparator()
Return a comparator to sort the GraphNode of the same type This comparator is used to order the GraphNode array of the given node type. |
int |
getEndOccurrence()
Returns the end event occurrence attached to this graphNode |
abstract int |
getHeight()
Returns the graph node height |
java.lang.String |
getName()
Returns the graph node name. |
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 |
protected GraphNode |
getNodeFromListAt(int x,
int y,
java.util.List list,
int fromIndex)
Returns the graph node which contains the point given in parameter for the given graph node list and starting the iteration at the given index WARNING: Only graph nodes with smaller coordinates than the current visible area can be returned. |
java.util.ArrayList |
getNodeList(GraphNode from,
GraphNode to)
|
int |
getStartOccurrence()
Returns the start event occurrence attached to this graphNode. |
abstract int |
getWidth()
Returns the graph node width |
abstract int |
getX()
Returns the x coordinate of the graph node |
abstract int |
getY()
Returns the y coordinate of the graph node |
boolean |
hasFocus()
Returns true if the graph node is focused, false otherwise. |
boolean |
isSameAs(GraphNode node)
Compare two graphNodes |
boolean |
isSelected()
Returns true if the graph node is selected, false otherwise. |
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 |
resetIndex()
Reset the internal index of the first visible GraphNode for each ordered GraphNode lists |
void |
setFocused(boolean focus)
Tags the the graph node as focused. |
void |
setName(java.lang.String nodeName)
Set the graph node name. |
void |
setSelected(boolean selection)
Tags the the graph node has selected. |
void |
updateIndex(int x,
int y,
int width,
int height)
Computes the index of the first visible GraphNode for each ordered graph node lists depending on the visible area given in parameter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int startEventOccurrence
protected int endEventOccurrence
public java.lang.String prefId
protected boolean hasChilds
protected java.util.HashMap nodes
protected java.util.HashMap fnodes
protected java.util.HashMap bnodes
protected java.util.HashMap indexes
protected java.util.HashMap fSort
protected java.util.HashMap bSort
| Constructor Detail |
public GraphNode()
| Method Detail |
public void resetIndex()
public void addNode(GraphNode nodeToAdd)
nodeToAdd - the node to addpublic void setName(java.lang.String nodeName)
public java.lang.String getName()
public void setSelected(boolean selection)
selection - - true to set selected, false to set unselectedSDWidget.addSelection(GraphNode),
SDWidget.removeSelection(GraphNode),
SDWidget.clearSelection()public void setFocused(boolean focus)
focus - - true to set focued, false otherwiseSDWidget.addSelection(GraphNode),
SDWidget.removeSelection(GraphNode),
SDWidget.clearSelection()public boolean isSelected()
public boolean hasFocus()
public abstract boolean contains(int x,
int y)
x - the x coordinate of the point to test containment public abstract int getX()
public abstract int getY()
public abstract int getHeight()
public abstract int getWidth()
protected abstract void draw(IGC context)
context - the graphical context to draw in
public boolean isVisible(int x,
int y,
int width,
int height)
public java.util.Comparator getComparator()
public java.util.Comparator getBackComparator()
public boolean isSameAs(GraphNode node)
node - the node to compare to
public abstract java.lang.String getArrayId()
public boolean positiveDistanceToPoint(int x,
int y)
x - the point x coordinatey - the point y coordinate
public GraphNode getNodeAt(int x,
int y)
x - the x coordinate of the point to testy - the y coordinate of the point to test
public java.util.ArrayList getNodeList(GraphNode from,
GraphNode to)
protected GraphNode getNodeFromListAt(int x,
int y,
java.util.List list,
int fromIndex)
x - the x coordinate of the point to testy - the y coordinate of the point to testlist - the list to search infromIndex - list browsing starting point
public int getStartOccurrence()
public int getEndOccurrence()
public void updateIndex(int x,
int y,
int width,
int height)
x - visible area top left corner x coordinatey - visible area top left corner y coordinatewidth - visible area widthheight - visible area heightprotected void drawChildsNodes(IGC context)
context - the context to draw todraw(IGC)public void drawFocus(IGC context)
public static boolean contains(int x,
int y,
int width,
int height,
int px,
int py)
x - the rectangle x coordinatey - the rectangle y coordinatewidth - the rectangle widthheight - the rectangle heightpx - the x coordinate of the point to testpy - the y coordinate of the point to test
|
TPTP 4.4.0 Platform Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||