shp_renderer.events
Class SHPMapSelectHandler

java.lang.Object
  extended by shp_renderer.events.SHPMapSelectHandler
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener

public class SHPMapSelectHandler
extends java.lang.Object
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener


Constructor Summary
SHPMapSelectHandler(SHPViewer initViewer)
          This constructor just saves the app for later.
 
Method Summary
 void mouseClicked(java.awt.event.MouseEvent me)
          Double mouse clicks means the user wants to zoom in or out, depending on whether the left or right mouse button was used.
 void mouseDragged(java.awt.event.MouseEvent me)
          Here's where we either move the viewport or use the zoom lasso.
 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)
          This method records all mouse press events because if it's a left mouse click it means we may need to start the zoom lasso, if it's a right mouse click it means we may need to start dragging the viewport around.
 void mouseReleased(java.awt.event.MouseEvent me)
          Here we respond to the user releasing the mouse button.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SHPMapSelectHandler

public SHPMapSelectHandler(SHPViewer initViewer)
This constructor just saves the app for later.

Parameters:
initViewer - The viewer to be updated.
Method Detail

mousePressed

public void mousePressed(java.awt.event.MouseEvent me)
This method records all mouse press events because if it's a left mouse click it means we may need to start the zoom lasso, if it's a right mouse click it means we may need to start dragging the viewport around. These two things would happen if this mouse press event were followed by a mouse dragged event.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
me - Has all the information about the mouse.

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent me)
Here we respond to the user releasing the mouse button. When this happens we may need to zoom, or stop moving the viewport.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
me - Has all the information about the mouse.

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent me)
Here's where we either move the viewport or use the zoom lasso.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Parameters:
me - Has all the information about the mouse.

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent me)
Double mouse clicks means the user wants to zoom in or out, depending on whether the left or right mouse button was used.

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Parameters:
me - Has all the information about the mouse.

mouseEntered

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

mouseExited

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

mouseMoved

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