|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.managers.hotkey.HotkeyData
public class HotkeyData
Single hotkey settings description class.
Constructor Summary | |
---|---|
HotkeyData()
Constructs empty hotkey data. |
|
HotkeyData(boolean isCtrl,
boolean isAlt,
boolean isShift,
java.lang.Integer keyCode)
Constructs hotkey using specified modifiers and key code. |
|
HotkeyData(java.lang.Integer keyCode)
Constructs hotkey using specified key code without any modifiers. |
|
HotkeyData(java.awt.event.KeyEvent keyEvent)
Constructs hotkey using the specified KeyEvent. |
|
HotkeyData(javax.swing.KeyStroke keyStroke)
Constructs hotkey using the specified key stroke. |
Method Summary | |
---|---|
boolean |
areControlsTriggered(java.awt.event.KeyEvent event)
Returns whether hotkey controls are triggered by the key event or not. |
boolean |
equals(java.lang.Object obj)
Indicates whether other hotkey is equal to this one. |
java.lang.Integer |
getKeyCode()
Returns key code required for the hotkey activation. |
javax.swing.KeyStroke |
getKeyStroke()
Returns key stroke for this hotkey. |
int |
getModifiers()
Returns hotkey modifiers. |
int |
hashCode()
Returns hotkey hash code. |
boolean |
isAlt()
Returns whether hotkey activation requires ALT modifier or not. |
boolean |
isCtrl()
Returns whether hotkey activation requires CTRL modifier or not. |
boolean |
isHotkeySet()
Returns whether key code is set or not. |
boolean |
isKeyTriggered(java.awt.event.KeyEvent event)
Returns whether key is triggered by the key event or not. |
boolean |
isShift()
Returns whether hotkey activation requires SHIFT modifier or not. |
boolean |
isTriggered(java.awt.event.KeyEvent event)
Returns whether hotkey is triggered by the key event or not. |
void |
setAlt(boolean alt)
Sets whether hotkey activation should require ALT modifier or not. |
void |
setCtrl(boolean ctrl)
Sets whether hotkey activation should require CTRL modifier or not. |
void |
setKeyCode(java.lang.Integer keyCode)
Sets key code required for the hotkey activation. |
void |
setModifiers(int modifiers)
Sets hotkey modifiers. |
void |
setShift(boolean shift)
Sets whether hotkey activation should require SHIFT modifier or not. |
java.lang.String |
toString()
Returns hotkey text representation. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HotkeyData()
public HotkeyData(java.awt.event.KeyEvent keyEvent)
keyEvent
- KeyEvent to convertpublic HotkeyData(java.lang.Integer keyCode)
keyCode
- key code required for the hotkey activationpublic HotkeyData(boolean isCtrl, boolean isAlt, boolean isShift, java.lang.Integer keyCode)
isCtrl
- whether hotkey activation requires CTRL modifier or notisAlt
- whether hotkey activation requires ALT modifier or notisShift
- whether hotkey activation requires SHIFT modifier or notkeyCode
- key code required for the hotkey activationpublic HotkeyData(javax.swing.KeyStroke keyStroke)
keyStroke
- key strokeMethod Detail |
---|
public boolean isCtrl()
public void setCtrl(boolean ctrl)
ctrl
- whether hotkey activation should require CTRL modifier or notpublic boolean isAlt()
public void setAlt(boolean alt)
alt
- whether hotkey activation should require ALT modifier or notpublic boolean isShift()
public void setShift(boolean shift)
shift
- whether hotkey activation should require SHIFT modifier or notpublic java.lang.Integer getKeyCode()
public void setKeyCode(java.lang.Integer keyCode)
keyCode
- key code required for the hotkey activationpublic boolean isHotkeySet()
public boolean isTriggered(java.awt.event.KeyEvent event)
event
- processed key event
public boolean areControlsTriggered(java.awt.event.KeyEvent event)
event
- processed key event
public boolean isKeyTriggered(java.awt.event.KeyEvent event)
event
- processed key event
public javax.swing.KeyStroke getKeyStroke()
public int getModifiers()
public void setModifiers(int modifiers)
modifiers
- public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- other hotkey
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |