public final class RegularKey extends Key
ALT, ALT_GR, BACK_SPACE, CAPS_LOCK, content, CONTEXT, CTRL, DELETE, END, ENTER, ESC, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, HOME, INSERT, isLocked, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_UP, LANG, NUM_5, NUM_DELETE, NUM_DIV, NUM_DOWN, NUM_END, NUM_HOME, NUM_INSERT, NUM_LEFT, NUM_LOCK, NUM_MINUS, NUM_MULT, NUM_PAGEDOWN, NUM_PAGEUP, NUM_PLUS, NUM_RIGHT, NUM_UP, PAGE_DOWN, PAGE_UP, PAUSE_BREAK, PRTSCR, SCROLL_LOCK, SHIFT, SPACE, TAB, WINDOWS
Constructor and Description |
---|
RegularKey()
Initializes a new instance of the
RegularKey class. |
RegularKey(int virtualKey)
Initializes a new instance of the
RegularKey class with specified virtual key code. |
RegularKey(int virtualKey,
java.lang.String content)
Initializes a new instance of the RegularKey class with specified virtual key code and content.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clones this key.
|
boolean |
equals(java.lang.Object obj)
Returns a value indicating whether this instance and a specified Key object represent the same value.
|
java.lang.String |
getAlterCase()
Gets the alter-case label displayed by this key.
|
java.lang.String |
getCapitalCase()
Gets the capital case label displayed by this key.
|
java.lang.String |
getLowerCase()
Gets the lower-case label displayed by this key.
|
int |
getRepeat()
Gets how many times to send the key code when this key is pressed.
|
java.lang.String |
getUpperCase()
Gets the upper-case label displayed by this key.
|
int |
getVirtualKey()
Gets the key code of this key.
|
int |
hashCode()
Returns a hash code for this RegularKey.
|
void |
send(boolean releaseSpecialKeys)
Sends this key to the foreground window.
|
void |
setAlterCase(java.lang.String value)
Sets the alter-case label displayed by this key.
|
void |
setCapitalCase(java.lang.String value)
Sets the capital case label displayed by this key.
|
void |
setLowerCase(java.lang.String value)
Sets the lower-case label displayed by this key.
|
void |
setRepeat(int value)
Sets how many times to send the key code when this key is pressed.
|
void |
setUpperCase(java.lang.String value)
Sets the upper-case label displayed by this key.
|
void |
setVirtualKey(int value)
Sets the key code of this key.
|
java.lang.String |
toString() |
void |
updateKey()
Updates the key's labels for current language.
|
copy, getContent, getHeight, getImage, getImagePath, getIsLocked, getLeft, getTop, getWidth, setContent, setHeight, setImage, setImage, setIsLocked, setLeft, setTop, setWidth
public RegularKey()
RegularKey
class.public RegularKey(int virtualKey)
RegularKey
class with specified virtual key code.virtualKey
- The virtual key code sent by this key.public RegularKey(int virtualKey, java.lang.String content)
virtualKey
- Virtual key code.content
- Content sent as input to the focused control.public void setLowerCase(java.lang.String value)
value
- A string specifying the lower case label.public java.lang.String getLowerCase()
public void setUpperCase(java.lang.String value)
value
- A string specifying the upper case label.public java.lang.String getUpperCase()
public void setAlterCase(java.lang.String value)
value
- A string specifying the alter case label.public java.lang.String getAlterCase()
public void setCapitalCase(java.lang.String value)
value
- A string specifying the capital case label.public java.lang.String getCapitalCase()
public void setRepeat(int value)
value
- An integer value specifying how many time to repeat the key.public int getRepeat()
public void setVirtualKey(int value)
value
- The virtual key code sent by this key.public int getVirtualKey()
public void send(boolean releaseSpecialKeys)
public void updateKey()
public int hashCode()
public boolean equals(java.lang.Object obj)
public java.lang.String toString()
toString
in class java.lang.Object