diva.graph.basic
Class BasicGraphController

java.lang.Object
  extended by diva.graph.AbstractGraphController
      extended by diva.graph.SimpleGraphController
          extended by diva.graph.basic.BasicGraphController
All Implemented Interfaces:
GraphController
Direct Known Subclasses:
BubbleGraphController

public class BasicGraphController
extends SimpleGraphController

A basic implementation of GraphController, which works with simple graphs that have edges connecting simple nodes. It sets up some simple interaction on its view's pane.

Version:
$Id: BasicGraphController.java 47480 2007-12-06 18:25:06Z cxh $
Author:
Michael Shilman
Accepted Rating:
Red

Nested Class Summary
protected  class BasicGraphController.NodeCreator
          An inner class that places a node at the clicked-on point on the screen, if control-clicked with mouse button 1.
 
Field Summary
private  MouseFilter _controlFilter
          The filter for control operations
private  EdgeCreator _edgeCreator
          The interactor that interactively creates edges
private  int _globalCount
          The global count for the default node/edge creation.
private  BasicGraphController.NodeCreator _nodeCreator
          The interactor for creating new nodes
private  SelectionDragger _selectionDragger
          The selection interactor for drag-selecting nodes
 
Constructor Summary
BasicGraphController()
          Create a new basic controller with default node and edge controllers.
 
Method Summary
protected  void initializeInteraction()
          Initialize all interaction on the graph pane.
 
Methods inherited from class diva.graph.SimpleGraphController
getEdgeController, getEdgeController, getNodeController, getNodeController, setEdgeController, setNodeController
 
Methods inherited from class diva.graph.AbstractGraphController
addEdge, addEdge, addGraphViewListener, addNode, addNode, addNode, addNode, clear, clearEdge, clearNode, dispatch, drawEdge, drawNode, drawNode, getFigure, getGraphModel, getGraphPane, getSelectionModel, removeEdge, removeGraphViewListener, removeNode, rerender, rerenderEdge, rerenderNode, setFigure, setGraphModel, setGraphPane, setSelectionModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_globalCount

private int _globalCount
The global count for the default node/edge creation.


_selectionDragger

private SelectionDragger _selectionDragger
The selection interactor for drag-selecting nodes


_nodeCreator

private BasicGraphController.NodeCreator _nodeCreator
The interactor for creating new nodes


_edgeCreator

private EdgeCreator _edgeCreator
The interactor that interactively creates edges


_controlFilter

private MouseFilter _controlFilter
The filter for control operations

Constructor Detail

BasicGraphController

public BasicGraphController()
Create a new basic controller with default node and edge controllers.

Method Detail

initializeInteraction

protected void initializeInteraction()
Initialize all interaction on the graph pane. This method is called by the setGraphPane() method of the superclass. This initialization cannot be done in the constructor because the controller does not yet have a reference to its pane at that time.

Specified by:
initializeInteraction in class AbstractGraphController