public interface GlobalMouseDispatcher
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 Component
s
to it. Any DockStation
forwards its events to this class.Modifier and Type | Method and Description |
---|---|
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
Component s 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. |
void dispatch(MouseEvent event)
Component
s 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 MouseListener
s.event
- the event to forwardvoid addMouseListener(MouseListener listener)
listener
to this dispatcher.listener
- the new listener, not null
void removeMouseListener(MouseListener listener)
listener
from this dispacher.listener
- the listener to removevoid addMouseMotionListener(MouseMotionListener listener)
listener
to this dispatcher.listener
- the new listener, not null
void removeMouseMotionListener(MouseMotionListener listener)
listener
from this dispacher.listener
- the listener to removevoid addMouseWheelListener(MouseWheelListener listener)
listener
to this dispatcher.listener
- the new listener, not null
void removeMouseWheelListener(MouseWheelListener listener)
listener
from this dispacher.listener
- the listener to removevoid kill()