|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EventDispatcher
Interface for receiving and dispatching events down to a GVT tree.
Mouse events are dispatched to their "containing" node (the GraphicsNode corresponding to the mouse event coordinate). Searches for containment are performed from the EventDispatcher's "root" node.
Method Summary | |
---|---|
void |
addGraphicsNodeKeyListener(GraphicsNodeKeyListener l)
Adds the specified 'global' GraphicsNodeKeyListener which is notified of all KeyEvents dispatched. |
void |
addGraphicsNodeMouseListener(GraphicsNodeMouseListener l)
Adds the specified 'global' GraphicsNodeMouseListener which is notified of all MouseEvents dispatched. |
void |
addGraphicsNodeMouseWheelListener(GraphicsNodeMouseWheelListener l)
Adds the specified 'global' GraphicsNodeMouseWheelListener which is notified of all MouseWheelEvents dispatched. |
void |
dispatchEvent(EventObject e)
Dispatched the specified event object. |
AffineTransform |
getBaseTransform()
Returns the base transform applied to MouseEvent coordinates prior to dispatch. |
EventListener[] |
getListeners(Class listenerType)
Returns an array of listeners that were added to this event dispatcher and of the specified type. |
GraphicsNode |
getRootNode()
Returns the root node for MouseEvent dispatch containment searches and field selections. |
void |
removeGraphicsNodeKeyListener(GraphicsNodeKeyListener l)
Removes the specified 'global' GraphicsNodeKeyListener which is notified of all KeyEvents dispatched. |
void |
removeGraphicsNodeMouseListener(GraphicsNodeMouseListener l)
Removes the specified 'global' GraphicsNodeMouseListener which is notified of all MouseEvents dispatched. |
void |
removeGraphicsNodeMouseWheelListener(GraphicsNodeMouseWheelListener l)
Removes the specified 'global' GraphicsNodeMouseWheelListener which is notified of all MouseWheelEvents dispatched. |
void |
setBaseTransform(AffineTransform t)
Sets the base transform applied to MouseEvent coordinates prior to dispatch. |
void |
setNodeDecrementEvent(InputEvent e)
Associates all InputEvents of type e.getID() with "decrementing" of the currently selected GraphicsNode. |
void |
setNodeIncrementEvent(InputEvent e)
Associates all InputEvents of type e.getID() with "incrementing" of the currently selected GraphicsNode. |
void |
setRootNode(GraphicsNode root)
Sets the root node for MouseEvent dispatch containment searches and field selections. |
Method Detail |
---|
void setRootNode(GraphicsNode root)
root
- the root nodeGraphicsNode getRootNode()
void setBaseTransform(AffineTransform t)
t
- the affine transformAffineTransform getBaseTransform()
void dispatchEvent(EventObject e)
Converts the EventObject to a corresponding GraphicsNodeEvent and dispatch it to the appropriate GraphicsNode(s). If the event is a MouseEvent the dispatch is performed to each GraphicsNode which contains the MouseEvent coordinate, until the event is consumed. If the event is a KeyEvent, it is dispatched to the currently selected GraphicsNode.
e
- the event to dispatchvoid addGraphicsNodeMouseListener(GraphicsNodeMouseListener l)
l
- the listener to addvoid removeGraphicsNodeMouseListener(GraphicsNodeMouseListener l)
l
- the listener to removevoid addGraphicsNodeMouseWheelListener(GraphicsNodeMouseWheelListener l)
l
- the listener to addvoid removeGraphicsNodeMouseWheelListener(GraphicsNodeMouseWheelListener l)
l
- the listener to removevoid addGraphicsNodeKeyListener(GraphicsNodeKeyListener l)
l
- the listener to addvoid removeGraphicsNodeKeyListener(GraphicsNodeKeyListener l)
l
- the listener to removeEventListener[] getListeners(Class listenerType)
listenerType
- the type of the listeners to returnvoid setNodeIncrementEvent(InputEvent e)
void setNodeDecrementEvent(InputEvent e)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |