bibliothek.gui.dock.control
Interface GlobalMouseDispatcher

All Known Implementing Classes:
DefaultGlobalMouseDispatcher

public interface GlobalMouseDispatcher

The GlobalMouseDispatcher is used to keep track of the location of mouse on the screen. In a normal desktop application this is equivalent of installing an AWTEventListener. In a secure environment the GlobalMouseDispatcher is restricted to register events that are forwarded by Components to it. Any DockStation forwards its events to this class.

Author:
Benjamin Sigg

Method Summary
 void addMouseListener(MouseListener listener)
          Adds the observer listener to this dispatcher.
 void addMouseMotionListener(MouseMotionListener listener)
          Adds the observer listener to this dispatcher.
 void addMouseWheelListener(MouseWheelListener listener)
          Adds the observer listener to this dispatcher.
 void dispatch(MouseEvent event)
          Called by various Components when they register a MouseEvent.
 void kill()
          Releases any resources this dispatcher holds.
 void removeMouseListener(MouseListener listener)
          Removes the observer listener from this dispacher.
 void removeMouseMotionListener(MouseMotionListener listener)
          Removes the observer listener from this dispacher.
 void removeMouseWheelListener(MouseWheelListener listener)
          Removes the observer listener from this dispacher.
 

Method Detail

dispatch

void dispatch(MouseEvent event)
Called by various Components when they register a MouseEvent. Calls to this method are only necessary when in a restricted environment. The GlobalMouseDispatcher may filter the events, but usually the event is forwarded to all registered MouseListeners.

Parameters:
event - the event to forward

addMouseListener

void addMouseListener(MouseListener listener)
Adds the observer listener to this dispatcher.

Parameters:
listener - the new listener, not null

removeMouseListener

void removeMouseListener(MouseListener listener)
Removes the observer listener from this dispacher.

Parameters:
listener - the listener to remove

addMouseMotionListener

void addMouseMotionListener(MouseMotionListener listener)
Adds the observer listener to this dispatcher.

Parameters:
listener - the new listener, not null

removeMouseMotionListener

void removeMouseMotionListener(MouseMotionListener listener)
Removes the observer listener from this dispacher.

Parameters:
listener - the listener to remove

addMouseWheelListener

void addMouseWheelListener(MouseWheelListener listener)
Adds the observer listener to this dispatcher.

Parameters:
listener - the new listener, not null

removeMouseWheelListener

void removeMouseWheelListener(MouseWheelListener listener)
Removes the observer listener from this dispacher.

Parameters:
listener - the listener to remove

kill

void kill()
Releases any resources this dispatcher holds.