edu.wpi.cs.dsrg.xmldb.xat.component.gui.utils
Class GraphManager

java.lang.Object
  |
  +--edu.wpi.cs.dsrg.xmldb.xat.component.gui.utils.GraphManager

public class GraphManager
extends java.lang.Object


Constructor Summary
GraphManager(GUI gui)
          Constructor initializes the ArrayList that holds the open JGraphs and associates the given gui with this GraphManager
 
Method Summary
 void addGraph(diva.graph.JGraph graph)
          Add the given graph to the ArrayList of open graphs.
 void drawModel(diva.graph.GraphModel model, XATQueryObject queryObject)
          Draws the given model as a new JGraph and places the graph in the graph tabbed pane.
 diva.graph.JGraph getGraph(int index)
          Returns the JGraph located at the given index.
 java.util.Iterator getGraphs()
          Returns an Iterator of all the open graphs.
 JTabbedPaneCAPE getGraphTabbedPane()
          Returns the tabbed pane that holds the open graphs.
 JTabbedPaneCAPE getStatsTabbedPane()
          Returns the tabbed pane that holds the statistic tables.
protected  java.awt.Component initializeTabbedPaneRaindrop()
          Creates an empty JTabbedPaneCAPE.
 void redrawGraph(int index)
          Redraws the graph at the given index.
 void redrawGraph(diva.graph.JGraph graph)
          Redraws the given graph using the LevelLayout in the diva package.
 void removeGraph(int index)
          Removes the graph at the given index.
 void removeGraph(diva.graph.JGraph graph)
          Removes the given graph from the ArrayList of open graphs.
 void setGraphTabbedPane(JTabbedPaneCAPE graphTabbedPane)
          Sets the graph tabbed pane to the given graphTabbedPane.
 void setStatsTabbedPane(JTabbedPaneCAPE statsTabbedPane)
          Sets the statistics tabbed pane to the given statsTabbedPane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphManager

public GraphManager(GUI gui)
Constructor initializes the ArrayList that holds the open JGraphs and associates the given gui with this GraphManager

Parameters:
gui - the GUI to associate with this GraphManager
Method Detail

addGraph

public void addGraph(diva.graph.JGraph graph)
Add the given graph to the ArrayList of open graphs.


drawModel

public void drawModel(diva.graph.GraphModel model,
                      XATQueryObject queryObject)
Draws the given model as a new JGraph and places the graph in the graph tabbed pane. The given queryObject is associated with the tab of this tree.

Parameters:
model - the graph model of the tree
queryObject - the query object to associate with the tab of this tree

getGraph

public diva.graph.JGraph getGraph(int index)
Returns the JGraph located at the given index.

Returns:
the graph at the given index

getGraphs

public java.util.Iterator getGraphs()
Returns an Iterator of all the open graphs.

Returns:
an Iterator of all the open graphs

getGraphTabbedPane

public JTabbedPaneCAPE getGraphTabbedPane()
Returns the tabbed pane that holds the open graphs.

Returns:
the tabbed pane that holds the tree graphs

getStatsTabbedPane

public JTabbedPaneCAPE getStatsTabbedPane()
Returns the tabbed pane that holds the statistic tables.

Returns:
the tabbed pane that holds the statistic tables

initializeTabbedPaneRaindrop

protected java.awt.Component initializeTabbedPaneRaindrop()
Creates an empty JTabbedPaneCAPE.

Returns:
an empty tabbed pane

redrawGraph

public void redrawGraph(diva.graph.JGraph graph)
Redraws the given graph using the LevelLayout in the diva package.

Parameters:
graph - the graph to be redrawn

redrawGraph

public void redrawGraph(int index)
Redraws the graph at the given index.


removeGraph

public void removeGraph(diva.graph.JGraph graph)
Removes the given graph from the ArrayList of open graphs.


removeGraph

public void removeGraph(int index)
Removes the graph at the given index.


setGraphTabbedPane

public void setGraphTabbedPane(JTabbedPaneCAPE graphTabbedPane)
Sets the graph tabbed pane to the given graphTabbedPane.


setStatsTabbedPane

public void setStatsTabbedPane(JTabbedPaneCAPE statsTabbedPane)
Sets the statistics tabbed pane to the given statsTabbedPane.