|
||||||||||
| 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.Note
public class Note
A Note is a sequence element that looks like a piece of paper with some text on it. It appears on the right of a lifeline. It can optionally be connected to messages or points in lifelines by dotted lines. If a note is labeled with a string starting with "link:" it represents a hyperlink to another sequence diagram in another tab.
| 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 | |
|---|---|
Note(Lifeline location,
int number,
String[] text,
boolean consuming)
Creates a new Note. |
|
| Method Summary | |
|---|---|
void |
addTarget(Point target)
Adds a point such that a dotted line from the note to the point appears on the diagram. |
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(). |
URI |
getLink()
Returns the diagram file, represented as a URI that is to be opened when the note is clicked. |
Lifeline |
getLocation()
Returns the lifeline to the left of the note. |
int |
getNumber()
Returns the unique number of the note. |
boolean |
intersects(Rectangle rectangle)
Returns true if this drawable component's bounds intersect the rectangle given. |
boolean |
isConsuming()
Returns the flag denoting if the note consumes its own vertical space. |
void |
setLink(URI link)
Sets the diagram file, represented as a URI that is to be opened when the note is clicked. |
| Methods inherited from class net.sf.sdedit.drawable.SequenceElement |
|---|
configuration, diagram, drawMultilineString, getAlign, getLeftEndpoint, getLeftLimit, getRightEndpoint, getRightLimit, getSpace, 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, 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 |
|---|
public Note(Lifeline location,
int number,
String[] text,
boolean consuming)
location - the lifeline on the left of the notenumber - the unique number of the notetext - the multiline text that appears inside the note boxconsuming - flag denoting if the note consumes its own vertical
space| Method Detail |
|---|
public boolean isConsuming()
public int getNumber()
public void addTarget(Point target)
target - a point such that a dotted line from the note to the point appears
on the diagrampublic Lifeline getLocation()
public void setLink(URI link)
link - the diagram file that is to be opened when the note is clickedpublic URI getLink()
public void computeLayoutInformation()
Drawable
computeLayoutInformation in class Drawablepublic void draw(Graphics2D g2d)
Drawable
draw in class Drawableg2d - the Graphics2D context to draw this drawable sequence diagram
element intopublic boolean intersects(Rectangle rectangle)
Drawable
intersects in class Drawablerectangle - a rectangle specifiying an area of the sequence diagram
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||