net.sourceforge.toscanaj.model.diagram
Class NestedDiagramNode

java.lang.Object
  extended bynet.sourceforge.toscanaj.model.diagram.DiagramNode
      extended bynet.sourceforge.toscanaj.model.diagram.NestedDiagramNode
All Implemented Interfaces:
XMLizable

public class NestedDiagramNode
extends DiagramNode

A class representing a diagram node with an inner diagram.


Field Summary
 
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
 
Constructor Summary
NestedDiagramNode(WriteableDiagram2D outerDiagram, DiagramNode outerNode, Diagram2D innerDiagram, double scale)
          Creates a new diagram node by copying the information from the given other node and attaching the diagram.
 
Method Summary
 Concept[] getConceptNestingList()
           
 Diagram2D getInnerDiagram()
          Returns the inner diagram of the node.
 double getOuterScaleFactor()
           
 double getRadiusX()
          Get the horizontal radius used for this node.
 double getRadiusY()
          Get the vertical radius used for this node.
 void setPosition(double x, double y)
          Set the node position in the model space.
 void updateInnerDiagram(Diagram2D updatedInnerDiagram, double scale)
           
 
Methods inherited from class net.sourceforge.toscanaj.model.diagram.DiagramNode
equals, getAttributeLabelInfo, getConcept, getElementName, getFilterConcept, getIdentifier, getObjectLabelInfo, getOuterNode, getPosition, getX, getY, hasCollision, invertY, readXML, setAttributeLabelInfo, setObjectLabelInfo, setPosition, toString, toXML
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NestedDiagramNode

public NestedDiagramNode(WriteableDiagram2D outerDiagram,
                         DiagramNode outerNode,
                         Diagram2D innerDiagram,
                         double scale)
Creates a new diagram node by copying the information from the given other node and attaching the diagram. The given node determines the position in the outer diagram while the given diagram is the inner diagram in a nested diagram. The scale parameter determines how much the new diagram will be scaled to accomodate the inner diagrams. If the dropAttributeLabels flag is set, the inner nodes will have no attribute labels attached.

Method Detail

getInnerDiagram

public Diagram2D getInnerDiagram()
Returns the inner diagram of the node.


getRadiusX

public double getRadiusX()
Description copied from class: DiagramNode
Get the horizontal radius used for this node.

Overrides:
getRadiusX in class DiagramNode

getRadiusY

public double getRadiusY()
Description copied from class: DiagramNode
Get the vertical radius used for this node.

Overrides:
getRadiusY in class DiagramNode

getConceptNestingList

public Concept[] getConceptNestingList()
Overrides:
getConceptNestingList in class DiagramNode

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

getOuterScaleFactor

public double getOuterScaleFactor()

updateInnerDiagram

public void updateInnerDiagram(Diagram2D updatedInnerDiagram,
                               double scale)


The ToscanaJ project