org.apache.batik.bridge
protected static class BridgeEventSupport.Listener extends Object implements GraphicsNodeMouseListener, GraphicsNodeKeyListener
Field Summary | |
---|---|
protected BridgeContext | context |
protected boolean | isDown |
protected Element | lastTargetElement |
protected UserAgent | ua |
Constructor Summary | |
---|---|
Listener(BridgeContext ctx, UserAgent u) |
Method Summary | |
---|---|
protected void | dispatchKeyEvent(String eventType, GraphicsNodeKeyEvent evt)
Dispatch a DOM 2 Draft Key event. |
protected void | dispatchMouseEvent(String eventType, GraphicsNodeMouseEvent evt, boolean cancelable)
Dispatches a DOM MouseEvent according to the specified
parameters.
|
protected void | dispatchMouseEvent(String eventType, Element targetElement, Element relatedElement, Point clientXY, GraphicsNodeMouseEvent evt, boolean cancelable)
Dispatches a DOM MouseEvent according to the specified
parameters.
|
protected short | getButton(GraphicsNodeMouseEvent evt)
Returns the mouse event button.
|
protected Element | getEventTarget(GraphicsNode node, Point2D coords)
Returns the element that is the target of the specified
event or null if any.
|
protected Element | getRelatedElement(GraphicsNodeMouseEvent evt)
Returns the related element according to the specified event.
|
void | keyPressed(GraphicsNodeKeyEvent evt)
Invoked when a key has been pressed. |
void | keyReleased(GraphicsNodeKeyEvent evt)
Invoked when a key has been released. |
void | keyTyped(GraphicsNodeKeyEvent evt)
Invoked when a key has been typed. |
protected int | mapKeyCode(int keyCode)
The java KeyEvent keyCodes and the DOMKeyEvent keyCodes
map except for the VK_ENTER code (which has a different value
in DOM and the VK_KANA_LOCK and VK_INPUT_METHOD_ON_OFF which
have no DOM equivalent. |
void | mouseClicked(GraphicsNodeMouseEvent evt) |
void | mouseDragged(GraphicsNodeMouseEvent evt) |
void | mouseEntered(GraphicsNodeMouseEvent evt) |
void | mouseExited(GraphicsNodeMouseEvent evt) |
void | mouseMoved(GraphicsNodeMouseEvent evt) |
void | mousePressed(GraphicsNodeMouseEvent evt) |
void | mouseReleased(GraphicsNodeMouseEvent evt) |
Parameters: eventType the event type evt the GVT GraphicsNodeMouseEvent cancelable true means the event is cancelable
Parameters: eventType the event type targetElement the target of the event relatedElement the related target if any clientXY the mouse coordinates in the client space evt the GVT GraphicsNodeMouseEvent cancelable true means the event is cancelable
Parameters: evt the GVT GraphicsNodeMouseEvent
Parameters: node the graphics node that received the event coords the mouse coordinates in the GVT tree space
Parameters: evt the GVT GraphicsNodeMouseEvent
Parameters: evt the graphics node key event
Parameters: evt the graphics node key event
Parameters: evt the graphics node key event