gistoolkit.display.drawmodel
Class SelectBoxModel

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

public class SelectBoxModel
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
SelectBoxModel()
          Creates new SelectDrawModel
SelectBoxModel(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 mouseDragged(java.awt.event.MouseEvent e)
          As the user draws a rectangle, the selected objects will be displayed.
 void mousePressed(java.awt.event.MouseEvent e)
          If the user moves the mouse, then set the first point
 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, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved, remove, setCommand, setGISDisplay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectBoxModel

public SelectBoxModel()
Creates new SelectDrawModel


SelectBoxModel

public SelectBoxModel(Command inCommand)
Creates new SelectDrawModel

Method Detail

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
If the user moves the mouse, then set the first point

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

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
As the user draws a rectangle, the selected objects will be displayed.

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

reset

public void reset()
Reset the display

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