|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sdedit.drawable.Drawable
net.sf.sdedit.drawable.SequenceElement
net.sf.sdedit.drawable.Arrow
public class Arrow
An arrow is the graphical representation of a message.
| Field Summary |
|---|
| Fields inherited from class net.sf.sdedit.drawable.SequenceElement |
|---|
configuration, diagram |
| Fields inherited from interface net.sf.sdedit.Constants |
|---|
ACTIVE_LIFELINE_COLOR, ANTI_ALIAS, dashed, DEFAULT_CODE_FONT, DEFAULT_CURSOR, DEFAULT_ENCODING_SCHEME, dotted, emptyStroke, GLOBAL_CONF_FILE, HAND_CURSOR, MOVE_CURSOR, SAVE_AS_FILE_PROPERTY, SAVE_AS_TYPE_PROPERTY, solid, TEST_FREEHEP_CLASSNAME, thick, thick_dashed, THREAD_COLORS |
| Constructor Summary | |
|---|---|
|
Arrow(Message message,
ArrowStroke stroke,
Direction align,
int y)
Creates a new Arrow. |
protected |
Arrow(Message message,
Lifeline boundary0,
Lifeline boundary1,
ArrowStroke stroke,
Direction align,
int y)
|
| Method Summary | |
|---|---|
void |
computeLayoutInformation()
This method is called when and if the left and top positions of the drawable components of a sequence diagram are fixed. |
void |
draw(Graphics2D g2d)
Draws the sequence diagram element into the given Graphics2D context, using the rectangle starting at Drawable.getTop(), Drawable.getLeft(), sized Drawable.getHeight(), Drawable.getWidth(). |
protected void |
drawArrowHead(Graphics2D g,
int x,
int y,
int sgn)
Draws the head of a message arrow onto the diagram display. |
protected void |
drawText(Graphics2D g2d)
|
Point |
getAnchor()
Returns the point in the middle of this arrow, the one that serves as an anchor when a connection to a Note is made. |
int |
getInnerHeight()
Returns the sum of the height of the text and the space between the text and the arrow. |
static int |
getInnerHeight(Message message)
|
Message |
getMessage()
Returns the Message that this arrow represents. |
Point[] |
getPoints()
Returns an array of two points, representing the end points of the arrow. |
int |
getSpace()
Returns the amount of pixels between the end point of this arrow and the border of the lifeline it reaches. |
protected ArrowStroke |
getStroke()
|
Point |
getTextPosition()
Returns the point where the message text is written. |
protected void |
overrideColor(Graphics2D g2d)
|
void |
setSpace(int space)
Sets the amount of pixels between the end point of this arrow and the border of the lifeline it reaches. |
| Methods inherited from class net.sf.sdedit.drawable.SequenceElement |
|---|
configuration, diagram, drawMultilineString, getAlign, getLeftEndpoint, getLeftLimit, getRightEndpoint, getRightLimit, leftPadding, rightPadding, setLeftEndpoint, setLeftLimit, setRightEndpoint, setRightLimit, textHeight, textWidth |
| Methods inherited from class net.sf.sdedit.drawable.Drawable |
|---|
contains, drawMultilineString, getBottom, getHeight, getLeft, getRight, getTop, getWidth, intersects, isVisible, setBottom, setHeight, setLeft, setRight, setTop, setVisible, setWidth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Arrow(Message message,
Lifeline boundary0,
Lifeline boundary1,
ArrowStroke stroke,
Direction align,
int y)
public Arrow(Message message,
ArrowStroke stroke,
Direction align,
int y)
message - the message that the arrow representsstroke - the type of the arrow (solid, dashed, or invisible for
Primitive messagesalign - denotes the direction of the arrowy - the vertical position of the arrow| Method Detail |
|---|
public final Point[] getPoints()
public Point getTextPosition()
public int getInnerHeight()
public static int getInnerHeight(Message message)
public final int getSpace()
getSpace in class SequenceElementpublic final void setSpace(int space)
space - the amount of pixels between the end point of this arrow and
the left border of the lifeline it reachesprotected void overrideColor(Graphics2D g2d)
public void draw(Graphics2D g2d)
Drawable
draw in class Drawableg2d - the Graphics2D context to draw this drawable sequence diagram
element intoDrawable.draw(java.awt.Graphics2D)protected void drawText(Graphics2D g2d)
public Point getAnchor()
public void computeLayoutInformation()
Drawable
computeLayoutInformation in class DrawableDrawable.computeLayoutInformation()
protected final void drawArrowHead(Graphics2D g,
int x,
int y,
int sgn)
g - the graphics context of the diagram displayclosed - flag denoting whether the arrow head is closed (filled) or notx - the horizontal position where to start drawing the arrowy - the vertical position of the middle point of the arrowsgn - 1, if the arrow is directed from the right to the left, -1
otherwisepublic final Message getMessage()
protected final ArrowStroke getStroke()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||