gistoolkit.display.drawmodel
Class SelectDrawModel

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

public class SelectDrawModel
extends SimpleDrawModel

Super class for handling selections from the interface.


Field Summary
 Record[] mySelectedRecords
          These are the selected records.
 
Fields inherited from class gistoolkit.display.drawmodel.SimpleDrawModel
myCommand, myGISDisplay
 
Constructor Summary
SelectDrawModel()
          Creates new SelectDrawModel
 
Method Summary
 void add(SelectDrawModelListener inListener)
          Adds the Listeners interest to events from this HighlightDrawModel.
 void draw()
          Draw the selected records
protected  void fireRecordsDeselected(Record[] inRecords)
          Notifies the listener that a record was Deselected.
protected  void fireRecordsSelected(Record[] inRecords)
          Notifies the listener that a record was selected.
protected  Record getNear(Layer inLayer, Point inPoint, double inDistance)
          Loops through the layer to find an object near this point
 Layer getSelectedLayer()
          Get the currently selected layer
 Record[] getSelectedRecords()
          Get the currently selected records.
 void remove(SelectDrawModelListener inListener)
          Removes this listener from the list of listeners interested in events from this HighlightDrawModel.
 void reset()
          Reset the display
 void setSelectedLayer(Layer inLayer)
          Set the currently selected layer
 void setSelectedRecords(Record[] inSelectedRecords)
          Set the currently selected records.
 void setSelectedRecordsNoNotify(Record[] inSelectedRecords)
          Set the currently selected records, and do not notify the listeners of the event.
 
Methods inherited from class gistoolkit.display.drawmodel.SimpleDrawModel
getGISDisplay, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, remove, setCommand, setGISDisplay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mySelectedRecords

public Record[] mySelectedRecords
These are the selected records.

Constructor Detail

SelectDrawModel

public SelectDrawModel()
Creates new SelectDrawModel

Method Detail

add

public void add(SelectDrawModelListener inListener)
Adds the Listeners interest to events from this HighlightDrawModel.


remove

public void remove(SelectDrawModelListener inListener)
Removes this listener from the list of listeners interested in events from this HighlightDrawModel.


fireRecordsDeselected

protected void fireRecordsDeselected(Record[] inRecords)
Notifies the listener that a record was Deselected.


fireRecordsSelected

protected void fireRecordsSelected(Record[] inRecords)
Notifies the listener that a record was selected.


getSelectedRecords

public Record[] getSelectedRecords()
Get the currently selected records.


setSelectedRecordsNoNotify

public void setSelectedRecordsNoNotify(Record[] inSelectedRecords)
Set the currently selected records, and do not notify the listeners of the event.


setSelectedRecords

public void setSelectedRecords(Record[] inSelectedRecords)
Set the currently selected records.


setSelectedLayer

public void setSelectedLayer(Layer inLayer)
Set the currently selected layer


getSelectedLayer

public Layer getSelectedLayer()
Get the currently selected layer


draw

public void draw()
Draw the selected records

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

getNear

protected Record getNear(Layer inLayer,
                         Point inPoint,
                         double inDistance)
Loops through the layer to find an object near this point


reset

public void reset()
Reset the display

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