|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.gui.graphvisualizer.HierarchicalBCEngine
This class lays out the vertices of a graph in a hierarchy of vertical levels, with a number of nodes in each level. The number of levels is the depth of the deepest child reachable from some parent at level 0. It implements a layout technique as described by K. Sugiyama, S. Tagawa, and M. Toda. in "Methods for visual understanding of hierarchical systems", IEEE Transactions on Systems, Man and Cybernetics, SMC-11(2):109-125, Feb. 1981.
There have been a few modifications made, however. The crossings function is changed as it was non-linear in time complexity. Furthermore, we don't have any interconnection matrices for each level, instead we just have one big interconnection matrix for the whole graph and a int[][] array which stores the vertices present in each level.
Field Summary |
Fields inherited from interface weka.gui.graphvisualizer.GraphConstants |
DIRECTED, DOUBLE, NORMAL, PLURAL_DUMMY, REVERSED, SINGULAR_DUMMY |
Constructor Summary | |
HierarchicalBCEngine()
SimpleConstructor If we want to instantiate the class first, and if information for nodes and edges is not available. |
|
HierarchicalBCEngine(FastVector nodes,
FastVector edges,
int nodeWidth,
int nodeHeight)
Constructor - takes in FastVectors of nodes and edges, and the initial width and height of a node |
|
HierarchicalBCEngine(FastVector nodes,
FastVector edges,
int nodeWidth,
int nodeHeight,
boolean edgeConcentration)
Constructor - takes in FastVectors of nodes and edges, the initial width and height of a node, and a boolean value to indicate if the edges should be concentrated. |
Method Summary | |
void |
addLayoutCompleteEventListener(LayoutCompleteEventListener l)
Method to add a LayoutCompleteEventListener |
void |
fireLayoutCompleteEvent(LayoutCompleteEvent e)
Fires a LayoutCompleteEvent. |
javax.swing.JPanel |
getControlPanel()
This method returns a handle to the extra controls panel, so that the visualizing class can add it to some of it's own gui panel. |
javax.swing.JProgressBar |
getProgressBar()
Returns a handle to the progressBar of this LayoutEngine. |
void |
layoutGraph()
This method does a complete layout of the graph which includes removing cycles, assigning levels to nodes, reducing edge crossings and laying out the vertices horizontally for better visibility. |
void |
phaseIID(int lindex,
int[][] levels)
See Sugiyama et al. |
void |
phaseIIU(int lindex,
int[][] levels)
See Sugiyama et al. |
void |
phaseIU(int lindex,
int[][] levels)
See Sugiyama et al. |
void |
removeLayoutCompleteEventListener(LayoutCompleteEventListener e)
Method to remove a LayoutCompleteEventListener. |
void |
setNodesEdges(FastVector nodes,
FastVector edges)
Sets the nodes and edges for this LayoutEngine. |
void |
setNodeSize(int nodeWidth,
int nodeHeight)
Sets the size of a node. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HierarchicalBCEngine(FastVector nodes, FastVector edges, int nodeWidth, int nodeHeight)
public HierarchicalBCEngine(FastVector nodes, FastVector edges, int nodeWidth, int nodeHeight, boolean edgeConcentration)
nodes
- - FastVector containing all the nodesedges
- - FastVector containing all the edgesnodeWidth
- - A node's allowed widthnodeHeight
- - A node's allowed heightedgeConcentration
- - True: if want to concentrate edges, False: otherwisepublic HierarchicalBCEngine()
Method Detail |
public javax.swing.JPanel getControlPanel()
getControlPanel
in interface LayoutEngine
public javax.swing.JProgressBar getProgressBar()
getProgressBar
in interface LayoutEngine
public void setNodesEdges(FastVector nodes, FastVector edges)
setNodesEdges
in interface LayoutEngine
nodes
- - FastVector containing all the nodesedges
- - FastVector containing all the edgespublic void setNodeSize(int nodeWidth, int nodeHeight)
setNodeSize
in interface LayoutEngine
nodeWidth
- - A node's allowed widthnodeHeight
- - A node's allowed heightpublic void addLayoutCompleteEventListener(LayoutCompleteEventListener l)
addLayoutCompleteEventListener
in interface LayoutEngine
l
- - Listener to receive the LayoutCompleteEvent by this
class.public void removeLayoutCompleteEventListener(LayoutCompleteEventListener e)
removeLayoutCompleteEventListener
in interface LayoutEngine
e
- - The LayoutCompleteEventListener to remove.public void fireLayoutCompleteEvent(LayoutCompleteEvent e)
fireLayoutCompleteEvent
in interface LayoutEngine
e
- - The LayoutCompleteEvent to firepublic void layoutGraph()
The layout is performed in a separate thread and the progress bar of the class is updated for each of the steps as the process continues.
layoutGraph
in interface LayoutEngine
public void phaseIU(int lindex, int[][] levels)
public void phaseIID(int lindex, int[][] levels)
public void phaseIIU(int lindex, int[][] levels)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London