|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectqx.core.Object
qx.core.Target
qx.client.Command
public class Command
Commands can be used to globally define keyboard shortcuts. They could also be used to assign a execution of a command sequence to multiple widgets. It is possible to use the same Command in a MenuButton and ToolBarButton for example.
Constructor Summary | |
---|---|
Command()
Create a new instance of Command |
|
Command(java.lang.String shortcut)
Create a new instance of Command |
|
Command(java.lang.String shortcut,
java.lang.Integer keyCode)
Create a new instance of Command |
Method Summary | |
---|---|
void |
_applyShortcut(java.lang.Object value,
java.lang.Object old)
|
void |
execute(java.lang.Object vTarget)
Fire the “execute” event on this command. |
boolean |
getEnabled()
Returns the (computed) value of the property enabled . |
int |
getKeyCode()
Returns the (computed) value of the property keyCode . |
java.lang.String |
getKeyIdentifier()
Returns the (computed) value of the property keyIdentifier . |
java.lang.String |
getShortcut()
Returns the (computed) value of the property shortcut . |
void |
initEnabled(boolean arg)
Calls the apply method and dispatches the change event of the property enabled
with the default value defined by the class developer. |
void |
initKeyCode(int arg)
Calls the apply method and dispatches the change event of the property keyCode
with the default value defined by the class developer. |
void |
initKeyIdentifier(java.lang.String arg)
Calls the apply method and dispatches the change event of the property keyIdentifier
with the default value defined by the class developer. |
void |
initShortcut(java.lang.String arg)
Calls the apply method and dispatches the change event of the property shortcut
with the default value defined by the class developer. |
boolean |
isEnabled()
Check whether the (computed) value of the boolean property enabled equals true . |
boolean |
matchesKeyEvent(KeyEvent e)
Checks whether the given key event matches the command’s shortcut |
void |
resetEnabled()
Resets the user value of the property enabled . |
void |
resetKeyCode()
Resets the user value of the property keyCode . |
void |
resetKeyIdentifier()
Resets the user value of the property keyIdentifier . |
void |
resetShortcut()
Resets the user value of the property shortcut . |
void |
setEnabled(boolean arg)
Sets the user value of the property enabled . |
void |
setKeyCode(int arg)
Sets the user value of the property keyCode . |
void |
setKeyIdentifier(java.lang.String arg)
Sets the user value of the property keyIdentifier . |
void |
setShortcut(java.lang.String arg)
Sets the user value of the property shortcut . |
boolean |
toggleEnabled()
Toggles the (computed) value of the boolean property enabled . |
java.lang.String |
toString_()
Returns the shortcut as string |
Methods inherited from class qx.core.Target |
---|
_dispatchEvent, addChangeSelectionListener, addChangeValueListener, addEventListener, addExecuteListener, addJavaEventListener, createDispatchChangeEvent, createDispatchDataEvent, createDispatchEvent, dispatchEvent, hasEventListeners, removeEventListener |
Methods inherited from class qx.core.Object |
---|
_disposeFields, _disposeObjectDeep, _disposeObjects, base, dispose, get, getDisposed, isDisposed, reset, self, set, toHashCode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Command()
Create a new instance of Command
public Command(java.lang.String shortcut)
Create a new instance of Command
public Command(java.lang.String shortcut, java.lang.Integer keyCode)
Create a new instance of Command
Method Detail |
---|
public void _applyShortcut(java.lang.Object value, java.lang.Object old)
public void execute(java.lang.Object vTarget)
Fire the “execute” event on this command.
public boolean getEnabled()
Returns the (computed) value of the property enabled
.
For further details take a look at the property definition: enabled
.
public int getKeyCode()
Returns the (computed) value of the property keyCode
.
For further details take a look at the property definition: keyCode
.
public java.lang.String getKeyIdentifier()
Returns the (computed) value of the property keyIdentifier
.
For further details take a look at the property definition: keyIdentifier
.
public java.lang.String getShortcut()
Returns the (computed) value of the property shortcut
.
For further details take a look at the property definition: shortcut
.
public void initEnabled(boolean arg)
Calls the apply method and dispatches the change event of the property enabled
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: enabled
.
public void initKeyCode(int arg)
Calls the apply method and dispatches the change event of the property keyCode
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: keyCode
.
public void initKeyIdentifier(java.lang.String arg)
Calls the apply method and dispatches the change event of the property keyIdentifier
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: keyIdentifier
.
public void initShortcut(java.lang.String arg)
Calls the apply method and dispatches the change event of the property shortcut
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: shortcut
.
public boolean isEnabled()
Check whether the (computed) value of the boolean property enabled
equals true
.
For further details take a look at the property definition: enabled
.
public boolean matchesKeyEvent(KeyEvent e)
Checks whether the given key event matches the command’s shortcut
public void resetEnabled()
Resets the user value of the property enabled
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: enabled
.
public void resetKeyCode()
Resets the user value of the property keyCode
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: keyCode
.
public void resetKeyIdentifier()
Resets the user value of the property keyIdentifier
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: keyIdentifier
.
public void resetShortcut()
Resets the user value of the property shortcut
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: shortcut
.
public void setEnabled(boolean arg)
Sets the user value of the property enabled
.
For further details take a look at the property definition: enabled
.
public void setKeyCode(int arg)
Sets the user value of the property keyCode
.
For further details take a look at the property definition: keyCode
.
public void setKeyIdentifier(java.lang.String arg)
Sets the user value of the property keyIdentifier
.
For further details take a look at the property definition: keyIdentifier
.
public void setShortcut(java.lang.String arg)
Sets the user value of the property shortcut
.
For further details take a look at the property definition: shortcut
.
public boolean toggleEnabled()
Toggles the (computed) value of the boolean property enabled
.
For further details take a look at the property definition: enabled
.
public java.lang.String toString_()
Returns the shortcut as string
toString_
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |