DroidDiagram Programmer's Guide
DiagramNode Class
Remarks See Also
 






DiagramNode is an abstract base class from which the ShapeNode, TableNode and ContainerNode classes derive. DiagramNode instances can represent graph vertices, nodes in organizational or flow diagrams, entities in ER diagrams, and so on.

Namespace: com.mindfusion.diagramming
Package: com.mindfusion.diagramming

 Syntax

Java  Copy Code

public abstract class DiagramNode extends DiagramItem

 Remarks

Use the setBounds method to set the location and size of a node. To move a node without changing its size, call the moveTo method. To change only the size of a node, invoke the resize method.

Constraints upon how users are allowed to modify a node can be set by the setConstraints and setEnabledHandles methods. The former specifies constraints on the allowed move direction and node size. The latter enables or disables specific manipulation handles of a node.

Relations between nodes are indicated by linking the nodes with DiagramLink objects. Links are directional links, so each node has two collections referring to links, which can be accessed by getIncomingLinks and getOutgoingLinks. setAnchorPattern lets you define to which points of a node incoming or outgoing links can be connected. You can specify whether a node accepts incoming links by the setAllowIncomingLinks method, and outgoing links by the setAllowOutgoingLinks method.

A user is allowed to expand or collapse the tree branch that starts from a node if setExpandable is called for that node. Use getExpanded to find out whether the branch starting from a node is expanded or not.

Nodes can be attached to other items, and be used as simple labels, image-holders or other kinds of UI elements. The attachTo method creates a Group instance if necessary, and calls the group's appropriate attachTo* method.

 Inheritance Hierarchy

java.lang.Object
    com.mindfusion.diagramming.DiagramItem
        com.mindfusion.diagramming.DiagramNode
            com.mindfusion.diagramming.CompositeNode
            com.mindfusion.diagramming.ContainerNode
            com.mindfusion.diagramming.DummyNode
            com.mindfusion.diagramming.FreeFormNode
            com.mindfusion.diagramming.ShapeNode
            com.mindfusion.diagramming.TableNode
            com.mindfusion.diagramming.TreeViewNode

 See Also

DiagramNode Members
com.mindfusion.diagramming Namespace