|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.batik.bridge.BridgeEventSupport.Listener
protected static class BridgeEventSupport.Listener
A GraphicsNodeMouseListener that dispatch DOM events accordingly.
Field Summary | |
---|---|
protected BridgeContext |
context
|
protected boolean |
isDown
|
protected Element |
lastTargetElement
|
protected UserAgent |
ua
|
Constructor Summary | |
---|---|
BridgeEventSupport.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,
Element targetElement,
Element relatedElement,
Point clientXY,
GraphicsNodeMouseEvent evt,
boolean cancelable)
Dispatches a DOM MouseEvent according to the specified parameters. |
protected void |
dispatchMouseEvent(String eventType,
GraphicsNodeMouseEvent evt,
boolean cancelable)
Dispatches a DOM MouseEvent according to the specified parameters. |
protected Element |
getEventTarget(GraphicsNode node,
Point2D pt)
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)
Invoked when the mouse has been clicked on a graphics node. |
void |
mouseDragged(GraphicsNodeMouseEvent evt)
Invoked when a mouse button is pressed on a graphics node and then dragged. |
void |
mouseEntered(GraphicsNodeMouseEvent evt)
Invoked when the mouse enters a graphics node. |
void |
mouseExited(GraphicsNodeMouseEvent evt)
Invoked when the mouse exits a graphics node. |
void |
mouseMoved(GraphicsNodeMouseEvent evt)
Invoked when the mouse button has been moved on a node. |
void |
mousePressed(GraphicsNodeMouseEvent evt)
Invoked when a mouse button has been pressed on a graphics node. |
void |
mouseReleased(GraphicsNodeMouseEvent evt)
Invoked when a mouse button has been released on a graphics node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected BridgeContext context
protected UserAgent ua
protected Element lastTargetElement
protected boolean isDown
Constructor Detail |
---|
public BridgeEventSupport.Listener(BridgeContext ctx, UserAgent u)
Method Detail |
---|
public void keyPressed(GraphicsNodeKeyEvent evt)
keyPressed
in interface GraphicsNodeKeyListener
evt
- the graphics node key eventpublic void keyReleased(GraphicsNodeKeyEvent evt)
keyReleased
in interface GraphicsNodeKeyListener
evt
- the graphics node key eventpublic void keyTyped(GraphicsNodeKeyEvent evt)
keyTyped
in interface GraphicsNodeKeyListener
evt
- the graphics node key eventprotected void dispatchKeyEvent(String eventType, GraphicsNodeKeyEvent evt)
protected final int mapKeyCode(int keyCode)
public void mouseClicked(GraphicsNodeMouseEvent evt)
GraphicsNodeMouseListener
mouseClicked
in interface GraphicsNodeMouseListener
evt
- the graphics node mouse eventpublic void mousePressed(GraphicsNodeMouseEvent evt)
GraphicsNodeMouseListener
mousePressed
in interface GraphicsNodeMouseListener
evt
- the graphics node mouse eventpublic void mouseReleased(GraphicsNodeMouseEvent evt)
GraphicsNodeMouseListener
mouseReleased
in interface GraphicsNodeMouseListener
evt
- the graphics node mouse eventpublic void mouseEntered(GraphicsNodeMouseEvent evt)
GraphicsNodeMouseListener
mouseEntered
in interface GraphicsNodeMouseListener
evt
- the graphics node mouse eventpublic void mouseExited(GraphicsNodeMouseEvent evt)
GraphicsNodeMouseListener
mouseExited
in interface GraphicsNodeMouseListener
evt
- the graphics node mouse eventpublic void mouseDragged(GraphicsNodeMouseEvent evt)
GraphicsNodeMouseListener
mouseDragged
in interface GraphicsNodeMouseListener
evt
- the graphics node mouse eventpublic void mouseMoved(GraphicsNodeMouseEvent evt)
GraphicsNodeMouseListener
mouseMoved
in interface GraphicsNodeMouseListener
evt
- the graphics node mouse eventprotected void dispatchMouseEvent(String eventType, GraphicsNodeMouseEvent evt, boolean cancelable)
eventType
- the event typeevt
- the GVT GraphicsNodeMouseEventcancelable
- true means the event is cancelableprotected void dispatchMouseEvent(String eventType, Element targetElement, Element relatedElement, Point clientXY, GraphicsNodeMouseEvent evt, boolean cancelable)
eventType
- the event typetargetElement
- the target of the eventrelatedElement
- the related target if anyclientXY
- the mouse coordinates in the client spaceevt
- the GVT GraphicsNodeMouseEventcancelable
- true means the event is cancelableprotected Element getRelatedElement(GraphicsNodeMouseEvent evt)
evt
- the GVT GraphicsNodeMouseEventprotected Element getEventTarget(GraphicsNode node, Point2D pt)
node
- the graphics node that received the eventcoords
- the mouse coordinates in the GVT tree space
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |