|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject thinwire.ui.event.KeyPressEvent
public class KeyPressEvent
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
KeyPressEvent(java.lang.String keyPressCombo,
Component source)
|
Method Summary | |
---|---|
static java.lang.String |
encodeKeyPressCombo(boolean ctrl,
boolean alt,
boolean shift,
java.lang.String key)
Combines the individual elements of a key press combination into a normalized string. |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getKey()
|
java.lang.String |
getKeyPressCombo()
|
Component |
getSourceComponent()
|
int |
hashCode()
|
boolean |
isAlt()
|
boolean |
isCtrl()
|
boolean |
isShift()
|
static java.lang.String |
normalizeKeyPressCombo(java.lang.String keyPressCombo)
Parses the specified keyPressCombo and return's it in a normalized form. |
java.lang.String |
toString()
|
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public KeyPressEvent(java.lang.String keyPressCombo, Component source)
Method Detail |
---|
public static java.lang.String encodeKeyPressCombo(boolean ctrl, boolean alt, boolean shift, java.lang.String key)
ctrl
is true, "Ctrl-" is the first part of the string.alt
is true, then "Alt-" is the first part of the string.shift
is true, then "Shift-" is the first part of the string.ctrl
, alt
and shift
is true, then the first part of
the string will be a combination "Ctrl-", "Alt-" and "Shift-", in that order. Ex. If ctrl
and
shift
are true, but alt
is false, the first part of the string will be "Ctrl-Shift-".
ctrl
, alt
or shift
is true, then an empty value is the first
part of the string.key
argument. However, it is normalized
into one of the following values: "Dash", "=", "`", "[", "]", "\\", ";", "'", ",", ".", "/", "PageUp", "PageDown", "End", "Home", "ArrowLeft", "ArrowRight", "ArrowDown", "ArrowUp", "Space", "Enter", "Esc", "Tab", "BackSpace", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "Del", "Ins", "Pause", "ScrollLock", "NumLock", "Num0", "Num1", "Num2", "Num3", "Num4", "Num5", "Num6", "Num7", "Num8", "Num9", "Num*", "Num+", "NumDash", "Num/", "Num."
ctrl
- if true, the returned string will contain "Ctrl-" per the rules above.alt
- if true, the returned string will contain "Alt-" per the rules above.shift
- if true, the returned string will contain "Shift-" per the rules above.key
- returned as part of the string, only in a normalized form per the rules above.
public static java.lang.String normalizeKeyPressCombo(java.lang.String keyPressCombo)
keyPressCombo
and return's it in a normalized form. This method will accept a string that
is of any case and that has it's key modifier(s) in any order. The sole restriction is that the elements of the key press
combination must be separated by a dash '-'. The purpose of this method is to provide a way of generating a properly formed
key press combination strings (i.e. normalized). The normalized string form returned by this method is defined by the
encodeKeyPressCombo
method above.
keyPressCombo
- a key press combo in any dash separated format.
encodeKeyPressCombo(boolean, boolean, boolean, String)
public Component getSourceComponent()
public boolean isCtrl()
public boolean isAlt()
public boolean isShift()
public java.lang.String getKey()
public java.lang.String getKeyPressCombo()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.util.EventObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |