com.jgraph.layout.hierarchical.model

Class JGraphHierarchyEdge

public class JGraphHierarchyEdge extends JGraphAbstractHierarchyCell

An abstraction of a hierarchical edge for the hierarchy layout
Field Summary
Listedges
The graph edge(s) this object represents.
protected booleanisReversed
Whether or not the direction of this edge has been reversed internally to create a DAG for the hierarchical layout
JGraphHierarchyNodesource
The node this edge is sourced at
JGraphHierarchyNodetarget
The node this edge targets
Constructor Summary
JGraphHierarchyEdge(List edges)
Constructs a hierarchy edge
Method Summary
intgetGeneralPurposeVariable(int layer)
Gets the value of temp for the specified layer
ListgetNextLayerConnectedCells(int layer)
Returns the cells this cell connects to on the next layer up
ListgetPreviousLayerConnectedCells(int layer)
Returns the cells this cell connects to on the next layer down
voidinvert()
Inverts the direction of this internal edge(s)
booleanisEdge()
booleanisReversed()
booleanisVertex()
voidsetGeneralPurposeVariable(int layer, int value)
Set the value of temp for the specified layer
voidsetReversed(boolean isReversed)

Field Detail

edges

public List edges
The graph edge(s) this object represents. Parallels edge are all grouped together within one hierarchy edge.

isReversed

protected boolean isReversed
Whether or not the direction of this edge has been reversed internally to create a DAG for the hierarchical layout

source

public JGraphHierarchyNode source
The node this edge is sourced at

target

public JGraphHierarchyNode target
The node this edge targets

Constructor Detail

JGraphHierarchyEdge

public JGraphHierarchyEdge(List edges)
Constructs a hierarchy edge

Parameters: edges a list of real graph edges this abstraction represents

Method Detail

getGeneralPurposeVariable

public int getGeneralPurposeVariable(int layer)
Gets the value of temp for the specified layer

Parameters: layer the layer relating to a specific entry into temp

Returns: the value for that layer

getNextLayerConnectedCells

public List getNextLayerConnectedCells(int layer)
Returns the cells this cell connects to on the next layer up

Parameters: layer the layer this cell is on

Returns: the cells this cell connects to on the next layer up

getPreviousLayerConnectedCells

public List getPreviousLayerConnectedCells(int layer)
Returns the cells this cell connects to on the next layer down

Parameters: layer the layer this cell is on

Returns: the cells this cell connects to on the next layer down

invert

public void invert()
Inverts the direction of this internal edge(s)

isEdge

public boolean isEdge()

Returns: whether or not this cell is an edge

isReversed

public boolean isReversed()

Returns: Returns the isReversed.

isVertex

public boolean isVertex()

Returns: whether or not this cell is a node

setGeneralPurposeVariable

public void setGeneralPurposeVariable(int layer, int value)
Set the value of temp for the specified layer

Parameters: layer the layer relating to a specific entry into temp value the value for that layer

setReversed

public void setReversed(boolean isReversed)

Parameters: isReversed The isReversed to set.

Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.