com.guiseframework.event
Class KeyPressEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.globalmentor.event.AbstractEvent
          extended by com.guiseframework.event.AbstractGuiseEvent
              extended by com.guiseframework.event.AbstractInputEvent
                  extended by com.guiseframework.event.AbstractGestureInputEvent
                      extended by com.guiseframework.event.AbstractFocusedGestureInputEvent
                          extended by com.guiseframework.event.AbstractKeyboardEvent
                              extended by com.guiseframework.event.KeyPressEvent
All Implemented Interfaces:
com.globalmentor.event.Event, FocusedInputEvent, GestureInputEvent, GuiseEvent, InputEvent, KeyboardEvent, java.io.Serializable

public class KeyPressEvent
extends AbstractKeyboardEvent

An event providing information on a keyboard key press.

Author:
Garret Wilson
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
KeyPressEvent(java.lang.Object source, Key key, Key... keys)
          Source constructor.
KeyPressEvent(java.lang.Object source, KeyPressEvent keyPressEvent)
          Copy constructor that specifies a different source.
KeyPressEvent(java.lang.Object source, KeystrokeInput keystrokeInput)
          Keystroke input constructor.
 
Method Summary
 KeystrokeInput getInput()
           
 
Methods inherited from class com.guiseframework.event.AbstractKeyboardEvent
getKey
 
Methods inherited from class com.guiseframework.event.AbstractGestureInputEvent
getKeys, hasAltKey, hasControlKey, hasShiftKey
 
Methods inherited from class com.guiseframework.event.AbstractInputEvent
consume, isConsumed
 
Methods inherited from class com.guiseframework.event.AbstractGuiseEvent
getSession
 
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
 
Methods inherited from interface com.guiseframework.event.GestureInputEvent
getKeys, hasAltKey, hasControlKey, hasShiftKey
 
Methods inherited from interface com.guiseframework.event.InputEvent
consume, isConsumed
 
Methods inherited from interface com.guiseframework.event.GuiseEvent
getSession
 
Methods inherited from interface com.globalmentor.event.Event
getSource
 

Constructor Detail

KeyPressEvent

public KeyPressEvent(java.lang.Object source,
                     Key key,
                     Key... keys)
Source constructor.

Parameters:
source - The object on which the event initially occurred.
keys - The keys that were pressed when this event was generated.
Throws:
java.lang.NullPointerException - if the given source, key, and/or keys is null.

KeyPressEvent

public KeyPressEvent(java.lang.Object source,
                     KeystrokeInput keystrokeInput)
Keystroke input constructor.

Parameters:
source - The object on which the event initially occurred.
keystrokeInput - The keystroke input the properties of which will be copied.
Throws:
java.lang.NullPointerException - if the given source and/or input is null.

KeyPressEvent

public KeyPressEvent(java.lang.Object source,
                     KeyPressEvent keyPressEvent)
Copy constructor that specifies a different source.

Parameters:
source - The object on which the event initially occurred.
keyPressEvent - The event the properties of which will be copied.
Throws:
java.lang.NullPointerException - if the given source, key, and/or event is null.
Method Detail

getInput

public KeystrokeInput getInput()
Returns:
The key input associated with this event.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.