gistoolkit.server.mapclient.drawer
Class BoxDrawer

java.lang.Object
  extended bygistoolkit.server.mapclient.drawer.BasicDrawer
      extended bygistoolkit.server.mapclient.drawer.BoxDrawer
All Implemented Interfaces:
Drawer, java.util.EventListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

public class BoxDrawer
extends BasicDrawer

Draws a box on the screen.


Constructor Summary
BoxDrawer()
          Creates new BoxDrawer
 
Method Summary
 void draw(java.awt.Graphics inGraphics, java.awt.Image inImage, java.awt.image.ImageObserver inImageObserver)
          Draw the image on the screen
 void draw(java.awt.Graphics inGraphics, java.awt.Image inImage, int inWidth, int inHeight, java.awt.image.ImageObserver inImageObserver)
          Draw the image on the screen
 java.awt.Color getBoxColor()
          Retrieves the color the box will be drawn
 java.awt.Point getEndPoint()
          Retrieve the ending point of the drag in screen coordinates
 java.awt.Point getStartPoint()
          Retrieve the starting point of the drag in screen coordinates
 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 releases the mouse butotn.
 void mouseReleased(java.awt.event.MouseEvent e)
          Called when the user releases the mouse butotn.
 void reset()
          Reset the state of this draw model
 void setBoxColor(java.awt.Color inColor)
          Set the color to draw the box
 
Methods inherited from class gistoolkit.server.mapclient.drawer.BasicDrawer
draw, getCommand, getImagePanel, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved, setCommand, setImagePanel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoxDrawer

public BoxDrawer()
Creates new BoxDrawer

Method Detail

getBoxColor

public java.awt.Color getBoxColor()
Retrieves the color the box will be drawn


setBoxColor

public void setBoxColor(java.awt.Color inColor)
Set the color to draw the box


getStartPoint

public java.awt.Point getStartPoint()
Retrieve the starting point of the drag in screen coordinates


getEndPoint

public java.awt.Point getEndPoint()
Retrieve the ending point of the drag in screen coordinates


draw

public void draw(java.awt.Graphics inGraphics,
                 java.awt.Image inImage,
                 int inWidth,
                 int inHeight,
                 java.awt.image.ImageObserver inImageObserver)
Draw the image on the screen

Specified by:
draw in interface Drawer
Specified by:
draw in class BasicDrawer

reset

public void reset()
Reset the state of this draw model

Overrides:
reset in class BasicDrawer

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 BasicDrawer

mousePressed

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

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

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 BasicDrawer

draw

public void draw(java.awt.Graphics inGraphics,
                 java.awt.Image inImage,
                 java.awt.image.ImageObserver inImageObserver)
Draw the image on the screen