net.sourceforge.toscanaj.model.ndimdiagram
Class NDimDiagramNode
java.lang.Object
net.sourceforge.toscanaj.model.diagram.DiagramNode
net.sourceforge.toscanaj.model.ndimdiagram.NDimDiagramNode
- All Implemented Interfaces:
- XMLizable
- public class NDimDiagramNode
- extends DiagramNode
Implements a diagram node using an n-dimensional space and projection onto the plane.
The original position is used as an offset, in case the node gets positioned directly. Theoretically
one could change the ndimVector instead.
- To do:
- do we want that? Probably we should add at least some way to reset the
offset
Fields inherited from class net.sourceforge.toscanaj.model.diagram.DiagramNode |
ATTRIBUTE_LABEL_STYLE_ELEMENT_NAME, attributeLabelInfo, concept, diagram, ID_ATTRIBUTE_NAME, NODE_ELEMENT_NAME, OBJECT_LABEL_STYLE_ELEMENT_NAME, objectLabelInfo, outerNode, position, POSITION_ELEMENT_NAME, POSITION_X_ATTRIBUTE_NAME, POSITION_Y_ATTRIBUTE_NAME |
Methods inherited from class net.sourceforge.toscanaj.model.diagram.DiagramNode |
equals, getAttributeLabelInfo, getConcept, getConceptNestingList, getElementName, getFilterConcept, getIdentifier, getObjectLabelInfo, getOuterNode, getRadiusX, getRadiusY, getX, getY, hasCollision, invertY, readXML, setAttributeLabelInfo, setObjectLabelInfo, setPosition, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NDimDiagramNode
public NDimDiagramNode(NDimDiagram diagram,
java.lang.String identifier,
double[] ndimVector,
Concept concept,
LabelInfo attributeLabel,
LabelInfo objectLabel,
DiagramNode outerNode)
NDimDiagramNode
public NDimDiagramNode(NDimDiagram nDimDiagram,
org.jdom.Element diagramNode)
throws XMLSyntaxError
toXML
public org.jdom.Element toXML()
- Description copied from interface:
XMLizable
- Write this element as the content of elem.
- Specified by:
toXML
in interface XMLizable
- Overrides:
toXML
in class DiagramNode
getPosition
public java.awt.geom.Point2D getPosition()
- Description copied from class:
DiagramNode
- Get the current node position.
- Overrides:
getPosition
in class DiagramNode
getProjectedPosition
protected java.awt.geom.Point2D getProjectedPosition()
setPosition
public void setPosition(double x,
double y)
- Description copied from class:
DiagramNode
- Set the node position in the model space.
- Overrides:
setPosition
in class DiagramNode
getNdimVector
public double[] getNdimVector()
setNdimVector
public void setNdimVector(double[] ndimVector)
The ToscanaJ project