|
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
org.eclipse.hyades.uml2sd.ui.core.BaseMessage
org.eclipse.hyades.uml2sd.ui.core.AsyncMessage
A AsyncMessage is a asynchronous message which appear at two different event
occurences on each lifeline ends (sender and receiver).
Usage example:
Frame frame;
Lifeline lifeLine1;
Lifeline lifeLine2;
AsyncMessage message = new AsyncMessage();
//Create a new event occurrence on each lifeline
lifeline1.getNewOccurrenceIndex();
lifeline2.getNewOccurrenceIndex();
//Set the message sender and receiver
message.setStartLifeline(lifeLine1);
message.setEndLifline(lifeline2);
message.setName("Message label");
//add the message to the frame
frame.addMessage(message);
Lifeline for more event occurence details| Field Summary | |
|---|---|
static java.lang.String |
ASYNC_MESS_TAG
|
protected double |
endTime
The time when the message begin |
protected boolean |
hasTime
|
protected AsyncMessageReturn |
messageReturn
The associated message. |
protected double |
startTime
The time when the message end |
| Fields inherited from class org.eclipse.hyades.uml2sd.ui.core.BaseMessage |
|---|
endLifeline, startLifeline, visible |
| Fields inherited from class org.eclipse.hyades.uml2sd.ui.core.GraphNode |
|---|
bnodes, bSort, endEventOccurrence, fnodes, fSort, hasChilds, indexes, nodes, prefId, startEventOccurrence |
| Constructor Summary | |
|---|---|
AsyncMessage()
|
|
| Method Summary | |
|---|---|
void |
autoSetEndLifeline(Lifeline lifeline)
Set the lifeLine which has received the message. |
void |
autoSetStartLifeline(Lifeline lifeline)
Set the lifeLine which has sent the message. |
boolean |
contains(int x,
int y)
Returns true if the message or the message label contains the point given in parameter |
void |
draw(IGC context)
Draws the asynchrous message in the given GC |
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. |
double |
getFirstTime()
Returns the time when the message end |
int |
getHeight()
Returns the graph node height |
double |
getLastTime()
Returns the time when the message begin |
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()
|
protected void |
informFrame(Lifeline lifeLine,
int occurrence)
|
protected boolean |
isNearSegment(int xA,
int yA,
int xB,
int yB,
int xC,
int yC)
Returns true if the point C is on the segment defined with the point A and B |
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 |
setEndLifeline(Lifeline lifeline)
Set the lifeLine which has received the message. |
void |
setEndOccurrence(int occurrence)
Set the event occurrence attached to this message for its end lifeline |
void |
setEndTime(double time)
Set the time when the message end |
protected void |
setMessageReturn(AsyncMessageReturn message)
Set the message return associated with this message. |
void |
setStartLifeline(Lifeline lifeline)
Set the lifeLine which has sent the message. |
void |
setStartOccurrence(int occurrence)
Set the event occurrence attached to this message for its start lifeline |
void |
setStartTime(double time)
Set the time when the message start |
| Methods inherited from class org.eclipse.hyades.uml2sd.ui.core.BaseMessage |
|---|
drawFocus, drawRot, getEndLifeline, getEventOccurrence, getStartLifeline, getWidth, getX, isMessageEndInActivation, isMessageStartInActivation, isSameAs, isVisible, setEventOccurrence, setVisible |
| Methods inherited from class org.eclipse.hyades.uml2sd.ui.core.GraphNode |
|---|
addNode, contains, drawChildsNodes, getEndOccurrence, getName, getNodeAt, getNodeFromListAt, getNodeList, getStartOccurrence, hasFocus, 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 boolean hasTime
protected double endTime
protected double startTime
protected AsyncMessageReturn messageReturn
public static final java.lang.String ASYNC_MESS_TAG
| Constructor Detail |
public AsyncMessage()
| Method Detail |
public int getX()
GraphNode
getX in class BaseMessagepublic int getY()
GraphNode
getY in class BaseMessagepublic int getWidth()
GraphNode
getWidth in class BaseMessagepublic int getHeight()
GraphNode
getHeight in class BaseMessageprotected void setMessageReturn(AsyncMessageReturn message)
message - the message return to associatepublic void setEndOccurrence(int occurrence)
occurrence - the event occurrence to set
protected void informFrame(Lifeline lifeLine,
int occurrence)
public void setStartOccurrence(int occurrence)
occurrence - the event occurrence to setpublic void autoSetStartLifeline(Lifeline lifeline)
lifeline - the message senderpublic void autoSetEndLifeline(Lifeline lifeline)
lifeline - the message receiverpublic void setStartLifeline(Lifeline lifeline)
setStartLifeline in class BaseMessagelifeline - the message senderpublic void setEndLifeline(Lifeline lifeline)
setEndLifeline in class BaseMessagelifeline - the message receiver
protected boolean isNearSegment(int xA,
int yA,
int xB,
int yB,
int xC,
int yC)
xA - point A x coordinateyA - point A y coordinatexB - point B x coordinateyB - point B y coordinatexC - point C x coordinateyC - point C y coordinate
public boolean contains(int x,
int y)
BaseMessage
contains in class BaseMessagepublic void draw(IGC context)
draw in class BaseMessagepublic void setEndTime(double time)
time - the time when the message endpublic void setStartTime(double time)
time - the time when the message startpublic double getLastTime()
getLastTime in interface ITimeRangepublic double getFirstTime()
getFirstTime in interface ITimeRangepublic boolean hasTimeInfo()
hasTimeInfo in interface ITimeRange
public boolean isVisible(int x,
int y,
int width,
int height)
GraphNode
isVisible in class BaseMessagepublic java.util.Comparator getComparator()
GraphNode
getComparator in class GraphNodepublic java.lang.String getArrayId()
GraphNode
getArrayId in class GraphNodepublic java.util.Comparator getBackComparator()
GraphNode
getBackComparator in class GraphNode
public boolean positiveDistanceToPoint(int x,
int y)
GraphNode
positiveDistanceToPoint in class GraphNodex - the point x coordinatey - the point y coordinate
|
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 | ||||||||||