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.lang.Cloneable, java.io.Serializable

public class GraphicsNodeKeyEvent
extends GraphicsNodeInputEvent

An event which indicates that a keystroke occurred in a graphics node.

See Also:
Serialized Form

Field Summary
static int KEY_PRESSED
          The id for the "keyPressed" event.
static int KEY_RELEASED
          The id for the "keyReleased" event.
static int KEY_TYPED
          The id for the "keyTyped" event.
 
Fields inherited from class org.apache.batik.gvt.event.GraphicsNodeInputEvent
ALT_GRAPH_MASK, ALT_MASK, BUTTON1_MASK, BUTTON2_MASK, BUTTON3_MASK, CTRL_MASK, META_MASK, SHIFT_MASK
 
Fields inherited from class org.apache.batik.gvt.event.GraphicsNodeEvent
id
 
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 org.apache.batik.gvt.event.GraphicsNodeInputEvent
getModifiers, getWhen, isAltDown, isAltGraphDown, isControlDown, isMetaDown, isShiftDown
 
Methods inherited from class org.apache.batik.gvt.event.GraphicsNodeEvent
clone, consume, getGraphicsNode, getID, isConsumed
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_PRESSED

public static final int KEY_PRESSED
The id for the "keyPressed" event.

KEY_RELEASED

public static final int KEY_RELEASED
The id for the "keyReleased" event.

KEY_TYPED

public static final int KEY_TYPED
The id for the "keyTyped" event.
Constructor Detail

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 originated
id - the id of this event
when - the time the event occurred
modifiers - the modifier keys down while event occurred
Method Detail

getKeyCode

public int getKeyCode()
Return the integer code for the physical key pressed. Not localized.
See Also:
KeyEvent.getKeyCode()

getKeyChar

public char getKeyChar()
Return a character corresponding to physical key pressed. May be localized.
See Also:
KeyEvent.getKeyChar()


Copyright © 2000 Apache Software Foundation. All Rights Reserved.