Class JGraphHierarchyEdge
java.lang.Object
com.jgraph.layout.hierarchical.model.JGraphAbstractHierarchyCell
com.jgraph.layout.hierarchical.model.JGraphHierarchyEdge
An abstraction of a hierarchical edge for the hierarchy layout
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe graph edge(s) this object represents.protected booleanWhether or not the direction of this edge has been reversed internally to create a DAG for the hierarchical layoutThe node this edge is sourced atThe node this edge targetsFields inherited from class JGraphAbstractHierarchyCell
height, maxRank, minRank, nextLayerConnectedCells, previousLayerConnectedCells, temp, width, x, y -
Constructor Summary
Constructors -
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 downvoidinvert()Inverts the direction of this internal edge(s)booleanisEdge()booleanbooleanisVertex()voidsetGeneralPurposeVariable(int layer, int value) Set the value of temp for the specified layervoidsetReversed(boolean isReversed) Methods inherited from class JGraphAbstractHierarchyCell
getX, setX, setY
-
Field Details
-
edges
The graph edge(s) this object represents. Parallels edge are all grouped together within one hierarchy edge. -
source
The node this edge is sourced at -
target
The node this edge targets -
isReversed
protected boolean isReversedWhether or not the direction of this edge has been reversed internally to create a DAG for the hierarchical layout
-
-
Constructor Details
-
JGraphHierarchyEdge
Constructs a hierarchy edge- Parameters:
edges- a list of real graph edges this abstraction represents
-
-
Method Details
-
invert
public void invert()Inverts the direction of this internal edge(s) -
isReversed
public boolean isReversed()- Returns:
- Returns the isReversed.
-
setReversed
public void setReversed(boolean isReversed) - Parameters:
isReversed- The isReversed to set.
-
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
-