Package diva.graph.modular
Class BasicModularGraphModel.BasicNodeModel
- java.lang.Object
-
- diva.graph.modular.BasicModularGraphModel.BasicNodeModel
-
- All Implemented Interfaces:
CompositeModel
,MutableCompositeNodeModel
,MutableNodeModel
,NodeModel
- Enclosing class:
- BasicModularGraphModel
public static class BasicModularGraphModel.BasicNodeModel extends java.lang.Object implements MutableCompositeNodeModel
-
-
Constructor Summary
Constructors Constructor Description BasicNodeModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNodeCount(java.lang.Object composite)
Return the number of nodes contained in this graph or composite node.java.lang.Object
getParent(java.lang.Object node)
Return the graph parent of the given node.java.util.Iterator
inEdges(java.lang.Object node)
Return an iterator over the edges coming into the given node.java.util.Iterator
nodes(java.lang.Object composite)
Provide an iterator over the nodes in the given graph or composite node.java.util.Iterator
nodesAfterEdges(java.lang.Object composite)
Provide an iterator over the nodes that should be rendered after to the edges.java.util.Iterator
nodesBeforeEdges(java.lang.Object composite)
Provide an iterator over the nodes that should be rendered prior to the edges.java.util.Iterator
outEdges(java.lang.Object node)
Return an iterator over the edges coming out of the given node.void
setParent(java.lang.Object node, java.lang.Object parent)
Set the graph parent of the given node.
-
-
-
Method Detail
-
inEdges
public java.util.Iterator inEdges(java.lang.Object node)
Return an iterator over the edges coming into the given node.
-
outEdges
public java.util.Iterator outEdges(java.lang.Object node)
Return an iterator over the edges coming out of the given node.
-
getParent
public java.lang.Object getParent(java.lang.Object node)
Return the graph parent of the given node.
-
setParent
public void setParent(java.lang.Object node, java.lang.Object parent)
Set the graph parent of the given node. Implementors of this method are also responsible for insuring that it is set properly as the child of the graph in the graph.- Specified by:
setParent
in interfaceMutableNodeModel
-
getNodeCount
public int getNodeCount(java.lang.Object composite)
Return the number of nodes contained in this graph or composite node.- Specified by:
getNodeCount
in interfaceCompositeModel
-
nodes
public java.util.Iterator nodes(java.lang.Object composite)
Provide an iterator over the nodes in the given graph or composite node. This iterator does not necessarily support removal operations.- Specified by:
nodes
in interfaceCompositeModel
-
nodesBeforeEdges
public java.util.Iterator nodesBeforeEdges(java.lang.Object composite)
Provide an iterator over the nodes that should be rendered prior to the edges. This iterator does not necessarily support removal operations. In this base class, this returns the same iterator as the nodes(Object) method.- Specified by:
nodesBeforeEdges
in interfaceCompositeModel
-
nodesAfterEdges
public java.util.Iterator nodesAfterEdges(java.lang.Object composite)
Provide an iterator over the nodes that should be rendered after to the edges. This iterator does not necessarily support removal operations. In this base class, this returns an iterator over nothing.- Specified by:
nodesAfterEdges
in interfaceCompositeModel
-
-