|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sdedit.drawable.Drawable
public abstract class Drawable
A Drawable object is a representation of a visible component that occurs in a sequence diagram. This representation is not concerned with semantic aspects of the component, it just provides the information and the behaviour that is necessary to display the component.
A draw(Graphics2D) method must be implemented, so a Drawable object is able to draw itself into a Graphics context.
| Field Summary |
|---|
| 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 | |
|---|---|
protected |
Drawable()
Creates a new Drawable with the visibility set to true |
| Method Summary | |
|---|---|
abstract void |
computeLayoutInformation()
This method is called when and if the left and top positions of the drawable components of a sequence diagram are fixed. |
boolean |
contains(Point point)
|
abstract void |
draw(Graphics2D g2d)
Draws the sequence diagram element into the given Graphics2D context, using the rectangle starting at getTop(), getLeft(), sized getHeight(), getWidth(). |
protected static void |
drawMultilineString(Graphics2D g,
String[] string,
int x,
int y,
int simpleHeight,
int width,
boolean bottomOrTop,
Color background)
|
int |
getBottom()
|
int |
getHeight()
|
int |
getLeft()
|
int |
getRight()
|
int |
getTop()
|
int |
getWidth()
|
boolean |
intersects(Rectangle rectangle)
Returns true if this drawable component's bounds intersect the rectangle given. |
boolean |
isVisible()
|
void |
setBottom(int bottom)
|
void |
setHeight(int height)
|
void |
setLeft(int left)
|
void |
setRight(int right)
|
void |
setTop(int top)
|
void |
setVisible(boolean visible)
|
void |
setWidth(int width)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Drawable()
| Method Detail |
|---|
public abstract void draw(Graphics2D g2d)
g2d - the Graphics2D context to draw this drawable sequence diagram
element intopublic abstract void computeLayoutInformation()
public final int getTop()
public final int getLeft()
public final int getWidth()
public final int getHeight()
public final void setHeight(int height)
public final void setLeft(int left)
public final void setTop(int top)
public final void setWidth(int width)
public final int getBottom()
public final int getRight()
public final void setRight(int right)
public final void setBottom(int bottom)
public boolean intersects(Rectangle rectangle)
rectangle - a rectangle specifiying an area of the sequence diagram
public boolean contains(Point point)
public boolean isVisible()
public final void setVisible(boolean visible)
visible - the visible to set
protected static final void drawMultilineString(Graphics2D g,
String[] string,
int x,
int y,
int simpleHeight,
int width,
boolean bottomOrTop,
Color background)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||