gistoolkit.display.drawmodel
Class SelectPointsModel

java.lang.Object
  extended bygistoolkit.display.drawmodel.SimpleDrawModel
      extended bygistoolkit.display.drawmodel.SelectDrawModel
          extended bygistoolkit.display.drawmodel.SelectPointsModel
All Implemented Interfaces:
DrawModel, java.util.EventListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

public class SelectPointsModel
extends SelectDrawModel

Handles the selection of multiple objects from the currently selected layer.


Field Summary
 
Fields inherited from class gistoolkit.display.drawmodel.SelectDrawModel
mySelectedRecords
 
Fields inherited from class gistoolkit.display.drawmodel.SimpleDrawModel
myCommand, myGISDisplay
 
Constructor Summary
SelectPointsModel()
          Creates new SelectDrawModel
SelectPointsModel(Command inCommand)
          Creates new SelectDrawModel
 
Method Summary
 void draw()
          Draws the box on the screen, calls the draw in the super class to draw the shapes.
 void fireRecordDeselected(Record tempRecord)
          sends the notification if the record is Deselected.
 void fireRecordSelected(Record tempRecord)
          sends the notification if the record is selected.
 void keyPressed(java.awt.event.KeyEvent inKeyEvent)
          Called when a key is pressed
 void mouseDragged(java.awt.event.MouseEvent e)
          If the mouse is dragged, then move the last point.
 void mouseMoved(java.awt.event.MouseEvent e)
          Handle the selection when the mouse is moved
 void mousePressed(java.awt.event.MouseEvent e)
          If the user presses the mouse button, then add the point to the list of points.
 void mouseReleased(java.awt.event.MouseEvent e)
          Called when the user releases the mouse butotn.
 void reset()
          Reset the display
 
Methods inherited from class gistoolkit.display.drawmodel.SelectDrawModel
add, fireRecordsDeselected, fireRecordsSelected, getNear, getSelectedLayer, getSelectedRecords, remove, setSelectedLayer, setSelectedRecords, setSelectedRecordsNoNotify
 
Methods inherited from class gistoolkit.display.drawmodel.SimpleDrawModel
getGISDisplay, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, remove, setCommand, setGISDisplay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectPointsModel

public SelectPointsModel()
Creates new SelectDrawModel


SelectPointsModel

public SelectPointsModel(Command inCommand)
Creates new SelectDrawModel

Method Detail

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
If the user presses the mouse button, then add the point to the list of points.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class SimpleDrawModel

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
If the mouse is dragged, then move the last point.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Overrides:
mouseDragged in class SimpleDrawModel

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Called when the user releases the mouse butotn. Causes the display to keep the currently selected shape selected.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class SimpleDrawModel

draw

public void draw()
Draws the box on the screen, calls the draw in the super class to draw the shapes.

Specified by:
draw in interface DrawModel
Overrides:
draw in class SelectDrawModel

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Handle the selection when the mouse is moved

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Overrides:
mouseMoved in class SimpleDrawModel

fireRecordSelected

public void fireRecordSelected(Record tempRecord)
sends the notification if the record is selected.


fireRecordDeselected

public void fireRecordDeselected(Record tempRecord)
sends the notification if the record is Deselected.


keyPressed

public void keyPressed(java.awt.event.KeyEvent inKeyEvent)
Called when a key is pressed

Specified by:
keyPressed in interface java.awt.event.KeyListener
Overrides:
keyPressed in class SimpleDrawModel

reset

public void reset()
Reset the display

Specified by:
reset in interface DrawModel
Overrides:
reset in class SelectDrawModel