Class MergedNode
java.lang.Object
org.graffiti.attributes.AbstractAttributable
org.graffiti.graph.AbstractGraphElement
org.graffiti.graph.AbstractNode
org.graffiti.graph.AdjListNode
org.vanted.plugins.layout.multilevelframework.MergedNode
- All Implemented Interfaces:
Comparable<GraphElement>
,Attributable
,GraphElement
,Node
public class MergedNode extends AdjListNode
A
Node
implementation that represents several nodes in a coarsening level within MultilevelGraph
.- See Also:
AdjListNode
,Node
-
Constructor Summary
Constructors Constructor Description MergedNode(Graph g)
Deprecated.MergedNode(Graph g, Set<Node> nodes)
Create a newMergedNode
.MergedNode(Graph g, CollectionAttribute col)
Deprecated. -
Method Summary
Modifier and Type Method Description void
addInnerNode(Node node)
Deprecated.Collection<? extends Node>
getInnerNodes()
int
getWeight()
Methods inherited from class org.graffiti.graph.AdjListNode
compareTo, getDegree, getDirectedInEdgesIterator, getDirectedOutEdgesIterator, getEdges, getEdgesIterator, getInDegree, getOutDegree, getUndirectedEdgesIterator, setGraph, toString
Methods inherited from class org.graffiti.graph.AbstractNode
getAllInEdges, getAllInNeighbors, getAllOutEdges, getAllOutNeighbors, getDirectedInEdges, getDirectedOutEdges, getInNeighbors, getInNeighborsIterator, getNeighbors, getNeighborsIterator, getOutNeighbors, getOutNeighborsIterator, getUndirectedEdges, getUndirectedNeighbors, getUndirectedNeighborsIterator
Methods inherited from class org.graffiti.graph.AbstractGraphElement
compareTo, getGraph, getID, getListenerManager, getViewID, setID, setViewID
Methods inherited from class org.graffiti.attributes.AbstractAttributable
addAttribute, addBoolean, addByte, addDouble, addFloat, addInteger, addLong, addShort, addString, changeBoolean, changeByte, changeDouble, changeFloat, changeInteger, changeLong, changeShort, changeString, getAttribute, getAttributes, getBoolean, getByte, getDouble, getFloat, getInteger, getLong, getShort, getString, removeAttribute, setBoolean, setByte, setDouble, setFloat, setInteger, setLong, setShort, setString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.graffiti.attributes.Attributable
addAttribute, addBoolean, addByte, addDouble, addFloat, addInteger, addLong, addShort, addString, changeBoolean, changeByte, changeDouble, changeFloat, changeInteger, changeLong, changeShort, changeString, getAttribute, getAttributes, getBoolean, getByte, getDouble, getFloat, getInteger, getListenerManager, getLong, getShort, getString, removeAttribute, setBoolean, setByte, setDouble, setFloat, setInteger, setLong, setShort, setString
Methods inherited from interface org.graffiti.graph.GraphElement
getGraph, getID, getViewID, setID, setViewID
Methods inherited from interface org.graffiti.graph.Node
getAllInEdges, getAllInNeighbors, getAllOutEdges, getAllOutNeighbors, getDirectedInEdges, getDirectedOutEdges, getInNeighbors, getInNeighborsIterator, getNeighbors, getNeighborsIterator, getOutNeighbors, getOutNeighborsIterator, getUndirectedEdges, getUndirectedNeighbors, getUndirectedNeighborsIterator
-
Constructor Details
-
MergedNode
Create a newMergedNode
. -
MergedNode
Deprecated.Create a newMergedNode
. It is preferable to use the other constructor and refrain from usingaddInnerNode(Node)
.- Parameters:
g
- TheGraph
that contains this node. Must not benull
.- See Also:
AdjListNode(Graph, CollectionAttribute)
-
MergedNode
Deprecated.Create a newMergedNode
. It is preferable to use the other constructor and refrain from usingaddInnerNode(Node)
.- Parameters:
g
- TheGraph
that contains this node. Must not benull
.- See Also:
AdjListNode(Graph)
-
-
Method Details
-
getInnerNodes
- Returns:
- the
Node
s represented by thisMergedNode
. The returned value must not be modified (seeaddInnerNode(Node)
).
-
addInnerNode
Deprecated.Use this method to add aNode
to the collection of nodes represented by thisMergedNode
. It is better to add all inner nodes using the constructorMergedNode(Graph, Set)
, because otherwise the position has to be recalculated on each change.- Parameters:
node
- TheNode
to be added. Must not benull
. Must not be already contained in thisMergedNode
(i.e. not ingetInnerNodes()
).
-
getWeight
public int getWeight()- Returns:
- the number of nodes that the
MergedNode
represents (otherMergedNode
s are not counted, just the notes that they in turn represent)
-