gistoolkit.display.drawmodel
Class SimpleDrawModel

java.lang.Object
  extended bygistoolkit.display.drawmodel.SimpleDrawModel
All Implemented Interfaces:
DrawModel, java.util.EventListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener
Direct Known Subclasses:
BoxDrawModel, ClickPointModel, EditNodesDrawModel, HighlightDrawModel, NewShapeDrawModel, PanDrawModel, SelectDrawModel

public class SimpleDrawModel
extends java.lang.Object
implements DrawModel, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.KeyListener

Simple draw model, good for subclassing.


Field Summary
protected  Command myCommand
          Handle to the Command to call
protected  GISDisplay myGISDisplay
          Handle to the GISDisplay for modifying.
 
Constructor Summary
SimpleDrawModel()
          SimpleDrawModel constructor comment.
 
Method Summary
 void draw()
          The function which is called to draw the image on the map.
 GISDisplay getGISDisplay()
          Retrieves the parent GISDisplay for this draw mdoel.
 void keyPressed(java.awt.event.KeyEvent keyEvent)
          Called when a key on the keyboard is pressed
 void keyReleased(java.awt.event.KeyEvent keyEvent)
          Called when a key on the key board is released
 void keyTyped(java.awt.event.KeyEvent keyEvent)
          Called when a key on the key board is pressed and then released
 void mouseClicked(java.awt.event.MouseEvent e)
          Called when the user clicks the mouse button.
 void mouseDragged(java.awt.event.MouseEvent e)
          Invoked when the mouse button has been moved on a component (with no buttons no down).
 void mouseEntered(java.awt.event.MouseEvent e)
          Called when the user clicks the mouse button.
 void mouseExited(java.awt.event.MouseEvent e)
          Called when the user clicks the mouse button.
 void mouseMoved(java.awt.event.MouseEvent e)
          Invoked when the mouse button has been moved on a component (with no buttons no down).
 void mousePressed(java.awt.event.MouseEvent e)
          Called when the user presses the mouse button.
 void mouseReleased(java.awt.event.MouseEvent e)
          Called when the user releases the mouse butotn.
 void remove()
          Function called to indicate that this draw model will be removed.
 void reset()
          Called when the DrawModel should quit doing what it is doing and reset to the initial state
 void setCommand(Command inCommand)
          Set the command to call at the completion of this draw.
 void setGISDisplay(GISDisplay inGISDisplay)
          Sets the parent GISDisplay for this draw model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myGISDisplay

protected GISDisplay myGISDisplay
Handle to the GISDisplay for modifying.


myCommand

protected Command myCommand
Handle to the Command to call

Constructor Detail

SimpleDrawModel

public SimpleDrawModel()
SimpleDrawModel constructor comment.

Method Detail

draw

public void draw()
The function which is called to draw the image on the map.

Specified by:
draw in interface DrawModel

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Called when the user clicks the mouse button.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Invoked when the mouse button has been moved on a component (with no buttons no down).

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Called when the user clicks the mouse button.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Called when the user clicks the mouse button.

Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Invoked when the mouse button has been moved on a component (with no buttons no down).

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Called when the user presses the mouse button.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Called when the user releases the mouse butotn.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

setCommand

public void setCommand(Command inCommand)
Set the command to call at the completion of this draw.


setGISDisplay

public void setGISDisplay(GISDisplay inGISDisplay)
Sets the parent GISDisplay for this draw model.

Specified by:
setGISDisplay in interface DrawModel

getGISDisplay

public GISDisplay getGISDisplay()
Retrieves the parent GISDisplay for this draw mdoel.


remove

public void remove()
Function called to indicate that this draw model will be removed.

Specified by:
remove in interface DrawModel

reset

public void reset()
Called when the DrawModel should quit doing what it is doing and reset to the initial state

Specified by:
reset in interface DrawModel

keyPressed

public void keyPressed(java.awt.event.KeyEvent keyEvent)
Called when a key on the keyboard is pressed

Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent keyEvent)
Called when a key on the key board is released

Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent keyEvent)
Called when a key on the key board is pressed and then released

Specified by:
keyTyped in interface java.awt.event.KeyListener