JIDE 3.5.15

com.jidesoft.chart.event
Class MouseEventManager

java.lang.Object
  extended by com.jidesoft.chart.event.MouseEventManager
All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener, EventListener

public class MouseEventManager
extends Object
implements MouseListener, MouseMotionListener, MouseWheelListener

The idea of this class is to make it possible to combine the effect of multiple mouse handlers. Individual mouse handlers need to implement the MouseListener and MouseMotionListener interfaces, as well as provide the additional methods defined by MouseHandler.

The handlers are added to an instance of this class in the order in which they should be invoked. If a handler has dealt with the event then it should set its handled property to be true so that no further handlers will be notified of the event; otherwise the same event will be passed to all the known handlers for processing.

Author:
Simon White (swhite@catalysoft.com)

Constructor Summary
MouseEventManager()
           
 
Method Summary
 MouseEventManager addHandler(MouseHandler handler)
          Adds a handler to the list of maintained handlers and returns this instance so that invocations can be chained.
 void mouseClicked(MouseEvent e)
           
 void mouseDragged(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mouseMoved(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void mouseWheelMoved(MouseWheelEvent e)
           
 void removeHandler(MouseHandler handler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseEventManager

public MouseEventManager()
Method Detail

addHandler

public MouseEventManager addHandler(MouseHandler handler)
Adds a handler to the list of maintained handlers and returns this instance so that invocations can be chained.

Parameters:
handler - the handler to add
Returns:
this instance

removeHandler

public void removeHandler(MouseHandler handler)

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

mouseDragged

public void mouseDragged(MouseEvent e)
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Specified by:
mouseMoved in interface MouseMotionListener

mouseWheelMoved

public void mouseWheelMoved(MouseWheelEvent e)
Specified by:
mouseWheelMoved in interface MouseWheelListener

JIDE 3.5.15