public abstract class Key
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Key |
ALT
The Alt virtual key (key code = 18).
|
static Key |
ALT_GR |
static Key |
BACK_SPACE
The Backspace virtual key.
|
static Key |
CAPS_LOCK
The Caps Lock virtual key.
|
protected java.lang.String |
content |
static Key |
CONTEXT
The context menu virtual key.
|
static Key |
CTRL
The Control virtual key (key code = 17).
|
static Key |
DELETE
The Delete virtual key.
|
static Key |
END
The End virtual key.
|
static Key |
ENTER
The Enter virtual key (key code = 13).
|
static Key |
ESC
The Escape virtual key.
|
static Key |
F1
The F1 virtual key.
|
static Key |
F10
The F10 virtual key.
|
static Key |
F11
The F11 virtual key.
|
static Key |
F12
The F12 virtual key.
|
static Key |
F2
The F2 virtual key.
|
static Key |
F3
The F3 virtual key.
|
static Key |
F4
The F4 virtual key.
|
static Key |
F5
The F5 virtual key.
|
static Key |
F6
The F6 virtual key.
|
static Key |
F7
The F7 virtual key.
|
static Key |
F8
The F8 virtual key.
|
static Key |
F9
The F9 virtual key.
|
static Key |
HOME
The Home virtual key.
|
static Key |
INSERT
The Insert virtual key.
|
protected boolean |
isLocked |
static Key |
KEY_DOWN
The Down arrow virtual key.
|
static Key |
KEY_LEFT
The Left arrow virtual key.
|
static Key |
KEY_RIGHT
The Right arrow virtual key.
|
static Key |
KEY_UP
The Up arrow virtual key.
|
static Key |
LANG
Language rotation virtual key.
|
static Key |
NUM_5
The numpad 5 virtual key.
|
static Key |
NUM_DELETE
The numpad Delete virtual key.
|
static Key |
NUM_DIV
The numpad / virtual key.
|
static Key |
NUM_DOWN
The numpad Down arrow virtual key.
|
static Key |
NUM_END
The numpad End virtual key.
|
static Key |
NUM_HOME
The numpad Home virtual key.
|
static Key |
NUM_INSERT
The numpad Insert virtual key.
|
static Key |
NUM_LEFT
The numpad Left arrow virtual key.
|
static Key |
NUM_LOCK
The Num Lock virtual key.
|
static Key |
NUM_MINUS
The numpad - virtual key.
|
static Key |
NUM_MULT
The numpad * virtual key.
|
static Key |
NUM_PAGEDOWN
The numpad Page Down virtual key.
|
static Key |
NUM_PAGEUP
The numpad Page Up virtual key.
|
static Key |
NUM_PLUS
The numpad + virtual key.
|
static Key |
NUM_RIGHT
The numpad Right arrow virtual key.
|
static Key |
NUM_UP
The numpad Up arrow virtual key.
|
static Key |
PAGE_DOWN
The Page Down virtual key.
|
static Key |
PAGE_UP
The Page Up virtual key.
|
static Key |
PAUSE_BREAK
The Pause / break virtual key.
|
static Key |
PRTSCR
The Print Screen virtual key.
|
static Key |
SCROLL_LOCK
The Scroll Lock virtual key.
|
static Key |
SHIFT
The Shift virtual key (key code = 16).
|
static Key |
SPACE
The Space virtual key.
|
static Key |
TAB
The Tab virtual key.
|
static Key |
WINDOWS
The Windows virtual key.
|
Constructor and Description |
---|
Key() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Object |
clone()
Clones this key.
|
protected void |
copy(Key objKey)
Copies the properties of this key to specified one.
|
abstract 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 |
getContent()
Gets the key's text content.
|
double |
getHeight()
Gets the key's height.
|
java.awt.Image |
getImage() |
java.lang.String |
getImagePath()
Gets relative path to an image that should be displayed inside this key.
|
boolean |
getIsLocked()
Gets whether a mode associated with a modifier key is enabled.
|
double |
getLeft()
Gets the horizontal position of the key.
|
double |
getTop()
Gets the vertical position of the key.
|
double |
getWidth()
Gets the key's width.
|
abstract int |
hashCode()
Returns a hash code for this Key.
|
abstract void |
send(boolean releaseSpecialKeys)
Sends this key to the foreground window.
|
void |
setContent(java.lang.String value)
Sets the key's text content.
|
void |
setHeight(double value)
Sets the key's height.
|
void |
setImage(java.awt.Image value) |
void |
setImage(java.lang.String value)
Sets relative path to an image that should be displayed inside this key.
|
void |
setIsLocked(boolean value)
Sets whether a mode associated with a modifier key is enabled.
|
void |
setLeft(double value)
Sets the horizontal position of the key.
|
void |
setTop(double value)
Sets the vertical position of the key.
|
void |
setWidth(double value)
Sets the key's width.
|
void |
updateKey()
Updates the key's labels for current language.
|
public static Key BACK_SPACE
public static Key TAB
public static Key ENTER
public static Key SHIFT
public static Key CTRL
public static Key ALT
public static Key ALT_GR
public static Key PAUSE_BREAK
public static Key CAPS_LOCK
public static Key ESC
public static Key SPACE
public static Key PAGE_UP
public static Key PAGE_DOWN
public static Key END
public static Key HOME
public static Key KEY_LEFT
public static Key KEY_UP
public static Key KEY_RIGHT
public static Key KEY_DOWN
public static Key INSERT
public static Key DELETE
public static Key WINDOWS
public static Key CONTEXT
public static Key F1
public static Key F2
public static Key F3
public static Key F4
public static Key F5
public static Key F6
public static Key F7
public static Key F8
public static Key F9
public static Key F10
public static Key F11
public static Key F12
public static Key NUM_LOCK
public static Key SCROLL_LOCK
public static Key PRTSCR
public static Key LANG
public static Key NUM_PAGEUP
public static Key NUM_PAGEDOWN
public static Key NUM_END
public static Key NUM_HOME
public static Key NUM_LEFT
public static Key NUM_UP
public static Key NUM_RIGHT
public static Key NUM_DOWN
public static Key NUM_INSERT
public static Key NUM_DELETE
public static Key NUM_5
public static Key NUM_DIV
public static Key NUM_MULT
public static Key NUM_MINUS
public static Key NUM_PLUS
protected java.lang.String content
protected boolean isLocked
public void setContent(java.lang.String value)
value
- A String containing the key's content.public java.lang.String getContent()
public void setImage(java.lang.String value)
value
- A String containing path to image file.public java.lang.String getImagePath()
public void setIsLocked(boolean value)
value
- true if the key's mode is enabled, or false otherwise.public boolean getIsLocked()
public void setLeft(double value)
value
- A double value specifying key's position on the keyboard.public double getLeft()
public void setTop(double value)
value
- A double value specifying key's position on the keyboard.public double getTop()
public void setWidth(double value)
value
- A double value specifying key's width.public double getWidth()
public void setHeight(double value)
value
- A double value specifying key's height.public double getHeight()
public abstract void send(boolean releaseSpecialKeys)
releaseSpecialKeys
- true to automatically release modifier keys afterwards, or false otherwise.protected void copy(Key objKey)
objKey
- The target Key.public void updateKey()
public abstract java.lang.Object clone()
clone
in class java.lang.Object
public abstract boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public abstract int hashCode()
hashCode
in class java.lang.Object
public void setImage(java.awt.Image value)
public java.awt.Image getImage()