gistoolkit.server.mapclient.drawer
Class BasicDrawer

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

public abstract class BasicDrawer
extends java.lang.Object
implements Drawer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.KeyListener

Basic drawer allows subclassing by other drawers.


Constructor Summary
BasicDrawer()
          Creates new BasicDrawer
 
Method Summary
protected  void draw()
          Causes a redraw from the image panel
abstract  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
 Command getCommand()
          Retrieve the Command from the Drawer
 ImagePanel getImagePanel()
          Retrieve the image panel from the drawer
 void keyPressed(java.awt.event.KeyEvent ke)
           
 void keyReleased(java.awt.event.KeyEvent ke)
          Keyboard Messages
 void keyTyped(java.awt.event.KeyEvent ke)
           
 void mouseClicked(java.awt.event.MouseEvent me)
           
 void mouseDragged(java.awt.event.MouseEvent me)
           
 void mouseEntered(java.awt.event.MouseEvent me)
           
 void mouseExited(java.awt.event.MouseEvent me)
           
 void mouseMoved(java.awt.event.MouseEvent me)
           
 void mousePressed(java.awt.event.MouseEvent me)
           
 void mouseReleased(java.awt.event.MouseEvent me)
          Mouse Methods
 void reset()
          Reset the state of this draw model
 void setCommand(Command inCommand)
          Set the command into the Drawer to be executed on completion
 void setImagePanel(ImagePanel inImagePanel)
          Set the ImagePanel in the drawer so it can be updated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicDrawer

public BasicDrawer()
Creates new BasicDrawer

Method Detail

getImagePanel

public ImagePanel getImagePanel()
Retrieve the image panel from the drawer


setImagePanel

public void setImagePanel(ImagePanel inImagePanel)
Set the ImagePanel in the drawer so it can be updated

Specified by:
setImagePanel in interface Drawer

getCommand

public Command getCommand()
Retrieve the Command from the Drawer


setCommand

public void setCommand(Command inCommand)
Set the command into the Drawer to be executed on completion


draw

protected void draw()
Causes a redraw from the image panel


draw

public abstract 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

reset

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


mouseReleased

public void mouseReleased(java.awt.event.MouseEvent me)
Mouse Methods

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent me)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent me)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent me)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent me)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent me)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent me)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent ke)
Keyboard Messages

Specified by:
keyReleased in interface java.awt.event.KeyListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent ke)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent ke)
Specified by:
keyTyped in interface java.awt.event.KeyListener