Modifier and Type | Field and Description |
---|---|
private int |
actionCode
Progress like action code or KeyInput.CHAR_UNDEFINED
|
private boolean |
causedAutoReturn
true if this event generated a downstream AUTO-RETURN. |
static char |
CHAR_UNDEFINED
Undefined character constant.
|
private boolean |
consumed
If
true , the keyboard event was processed and consumed. |
private boolean |
eventMode
A flag which may have varying meaning depending on the event code.
|
private boolean |
isKey
Mark real keys typed by user.
|
private int |
key
Key associated with the event.
|
private boolean |
triggerFired
If
true , a trigger has fired in reaction to this event. |
Constructor and Description |
---|
KeyInput(Widget source,
int id)
Constructor for MouseEvt compatibility.
|
KeyInput(Widget source,
int id,
int key)
Initializes the action code to the Mapped Progress key action.
|
KeyInput(Widget source,
int id,
int key,
boolean eventMode)
Initializes the action code to the Mapped Progress key action.
|
KeyInput(Widget src,
int id,
int key,
boolean mode,
boolean isKey)
Initializes the action code to the Mapped Progress key action.
|
KeyInput(Widget source,
Widget other,
int id,
int key,
boolean eventMode)
Initializes the action code to the Mapped Progress key action.
|
KeyInput(Widget src,
Widget other,
int id,
int key,
boolean mode,
boolean isKey)
Initializes the action code to the Mapped Progress key action.
|
Modifier and Type | Method and Description |
---|---|
int |
actionCode()
Returns the integer action code.
|
void |
consume()
Mark event as consumed.
|
void |
dispatch(KeyListener listener)
Invoke appropriate listeners' method depending on the event type.
|
boolean |
isCausedAutoReturn()
Reports if this event generated an AUTO-RETURN.
|
boolean |
isConsumed()
Check if event is already consumed.
|
boolean |
isRealKey()
Return
true if event represents key typed by user (as
opposed to some kind of artificially generated event). |
boolean |
isSpecial()
Returns the special mode flag.
|
boolean |
isTriggerFired()
Check if a trigger has fired in reaction to this event
|
char |
keyChar()
Get character for this event.
|
int |
keyCode()
Get key code for this event.
|
void |
setActionCode(int code)
Sets the action code.
|
void |
setCausedAutoReturn(boolean causedAutoReturn)
Sets the flag reporting if this event generated an AUTO-RETURN.
|
void |
setKeyCode(int key)
Set key code for this event.
|
void |
setTriggerFired()
Mark that a trigger has fired in reaction to this event.
|
java.lang.String |
toString()
Returns the String representation of this object.
|
private int actionCode
private boolean eventMode
private boolean isKey
private boolean consumed
true
, the keyboard event was processed and consumed.private boolean triggerFired
true
, a trigger has fired in reaction to this event.private int key
private boolean causedAutoReturn
true
if this event generated a downstream AUTO-RETURN.public static final char CHAR_UNDEFINED
public KeyInput(Widget source, int id, int key)
source
- widget associated with the eventid
- event categorykey
- event codepublic KeyInput(Widget source, int id, int key, boolean eventMode)
source
- widget associated with the eventid
- event categorykey
- event codeeventMode
- a boolean flag specific to the eventpublic KeyInput(Widget source, Widget other, int id, int key, boolean eventMode)
source
- widget associated with the eventother
- companion widget associated with the eventid
- event categorykey
- event codeeventMode
- a boolean flag specific to the eventpublic KeyInput(Widget src, int id, int key, boolean mode, boolean isKey)
src
- widget associated with the eventid
- event categorykey
- event codemode
- a boolean flag specific to the eventisKey
- mark real key typed by userpublic KeyInput(Widget src, Widget other, int id, int key, boolean mode, boolean isKey)
src
- widget associated with the eventother
- companion widget associated with the eventid
- event categorykey
- event codemode
- a boolean flag specific to the eventisKey
- mark real key typed by userpublic KeyInput(Widget source, int id)
source
- Event source.id
- Event type ID.public int actionCode()
public void setActionCode(int code)
code
- new action code to be setpublic boolean isSpecial()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isRealKey()
true
if event represents key typed by user (as
opposed to some kind of artificially generated event).true
if event was generated by real user input.public void dispatch(KeyListener listener)
listener
- Event listener to which event will be passed.public void consume()
public void setTriggerFired()
public char keyChar()
CHAR_UNDEFINED
is returned.public int keyCode()
public boolean isConsumed()
true
if event is consumed.public boolean isTriggerFired()
true
if a trigger has fired in reaction to this event.public void setKeyCode(int key)
key
- Key code to set.public void setCausedAutoReturn(boolean causedAutoReturn)
causedAutoReturn
- true
if this event generated a downstream AUTO-RETURN.public boolean isCausedAutoReturn()
true
if this event generated a downstream AUTO-RETURN.