gistoolkit.display.drawmodel
Class BoxDrawModel

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

public class BoxDrawModel
extends SimpleDrawModel

A model used for highlighting features on the map as the pointer is moved over it. Creation date: (4/18/2001 3:20:16 PM)


Field Summary
 
Fields inherited from class gistoolkit.display.drawmodel.SimpleDrawModel
myCommand, myGISDisplay
 
Constructor Summary
BoxDrawModel()
          HighlightDrawModel constructor comment.
BoxDrawModel(Command inCommand)
          HighlightDrawModel constructor comment.
 
Method Summary
 void draw()
          The function which is called to draw the image on the map.
 Envelope getEnvelope()
          Retrieves the Envelope associated with the box.
 java.awt.Rectangle getRectangle()
          Retrieves the rectangle drawn on the screen.
 void mouseDragged(java.awt.event.MouseEvent e)
          Called when the user releases the mouse button.
 void mousePressed(java.awt.event.MouseEvent e)
          Called when the user presses the mouse butotn.
 void mouseReleased(java.awt.event.MouseEvent e)
          Called when the user releases the mouse butotn.
 void reset()
          Reset the position of the display
 void setRectangle(java.awt.Rectangle inRectangle)
          Set the rectangle to use.
 
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

BoxDrawModel

public BoxDrawModel()
HighlightDrawModel constructor comment.


BoxDrawModel

public BoxDrawModel(Command inCommand)
HighlightDrawModel 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
Overrides:
draw in class SimpleDrawModel

getEnvelope

public Envelope getEnvelope()
Retrieves the Envelope associated with the box. Converts the rectangle drawn on the screen to a valid box. If this is not a valid rectangle, then it will return null.


getRectangle

public java.awt.Rectangle getRectangle()
Retrieves the rectangle drawn on the screen.


mouseDragged

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

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

mousePressed

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

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

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
Overrides:
mouseReleased in class SimpleDrawModel

setRectangle

public void setRectangle(java.awt.Rectangle inRectangle)
Set the rectangle to use.


reset

public void reset()
Reset the position of the display

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