protected static class SVG12BridgeEventSupport.Listener extends BridgeEventSupport.Listener implements GraphicsNodeMouseWheelListener
Modifier and Type | Field and Description |
---|---|
protected SVG12BridgeContext |
ctx12
The BridgeContext downcasted to an SVG12BridgeContext.
|
protected static java.lang.String[][] |
IDENTIFIER_KEY_CODES
Array to hold the map of Java keycodes to DOM 3 key strings.
|
context, isDown, lastTargetElement, ua
Constructor and Description |
---|
Listener(BridgeContext ctx,
UserAgent u) |
Modifier and Type | Method and Description |
---|---|
protected void |
dispatchKeyboardEvent(java.lang.String eventType,
GraphicsNodeKeyEvent evt)
Dispatch a DOM 3 Keyboard event.
|
protected void |
dispatchMouseEvent(java.lang.String eventType,
Element targetElement,
Element relatedElement,
java.awt.Point clientXY,
GraphicsNodeMouseEvent evt,
boolean cancelable)
Dispatches a DOM MouseEvent according to the specified
parameters.
|
protected void |
dispatchMouseEvent(java.lang.String eventType,
Element targetElement,
Element relatedElement,
java.awt.Point clientXY,
GraphicsNodeMouseEvent evt,
boolean cancelable,
int bubbleLimit)
Dispatches a DOM MouseEvent according to the specified
parameters.
|
protected void |
dispatchTextEvent(GraphicsNodeKeyEvent evt)
Dispatch a DOM 3 Text 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 java.lang.String |
mapKeyCodeToIdentifier(int keyCode)
Convert a Java key code to a DOM 3 key string.
|
protected int |
mapKeyLocation(int location)
Maps Java KeyEvent location numbers to DOM 3 location numbers.
|
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 |
mouseWheelMoved(GraphicsNodeMouseWheelEvent evt)
Invoked when the mouse wheel has been moved.
|
protected static void |
putIdentifierKeyCode(java.lang.String keyIdentifier,
int keyCode)
Put a key code to key identifier mapping into the
IDENTIFIER_KEY_CODES table.
|
dispatchKeyEvent, dispatchMouseEvent, getEventTarget, getRelatedElement, mapKeyCode, mouseClicked, mouseDragged, mousePressed, mouseReleased
protected SVG12BridgeContext ctx12
protected static java.lang.String[][] IDENTIFIER_KEY_CODES
public Listener(BridgeContext ctx, UserAgent u)
public void keyPressed(GraphicsNodeKeyEvent evt)
keyPressed
in interface GraphicsNodeKeyListener
keyPressed
in class BridgeEventSupport.Listener
evt
- the graphics node key eventpublic void keyReleased(GraphicsNodeKeyEvent evt)
keyReleased
in interface GraphicsNodeKeyListener
keyReleased
in class BridgeEventSupport.Listener
evt
- the graphics node key eventpublic void keyTyped(GraphicsNodeKeyEvent evt)
keyTyped
in interface GraphicsNodeKeyListener
keyTyped
in class BridgeEventSupport.Listener
evt
- the graphics node key eventprotected void dispatchKeyboardEvent(java.lang.String eventType, GraphicsNodeKeyEvent evt)
protected void dispatchTextEvent(GraphicsNodeKeyEvent evt)
protected int mapKeyLocation(int location)
protected static void putIdentifierKeyCode(java.lang.String keyIdentifier, int keyCode)
protected java.lang.String mapKeyCodeToIdentifier(int keyCode)
public void mouseWheelMoved(GraphicsNodeMouseWheelEvent evt)
GraphicsNodeMouseWheelListener
mouseWheelMoved
in interface GraphicsNodeMouseWheelListener
evt
- the graphics node mouse eventpublic void mouseEntered(GraphicsNodeMouseEvent evt)
GraphicsNodeMouseListener
mouseEntered
in interface GraphicsNodeMouseListener
mouseEntered
in class BridgeEventSupport.Listener
evt
- the graphics node mouse eventpublic void mouseExited(GraphicsNodeMouseEvent evt)
GraphicsNodeMouseListener
mouseExited
in interface GraphicsNodeMouseListener
mouseExited
in class BridgeEventSupport.Listener
evt
- the graphics node mouse eventpublic void mouseMoved(GraphicsNodeMouseEvent evt)
GraphicsNodeMouseListener
mouseMoved
in interface GraphicsNodeMouseListener
mouseMoved
in class BridgeEventSupport.Listener
evt
- the graphics node mouse eventprotected void dispatchMouseEvent(java.lang.String eventType, Element targetElement, Element relatedElement, java.awt.Point clientXY, GraphicsNodeMouseEvent evt, boolean cancelable)
dispatchMouseEvent
in class BridgeEventSupport.Listener
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 void dispatchMouseEvent(java.lang.String eventType, Element targetElement, Element relatedElement, java.awt.Point clientXY, GraphicsNodeMouseEvent evt, boolean cancelable, int bubbleLimit)
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 cancelablebubbleLimit
- the limit to the number of nodes the event
will bubble toCopyright © 2022 Apache Software Foundation. All Rights Reserved.