diva.graph
Class EdgeCreator

java.lang.Object
  extended by diva.canvas.interactor.AbstractInteractor
      extended by diva.graph.EdgeCreator
All Implemented Interfaces:
LayerListener, LayerMotionListener, Interactor, java.util.EventListener

public abstract class EdgeCreator
extends AbstractInteractor

An interactor that interactively drags edges from one node to another.

Version:
$Id: EdgeCreator.java 38798 2005-07-08 20:00:01Z cxh $
Author:
Steve Neuendorffer
Accepted Rating:
Red

Field Summary
(package private)  GraphController _controller
           
 
Constructor Summary
EdgeCreator(GraphController controller)
           
 
Method Summary
abstract  java.lang.Object createEdge()
          Create a new Edge.
 void mousePressed(LayerEvent e)
          Create a new edge, add it to the graph controller and add the connector to the selection.
 
Methods inherited from class diva.canvas.interactor.AbstractInteractor
accept, getMouseFilter, isConsuming, isEnabled, isMotionEnabled, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseReleased, setConsuming, setEnabled, setMotionEnabled, setMouseFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_controller

GraphController _controller
Constructor Detail

EdgeCreator

public EdgeCreator(GraphController controller)
Method Detail

mousePressed

public void mousePressed(LayerEvent e)
Create a new edge, add it to the graph controller and add the connector to the selection.

Specified by:
mousePressed in interface LayerListener
Overrides:
mousePressed in class AbstractInteractor

createEdge

public abstract java.lang.Object createEdge()
Create a new Edge. Subclasses should implement this method to create an object that is consistent with the graphmodel being used.