com.jidesoft.chart.event
Class MouseEventManager
java.lang.Object
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)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MouseEventManager
public MouseEventManager()
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