|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uic.model.UICSimpleAction uic.action.SwingAction
public abstract class SwingAction
Nested Class Summary |
---|
Nested classes/interfaces inherited from class uic.model.UICSimpleAction |
---|
UICSimpleAction.Arguments, UICSimpleAction.DirectMultiThreadingPolicy, UICSimpleAction.DirectPolicy, UICSimpleAction.ExecutePolicy, UICSimpleAction.OnlyLastPolicy, UICSimpleAction.QueuedPolicy, UICSimpleAction.SimpleQueuedPolicy |
Field Summary | |
---|---|
protected UICSimpleAction |
updateUICommmand
|
Fields inherited from class uic.model.UICSimpleAction |
---|
currentPolicy, target, targetObject |
Constructor Summary | |
---|---|
SwingAction(Object targetObject,
String targetMethod)
|
|
SwingAction(Object targetObject,
String targetMethod,
UICSimpleAction.Arguments args)
|
Method Summary | |
---|---|
protected void |
doAction(Object[] args)
Called to actually execute the action on the registered method. |
Iterator |
getComponentsIterator()
Returns an iterator over all added components. |
protected void |
registerComponent(Component comp)
Add a component to be managed and listened to by this action. |
void |
setEnabled(boolean enabled)
Enable disable this action and all its registered components. |
void |
setUIUpdateCommand(Object object,
String targetMethod)
Set an additional target for this action which will be in the AWT Thread. |
void |
setUIUpdateCommand(Object object,
String targetMethod,
UICSimpleAction.Arguments arguments)
Set an additional target for this action which will be in the AWT Thread. |
Methods inherited from class uic.model.UICSimpleAction |
---|
createArguments, equals, execute, execute, execute, execute, getArgumentClass, getArgumentValue, getTargetSignatures, isEnabled, setDirect, setExecutionPolicy, setTarget, setTarget |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected UICSimpleAction updateUICommmand
Constructor Detail |
---|
public SwingAction(Object targetObject, String targetMethod)
public SwingAction(Object targetObject, String targetMethod, UICSimpleAction.Arguments args)
Method Detail |
---|
protected void registerComponent(Component comp)
comp
- the component to be managedpublic Iterator getComponentsIterator()
registerComponent(java.awt.Component)
public void setEnabled(boolean enabled)
setEnabled
in class UICSimpleAction
enabled
- the new state of the action.protected void doAction(Object[] args)
UICSimpleAction
doAction
in class UICSimpleAction
public void setUIUpdateCommand(Object object, String targetMethod) throws IllegalArgumentException
In Swing many changes to model and widgets are not safe to do from any thread but the event-handling thread that Swing starts itself. This event-handling thread is called the AWT Event Thread and handles button clicks and any other user event, as well as repaints.
It is wise to move updates to various widgets to an extra UIUpdateCommand and register it using this method.
For the arguments see: setTarget
IllegalArgumentException
public void setUIUpdateCommand(Object object, String targetMethod, UICSimpleAction.Arguments arguments) throws IllegalArgumentException
In Swing many changes to model and widgets are not safe to do from any thread but the event-handling thread that Swing starts itself. This event-handling thread is called the AWT Event Thread and handles button clicks and any other user event, as well as repaints.
It is wise to move updates to various widgets to an extra UIUpdateCommand and register it using this method.
For the arguments see: setTarget
IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |