|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.toscanaj.model.diagram.DiagramNode
Stores the information on a node in a diagram. This is mainly the position, the concept for the node and the information on the labels attached to it.
Field Summary | |
static java.lang.String |
ATTRIBUTE_LABEL_STYLE_ELEMENT_NAME
|
protected LabelInfo |
attributeLabelInfo
The layout information for the attribute label. |
protected Concept |
concept
The concept the node represents. |
protected WriteableDiagram2D |
diagram
|
static java.lang.String |
ID_ATTRIBUTE_NAME
|
static java.lang.String |
NODE_ELEMENT_NAME
|
static java.lang.String |
OBJECT_LABEL_STYLE_ELEMENT_NAME
|
protected LabelInfo |
objectLabelInfo
The layout information for the attribute label. |
protected DiagramNode |
outerNode
|
protected java.awt.geom.Point2D |
position
The position of the node. |
static java.lang.String |
POSITION_ELEMENT_NAME
|
static java.lang.String |
POSITION_X_ATTRIBUTE_NAME
|
static java.lang.String |
POSITION_Y_ATTRIBUTE_NAME
|
Constructor Summary | |
DiagramNode(DiagramNode other)
A copy constructor creating a duplicate of the given node. |
|
DiagramNode(WriteableDiagram2D diagram,
org.jdom.Element element)
|
|
DiagramNode(WriteableDiagram2D diagram,
java.lang.String identifier,
java.awt.geom.Point2D position,
Concept concept,
LabelInfo attributeLabelInfo,
LabelInfo objectLabelInfo,
DiagramNode outerNode)
|
|
DiagramNode(WriteableDiagram2D diagram,
java.lang.String identifier,
java.awt.geom.Point2D position,
Concept concept,
LabelInfo attributeLabel,
LabelInfo objectLabel,
DiagramNode outerNode,
double radiusX,
double radiusY)
|
Method Summary | |
boolean |
equals(java.lang.Object obj)
|
LabelInfo |
getAttributeLabelInfo()
Returns the layout information for the attribute label. |
Concept |
getConcept()
Get the concept for this node. |
Concept[] |
getConceptNestingList()
|
static java.lang.String |
getElementName()
|
Concept |
getFilterConcept()
Returns the concept which should be used for filtering. |
java.lang.String |
getIdentifier()
|
LabelInfo |
getObjectLabelInfo()
Returns the layout information for the object label. |
DiagramNode |
getOuterNode()
|
java.awt.geom.Point2D |
getPosition()
Get the current node position. |
double |
getRadiusX()
Get the horizontal radius used for this node. |
double |
getRadiusY()
Get the vertical radius used for this node. |
double |
getX()
Get the x coordinate in the model space. |
double |
getY()
Get the y coordinate in the model space. |
boolean |
hasCollision()
Returns true iff the node connects to a line it does not belong to. |
void |
invertY()
Inverts the y-coordinates of the node and the labels offsets. |
void |
readXML(org.jdom.Element elem)
Read this element as the content of elem. |
void |
setAttributeLabelInfo(LabelInfo labelInfo)
Sets the layout information for the attribute label attached. |
void |
setObjectLabelInfo(LabelInfo labelInfo)
Sets the layout information for the object label attached. |
void |
setPosition(double x,
double y)
Set the node position in the model space. |
void |
setPosition(java.awt.geom.Point2D position)
Set the node position in the model space. |
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 |
protected Concept concept
protected java.awt.geom.Point2D position
protected LabelInfo attributeLabelInfo
protected LabelInfo objectLabelInfo
protected DiagramNode outerNode
public static final java.lang.String NODE_ELEMENT_NAME
public static final java.lang.String POSITION_ELEMENT_NAME
public static final java.lang.String POSITION_X_ATTRIBUTE_NAME
public static final java.lang.String POSITION_Y_ATTRIBUTE_NAME
public static final java.lang.String ID_ATTRIBUTE_NAME
public static final java.lang.String ATTRIBUTE_LABEL_STYLE_ELEMENT_NAME
public static final java.lang.String OBJECT_LABEL_STYLE_ELEMENT_NAME
protected WriteableDiagram2D diagram
Constructor Detail |
public DiagramNode(WriteableDiagram2D diagram, java.lang.String identifier, java.awt.geom.Point2D position, Concept concept, LabelInfo attributeLabelInfo, LabelInfo objectLabelInfo, DiagramNode outerNode)
public DiagramNode(WriteableDiagram2D diagram, java.lang.String identifier, java.awt.geom.Point2D position, Concept concept, LabelInfo attributeLabel, LabelInfo objectLabel, DiagramNode outerNode, double radiusX, double radiusY)
public DiagramNode(WriteableDiagram2D diagram, org.jdom.Element element) throws XMLSyntaxError
public DiagramNode(DiagramNode other)
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 java.lang.String getIdentifier()
public DiagramNode getOuterNode()
public Concept getFilterConcept()
public java.awt.geom.Point2D getPosition()
public final void setPosition(java.awt.geom.Point2D position)
public void setPosition(double x, double y)
public Concept getConcept()
public double getX()
public double getY()
public double getRadiusX()
public double getRadiusY()
public LabelInfo getAttributeLabelInfo()
public LabelInfo getObjectLabelInfo()
public void setAttributeLabelInfo(LabelInfo labelInfo)
public void setObjectLabelInfo(LabelInfo labelInfo)
public void invertY()
SimpleLineDiagram.checkCoordinateSystem()
public java.lang.String toString()
public static java.lang.String getElementName()
public Concept[] getConceptNestingList()
public boolean equals(java.lang.Object obj)
public boolean hasCollision()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |