org.apache.batik.gvt.event
Class GraphicsNodeKeyEvent
java.lang.Object
|
+--java.util.EventObject
|
+--org.apache.batik.gvt.event.GraphicsNodeEvent
|
+--org.apache.batik.gvt.event.GraphicsNodeInputEvent
|
+--org.apache.batik.gvt.event.GraphicsNodeKeyEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class GraphicsNodeKeyEvent
- extends GraphicsNodeInputEvent
An event which indicates that a keystroke occurred in a graphics node.
- See Also:
- Serialized Form
Fields inherited from class java.util.EventObject |
source |
Constructor Summary |
GraphicsNodeKeyEvent(GraphicsNode source,
int id,
long when,
int modifiers,
int keyCode,
char keyChar)
Constructs a new graphics node key event. |
Method Summary |
char |
getKeyChar()
Return a character corresponding to physical key pressed. |
int |
getKeyCode()
Return the integer code for the physical key pressed. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
KEY_TYPED
public static final int KEY_TYPED
- The "key typed" event. This event is generated when a character is
entered. In the simplest case, it is produced by a single key press.
Often, however, characters are produced by series of key presses, and
the mapping from key pressed events to key typed events may be
many-to-one or many-to-many.
KEY_PRESSED
public static final int KEY_PRESSED
- The "key pressed" event. This event is generated when a key
is pushed down.
KEY_RELEASED
public static final int KEY_RELEASED
- The "key released" event. This event is generated when a key
is let up.
GraphicsNodeKeyEvent
public GraphicsNodeKeyEvent(GraphicsNode source,
int id,
long when,
int modifiers,
int keyCode,
char keyChar)
- Constructs a new graphics node key event.
- Parameters:
source
- the graphics node where the event originatedid
- the id of this eventwhen
- the time the event occurredmodifiers
- the modifier keys down while event occurred
getKeyCode
public int getKeyCode()
- Return the integer code for the physical key pressed. Not localized.
getKeyChar
public char getKeyChar()
- Return a character corresponding to physical key pressed.
May be localized.
Copyright © 2002 Apache Software Foundation. All Rights Reserved.