|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.toscanaj.model.diagram.LabelInfo
This class encapsulates all information needed to paint a label.
Field Summary | |
static int |
ALIGNCENTER
A constant for center alignment. |
static int |
ALIGNLEFT
A constant for left alignment. |
static int |
ALIGNRIGHT
A constant for right alignment. |
Constructor Summary | |
LabelInfo()
The default constructor creates a label with default settings. |
|
LabelInfo(org.jdom.Element element)
|
|
LabelInfo(LabelInfo other)
The copy constructor makes a deep copy without the observers. |
Method Summary | |
void |
addObserver(ChangeObserver observer)
Method to add an observer. |
boolean |
equals(java.lang.Object obj)
|
java.awt.Color |
getBackgroundColor()
Returns the current background color. |
DiagramNode |
getNode()
Returns the node the label belongs to. |
java.awt.geom.Point2D |
getOffset()
Returns the current offset. |
int |
getTextAlignment()
Returns the current text alignment. |
java.awt.Color |
getTextColor()
Returns the current text color. |
void |
readXML(org.jdom.Element elem)
Read this element as the content of elem. |
void |
removeObserver(ChangeObserver observer)
Method to remove an observer. |
void |
setBackgroundColor(java.awt.Color color)
Sets the background color. |
void |
setOffset(double x,
double y)
A convenience method mapping to setOffset(Point2D). |
void |
setOffset(java.awt.geom.Point2D offset)
Sets the label offset. |
void |
setTextAlignment(int alignment)
Sets the alignment of the text. |
void |
setTextColor(java.awt.Color color)
Sets the text color. |
java.lang.String |
toString()
Debug output. |
org.jdom.Element |
toXML()
Write this element as the content of elem. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int ALIGNLEFT
public static final int ALIGNCENTER
public static final int ALIGNRIGHT
Constructor Detail |
public LabelInfo()
public LabelInfo(LabelInfo other)
public LabelInfo(org.jdom.Element element) throws XMLSyntaxError
Method Detail |
public org.jdom.Element toXML()
XMLizable
toXML
in interface XMLizable
public void readXML(org.jdom.Element elem) throws XMLSyntaxError
XMLizable
readXML
in interface XMLizable
XMLSyntaxError
public DiagramNode getNode()
public java.awt.geom.Point2D getOffset()
public void setOffset(java.awt.geom.Point2D offset)
public void setOffset(double x, double y)
public java.awt.Color getBackgroundColor()
public void setBackgroundColor(java.awt.Color color)
public java.awt.Color getTextColor()
public void setTextColor(java.awt.Color color)
public int getTextAlignment()
public void setTextAlignment(int alignment)
public void addObserver(ChangeObserver observer)
addObserver
in interface ChangeObservable
public void removeObserver(ChangeObserver observer)
removeObserver
in interface ChangeObservable
public boolean equals(java.lang.Object obj)
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |