interactors
Class Interactor

java.lang.Object
  extended by interactors.Interactor
Direct Known Subclasses:
ConceptNeighborInteractor, ConstraintInteractor, CoordinatesInteractor, DistanceInteractor, EgenhoferInteractor, MeasurementInteractor, NeighborInteractor, NewShapeInteractor, OrientationInteractor, PickInteractor, RCC5Interactor, RCC8Interactor, RCC9Interactor, RecordingInteractor, RelationInteractor, RouteInteractor, ScaleInteractor, TopologyInteractor

public abstract class Interactor
extends java.lang.Object

All interactors must extend this abstract class.


Field Summary
protected  InteractionHandler handler
          the interaction handler
 
Constructor Summary
Interactor(InteractionHandler handler)
          Constructs an interactor.
 
Method Summary
 void draw(GL gl, GLU glu, GLUT glut)
          Called by the canvas when a repaint occurs, allowing the interactor to draw over the map.
 void endInteraction()
          Called when the interaction handler ends this interaction.
 java.awt.Cursor getCursor()
          Gets the interaction cursor.
 void keyPressed(java.awt.event.KeyEvent arg0)
          Called by the interaction handler when a key is released.
 void keyReleased(java.awt.event.KeyEvent arg0)
          Called by the interaction handler when a key is released.
 void mouseDragged(java.awt.event.MouseEvent arg0)
          Called by the interaction handler when the mouse is dragged.
 void mouseMoved(java.awt.event.MouseEvent arg0)
          Called by the interaction handler when the mouse is moved.
 void mousePressed(java.awt.event.MouseEvent arg0)
          Called by the interaction handler when a mouse button is pressed.
 void mouseReleased(java.awt.event.MouseEvent arg0)
          Called by the interaction handler when a mouse button is released.
 void startInteraction()
          Called when the interaction handler starts this interaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handler

protected InteractionHandler handler
the interaction handler

Constructor Detail

Interactor

public Interactor(InteractionHandler handler)
Constructs an interactor.

Parameters:
handler - - the interaction handler
Method Detail

getCursor

public java.awt.Cursor getCursor()
Gets the interaction cursor.


startInteraction

public void startInteraction()
Called when the interaction handler starts this interaction.


endInteraction

public void endInteraction()
Called when the interaction handler ends this interaction.


draw

public void draw(GL gl,
                 GLU glu,
                 GLUT glut)
Called by the canvas when a repaint occurs, allowing the interactor to draw over the map.


keyPressed

public void keyPressed(java.awt.event.KeyEvent arg0)
Called by the interaction handler when a key is released. The default action is to delete the currently selected object if delete is pressed.


keyReleased

public void keyReleased(java.awt.event.KeyEvent arg0)
Called by the interaction handler when a key is released.


mousePressed

public void mousePressed(java.awt.event.MouseEvent arg0)
Called by the interaction handler when a mouse button is pressed.


mouseReleased

public void mouseReleased(java.awt.event.MouseEvent arg0)
Called by the interaction handler when a mouse button is released.


mouseDragged

public void mouseDragged(java.awt.event.MouseEvent arg0)
Called by the interaction handler when the mouse is dragged.


mouseMoved

public void mouseMoved(java.awt.event.MouseEvent arg0)
Called by the interaction handler when the mouse is moved.