Class mxGraphHierarchyNode
- java.lang.Object
-
- com.mxgraph.layout.hierarchical.model.mxGraphAbstractHierarchyCell
-
- com.mxgraph.layout.hierarchical.model.mxGraphHierarchyNode
-
public class mxGraphHierarchyNode extends mxGraphAbstractHierarchyCell
An abstraction of an internal node in the hierarchy layout
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.ObjectcellThe graph cell this object represents.java.util.Collection<mxGraphHierarchyEdge>connectsAsSourceCollection of hierarchy edges that have this node as a sourcejava.util.Collection<mxGraphHierarchyEdge>connectsAsTargetCollection of hierarchy edges that have this node as a targetstatic java.util.Collection<mxGraphHierarchyEdge>emptyConnectionMapShared empty connection map to return instead of null in applyMap.int[]hashCodeAssigns a unique hashcode for each node.-
Fields inherited from class com.mxgraph.layout.hierarchical.model.mxGraphAbstractHierarchyCell
height, maxRank, minRank, nextLayerConnectedCells, previousLayerConnectedCells, temp, width, x, y
-
-
Constructor Summary
Constructors Constructor Description mxGraphHierarchyNode(java.lang.Object cell)Constructs an internal node to represent the specified real graph cell
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetGeneralPurposeVariable(int layer)Gets the value of temp for the specified layerjava.util.List<mxGraphAbstractHierarchyCell>getNextLayerConnectedCells(int layer)Returns the cells this cell connects to on the next layer upjava.util.List<mxGraphAbstractHierarchyCell>getPreviousLayerConnectedCells(int layer)Returns the cells this cell connects to on the next layer downintgetRankValue()Returns the integer value of the layer that this node resides inbooleanisAncestor(mxGraphHierarchyNode otherNode)booleanisEdge()booleanisVertex()voidsetGeneralPurposeVariable(int layer, int value)Set the value of temp for the specified layer-
Methods inherited from class com.mxgraph.layout.hierarchical.model.mxGraphAbstractHierarchyCell
getX, setX, setY
-
-
-
-
Field Detail
-
emptyConnectionMap
public static java.util.Collection<mxGraphHierarchyEdge> emptyConnectionMap
Shared empty connection map to return instead of null in applyMap.
-
cell
public java.lang.Object cell
The graph cell this object represents.
-
connectsAsTarget
public java.util.Collection<mxGraphHierarchyEdge> connectsAsTarget
Collection of hierarchy edges that have this node as a target
-
connectsAsSource
public java.util.Collection<mxGraphHierarchyEdge> connectsAsSource
Collection of hierarchy edges that have this node as a source
-
hashCode
public int[] hashCode
Assigns a unique hashcode for each node. Used by the model dfs instead of copying HashSets
-
-
Method Detail
-
getRankValue
public int getRankValue()
Returns the integer value of the layer that this node resides in- Returns:
- the integer value of the layer that this node resides in
-
getNextLayerConnectedCells
public java.util.List<mxGraphAbstractHierarchyCell> getNextLayerConnectedCells(int layer)
Returns the cells this cell connects to on the next layer up- Specified by:
getNextLayerConnectedCellsin classmxGraphAbstractHierarchyCell- Parameters:
layer- the layer this cell is on- Returns:
- the cells this cell connects to on the next layer up
-
getPreviousLayerConnectedCells
public java.util.List<mxGraphAbstractHierarchyCell> getPreviousLayerConnectedCells(int layer)
Returns the cells this cell connects to on the next layer down- Specified by:
getPreviousLayerConnectedCellsin classmxGraphAbstractHierarchyCell- Parameters:
layer- the layer this cell is on- Returns:
- the cells this cell connects to on the next layer down
-
isEdge
public boolean isEdge()
- Specified by:
isEdgein classmxGraphAbstractHierarchyCell- Returns:
- whether or not this cell is an edge
-
isVertex
public boolean isVertex()
- Specified by:
isVertexin classmxGraphAbstractHierarchyCell- Returns:
- whether or not this cell is a node
-
getGeneralPurposeVariable
public int getGeneralPurposeVariable(int layer)
Gets the value of temp for the specified layer- Specified by:
getGeneralPurposeVariablein classmxGraphAbstractHierarchyCell- Parameters:
layer- the layer relating to a specific entry into temp- Returns:
- the value for that layer
-
setGeneralPurposeVariable
public void setGeneralPurposeVariable(int layer, int value)Set the value of temp for the specified layer- Specified by:
setGeneralPurposeVariablein classmxGraphAbstractHierarchyCell- Parameters:
layer- the layer relating to a specific entry into tempvalue- the value for that layer
-
isAncestor
public boolean isAncestor(mxGraphHierarchyNode otherNode)
-
-