uic.action
Class ComponentFocusGainedAction

java.lang.Object
  extended by uic.model.UICSimpleAction
      extended by uic.action.SwingAction
          extended by uic.action.ComponentFocusLostAction
              extended by uic.action.ComponentFocusGainedAction
All Implemented Interfaces:
FocusListener, EventListener

public class ComponentFocusGainedAction
extends ComponentFocusLostAction

An event to respond to focusGained signals. Notice that the default version uses the OnlyLastPolicy. Using this class is easy; just call:

new ComponentFocusGainedAction(this, "firedSlot").add(childComponent); 
This has the result that when the childComponent gaines focus the 'firedSlot' on object 'this' will be called.
Default target signatures
()
(ARGUMENT_SOURCE)
(ARGUMENT_TEMPORARY)
All Targets
ComponentFocusLostAction.ARGUMENT_SOURCE
ComponentFocusLostAction.ARGUMENT_TEMPORARY

Since:
2.0

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
 
Fields inherited from class uic.action.ComponentFocusLostAction
ARGUMENT_SOURCE, ARGUMENT_TEMPORARY
 
Fields inherited from class uic.action.SwingAction
updateUICommmand
 
Fields inherited from class uic.model.UICSimpleAction
currentPolicy, target, targetObject
 
Constructor Summary
ComponentFocusGainedAction(Object targetObject, String targetMethod)
          Create a new ComponentFocusGainedAction.
ComponentFocusGainedAction(Object targetObject, String targetMethod, UICSimpleAction.Arguments arguments)
          Create a new ComponentFocusGainedAction.
 
Method Summary
 void focusGained(FocusEvent evt)
           
 void focusLost(FocusEvent evt)
           
 
Methods inherited from class uic.action.ComponentFocusLostAction
add, getArgumentClass, getArgumentValue, getTargetSignatures
 
Methods inherited from class uic.action.SwingAction
doAction, getComponentsIterator, registerComponent, setEnabled, setUIUpdateCommand, setUIUpdateCommand
 
Methods inherited from class uic.model.UICSimpleAction
createArguments, equals, execute, execute, execute, execute, isEnabled, setDirect, setExecutionPolicy, setTarget, setTarget
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentFocusGainedAction

public ComponentFocusGainedAction(Object targetObject,
                                  String targetMethod)
Create a new ComponentFocusGainedAction.

Parameters:
targetObject - on which object should the target method be invoked
targetMethod - wich method on the targetObject should be invoked

ComponentFocusGainedAction

public ComponentFocusGainedAction(Object targetObject,
                                  String targetMethod,
                                  UICSimpleAction.Arguments arguments)
Create a new ComponentFocusGainedAction.

Parameters:
targetObject - on which object should the target method be invoked
targetMethod - wich method on the targetObject should be invoked
arguments - to be used in finding the targetMethod signature
See Also:
UICSimpleAction.setTarget(Object,String,uic.model.UICSimpleAction.Arguments)
Method Detail

focusGained

public void focusGained(FocusEvent evt)
Specified by:
focusGained in interface FocusListener
Overrides:
focusGained in class ComponentFocusLostAction

focusLost

public void focusLost(FocusEvent evt)
Specified by:
focusLost in interface FocusListener
Overrides:
focusLost in class ComponentFocusLostAction


Copyright © 2002-2004 Thomas Zander Available under the Free Apache licence