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

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

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

This is the ancestor of all the behavior classes, which gather information about mouse events and notify tool-dependent events. For example, if the info-by-point tool is active, drag events are not relevant, so the behavior object does not have to notify about the mousedragged events. If the active tool is the zoom by rextangle, when the user lifts the mouse, a special event has to be notified, which will include bot the starting and the final point.

Author:
jldominguez
See Also:
ToolListener

Constructor Summary
Behavior()
           
 
Method Summary
 java.awt.Cursor getCursor()
          gets the default cursor icon to be used (makes sense when the app runs on a PC)
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Behavior

public Behavior()
Method Detail

getCursor

public java.awt.Cursor getCursor()
gets the default cursor icon to be used (makes sense when the app runs on a PC)

Returns:
the default cursor icon to be used when this tool is active.

mouseClicked

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

mousePressed

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

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

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

mouseExited

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

mouseDragged

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

mouseMoved

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