public class Subgraph extends Node
CompoundDirectedGraph
s. A proper layout of a compound graph
ensures that all of a subgraph's children are placed inside its rectangular
region. Nodes which do not belong to the subgraph must be placed outside that
region.
A Subgraph may contain another Subgraph.
A Subgraph has additional geometric properties which describe the containing box. They are:
insets
- the size of the subgraph's border. A subgraph is
typically rendered as a thin rectangular box. Sometimes this box is labeled
or decorated. The insets can be used to reserve space for this purpose.
innerPadding
- the amount of empty space that must be preserved
just inside the subgraph's border. This is the minimum space between the
border, and the children node's contained inside the subgraph.
Modifier and Type | Field and Description |
---|---|
Insets |
innerPadding
The minimum space between this subgraph's border and it's children.
|
Insets |
insets
The space required for this subgraph's border.
|
NodeList |
members
The children of this subgraph.
|
Constructor and Description |
---|
Subgraph(java.lang.Object data)
Constructs a new subgraph with the given data object.
|
Subgraph(java.lang.Object data,
Subgraph parent)
Constructs a new subgraph with the given data object and parent subgraph.
|
Modifier and Type | Method and Description |
---|---|
void |
addMember(Node n)
Adds the given node to this subgraph.
|
getLeft, getOffsetIncoming, getOffsetOutgoing, getPadding, getParent, getRight, getRowConstraint, setPadding, setParent, setRowConstraint, setSize, toString
public NodeList members
public Insets insets
public Insets innerPadding
public Subgraph(java.lang.Object data)
data
- an arbitrary data objectNode.Node(Object)
public Subgraph(java.lang.Object data, Subgraph parent)
data
- an arbitrary data objectparent
- the parentNode.Node(Object, Subgraph)
public void addMember(Node n)
n
- the node to addCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.