es.prodevelop.gvsig.mobile.gui.tool.behavior
Class PointBehavior

java.lang.Object
  extended byes.prodevelop.gvsig.mobile.gui.tool.behavior.Behavior
      extended byes.prodevelop.gvsig.mobile.gui.tool.behavior.PointBehavior
All Implemented Interfaces:
java.util.EventListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

public class PointBehavior
extends Behavior

This behavior class notifies point events only, si it's useful for point-oriented tools (centter on point, info, etc.)

Author:
jldominguez
See Also:
PointToolListener

Constructor Summary
PointBehavior(PointToolListener l)
          Constructor.
 
Method Summary
 java.awt.Cursor getCursor()
          Overriden method, in case the listener needs to set another cursor while its tool is active.
 PointToolListener getListener()
          Gets the current listener, which will be notified when point events occur.
 void mouseDragged(java.awt.event.MouseEvent e)
          This behavior class creates a relevant event for point events and notifies the current listener.
 void mousePressed(java.awt.event.MouseEvent e)
          This behavior class creates a relevant event for point events and notifies the current listener.
 void mouseReleased(java.awt.event.MouseEvent e)
          This behavior class creates a relevant event for point events and notifies the current listener.
 
Methods inherited from class es.prodevelop.gvsig.mobile.gui.tool.behavior.Behavior
mouseClicked, mouseEntered, mouseExited, mouseMoved
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointBehavior

public PointBehavior(PointToolListener l)
Constructor.

Parameters:
l - the listener, which will be notified when point events occur.
Method Detail

getListener

public PointToolListener getListener()
Gets the current listener, which will be notified when point events occur.

Returns:

getCursor

public java.awt.Cursor getCursor()
Overriden method, in case the listener needs to set another cursor while its tool is active.

Overrides:
getCursor in class Behavior
Returns:
the cursor to be used when the associated tool is active.

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
This behavior class creates a relevant event for point events and notifies the current listener.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class Behavior
Parameters:
e - the mouse event generated by the user on the map

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
This behavior class creates a relevant event for point events and notifies the current listener.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class Behavior
Parameters:
e - the mouse event generated by the user on the map

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
This behavior class creates a relevant event for point events and notifies the current listener.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Overrides:
mouseDragged in class Behavior
Parameters:
e - the mouse event generated by the user on the map