Search
ContainerNode Class
Remarks See Also
 

Implements nodes that can contain other nodes.

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

 Syntax

Java  Copy Code

public class ContainerNode
    extends DiagramNode
    implements InplaceEditable, Scrollable

 Remarks

Users can drag nodes into a container interactively. When a dragged node is over a container, the container frame is painted using the HighlightPen property to indicate that the node would be added to the container.

Call the add method to add a node to container programmatically, and the remove method to remove a node from the container. Child nodes of a container are stored in its Children list. The Container property of child nodes returns their parent ContainerNode.

AutoShrink specifies whether the size of a container should shrink when a node is removed from it. The container node will not shrink to a size smaller than MinimumSize, even if it does not contain any items. Adding child nodes to a container will automatically grow its size, unless AutoGrow is set to false. Enable the Scrollable property to let users scroll container's content if it overflows.

A container node can be folded and unfolded, either interactively or programmatically, as specified through the Foldable and Folded properties. When a container is folded, it occupies a minimal area and its child nodes are hidden. You can get the original size of a folded container using the getUnfoldedSize method.

The Caption property specifies the caption text of a container node, and CaptionBrush specifies its color. Use the CaptionFormat property to define the alignment and position of the caption text. The height of the caption area of a container can be set using the CaptionHeight property.

 Inheritance Hierarchy

java.lang.Object
    com.mindfusion.diagramming.DiagramItem
        com.mindfusion.diagramming.DiagramNode
            com.mindfusion.diagramming.ContainerNode

 See Also