public class KeyboardKey
extends java.lang.Object
Constructor and Description |
---|
KeyboardKey(CharacterKey defaultCharacter,
java.awt.Shape keyShape)
Instantiates a new keyboard key.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getBackgroundColour()
Gets the background colour.
|
int |
getKeyCode()
Gets the key code.
|
java.awt.Shape |
getKeyShape()
Gets the key shape.
|
java.lang.String |
getKeyStringRepresentation()
Gets the key string representation.
|
java.awt.Color |
getKeyTextColour()
Gets the key text colour.
|
int |
getMaxX()
Gets the max x.
|
int |
getMaxY()
Gets the max y.
|
int |
getMinX()
Gets the min x.
|
int |
getMinY()
Gets the min y.
|
KeyModifiers |
getModifiers()
Gets the modifiers.
|
boolean |
isEnabled()
Checks if is enabled.
|
void |
setBackgroundColour(java.awt.Color backgroundColour)
Sets the background colour.
|
void |
setEnabled(boolean enabled)
Sets the enabled.
|
void |
setKeyShape(java.awt.Shape keyShape)
Sets the key shape.
|
void |
setKeyTextColour(java.awt.Color keyTextColour)
Sets the key text colour.
|
void |
setModifiers(KeyModifiers modifiers)
Sets the modifiers.
|
public KeyboardKey(CharacterKey defaultCharacter, java.awt.Shape keyShape)
defaultCharacter
- the default characterkeyShape
- the key shapepublic java.awt.Color getBackgroundColour()
public int getKeyCode()
public java.awt.Shape getKeyShape()
public java.lang.String getKeyStringRepresentation()
public java.awt.Color getKeyTextColour()
public int getMaxX()
public int getMaxY()
public int getMinX()
public int getMinY()
public KeyModifiers getModifiers()
public boolean isEnabled()
public void setBackgroundColour(java.awt.Color backgroundColour)
backgroundColour
- the new background colourpublic void setEnabled(boolean enabled)
enabled
- the new enabledpublic void setKeyShape(java.awt.Shape keyShape)
keyShape
- the new key shapepublic void setKeyTextColour(java.awt.Color keyTextColour)
keyTextColour
- the new key text colourpublic void setModifiers(KeyModifiers modifiers)
modifiers
- the new modifiers