Class JGraphHierarchyNode
java.lang.Object
com.jgraph.layout.hierarchical.model.JGraphAbstractHierarchyCell
com.jgraph.layout.hierarchical.model.JGraphHierarchyNode
An abstraction of an internal node in the hierarchy layout
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe graph cell this object represents.static final intstatic final intstatic final intstatic final intstatic final intintFor future useCollection of hierarchy edges that have this node as a sourceCollection of hierarchy edges that have this node as a targetstatic CollectionShared empty connection map to return instead of null in applyMap.int[]Assigns a unique hashcode for each node.Fields inherited from class JGraphAbstractHierarchyCell
height, maxRank, minRank, nextLayerConnectedCells, previousLayerConnectedCells, temp, width, x, y -
Constructor Summary
ConstructorsConstructorDescriptionJGraphHierarchyNode(Object cell) Constructs an internal node to represent the specified real graph cell -
Method Summary
Modifier and TypeMethodDescriptionintgetGeneralPurposeVariable(int layer) Gets the value of temp for the specified layergetNextLayerConnectedCells(int layer) Returns the cells this cell connects to on the next layer upgetPreviousLayerConnectedCells(int layer) Returns the cells this cell connects to on the next layer downintReturns the integer value of the layer that this node resides inbooleanisAncestor(JGraphHierarchyNode otherNode) booleanisEdge()booleanisVertex()voidsetGeneralPurposeVariable(int layer, int value) Set the value of temp for the specified layerMethods inherited from class JGraphAbstractHierarchyCell
getX, setX, setY
-
Field Details
-
emptyConnectionMap
Shared empty connection map to return instead of null in applyMap. -
CELL_TYPE_NONE
public static final int CELL_TYPE_NONE- See Also:
-
CELL_TYPE_START
public static final int CELL_TYPE_START- See Also:
-
CELL_TYPE_END
public static final int CELL_TYPE_END- See Also:
-
CELL_TYPE_BRANCH
public static final int CELL_TYPE_BRANCH- See Also:
-
CELL_TYPE_JOIN
public static final int CELL_TYPE_JOIN- See Also:
-
cell
The graph cell this object represents. -
cellType
public int cellTypeFor future use -
connectsAsTarget
Collection of hierarchy edges that have this node as a target -
connectsAsSource
Collection of hierarchy edges that have this node as a source -
hashCode
public int[] hashCodeAssigns a unique hashcode for each node. Used by the model dfs instead of copying HashSets
-
-
Constructor Details
-
JGraphHierarchyNode
Constructs an internal node to represent the specified real graph cell- Parameters:
cell- the real graph cell this node represents
-
-
Method Details
-
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
Returns the cells this cell connects to on the next layer up- Specified by:
getNextLayerConnectedCellsin classJGraphAbstractHierarchyCell- Parameters:
layer- the layer this cell is on- Returns:
- the cells this cell connects to on the next layer up
-
getPreviousLayerConnectedCells
Returns the cells this cell connects to on the next layer down- Specified by:
getPreviousLayerConnectedCellsin classJGraphAbstractHierarchyCell- 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 classJGraphAbstractHierarchyCell- Returns:
- whether or not this cell is an edge
-
isVertex
public boolean isVertex()- Specified by:
isVertexin classJGraphAbstractHierarchyCell- 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 classJGraphAbstractHierarchyCell- 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 classJGraphAbstractHierarchyCell- Parameters:
layer- the layer relating to a specific entry into tempvalue- the value for that layer
-
isAncestor
-