de.matthiasmann.twl
Class ActionCallback

java.lang.Object
  extended by de.matthiasmann.twl.ActionCallback
All Implemented Interfaces:
java.lang.Runnable

public final class ActionCallback
extends java.lang.Object
implements java.lang.Runnable

A callback to invoke an action on either a Widget's actionMap or on an directly passed action map.


Constructor Summary
ActionCallback(ActionMap actionMap, java.lang.String action)
          Creates a callback invoking an action on actionMap.
ActionCallback(Widget widget, java.lang.String action)
          Creates a callback invoking an action on the widget's actionMap.
 
Method Summary
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionCallback

public ActionCallback(Widget widget,
                      java.lang.String action)
Creates a callback invoking an action on the widget's actionMap. If the widget has no actionMap then no action is performed.

Parameters:
widget - the widget
action - the action
Throws:
java.lang.NullPointerException - if either widget or action is null
See Also:
Widget.getActionMap()

ActionCallback

public ActionCallback(ActionMap actionMap,
                      java.lang.String action)
Creates a callback invoking an action on actionMap.

Parameters:
actionMap - the actionMap to use
action - the action
Throws:
java.lang.NullPointerException - if either actionMap or action is null
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable