public class DefaultAction
extends AbstractAction
An Action implementation that delegates execution to a Groovy closure.
| Fields inherited from class | Fields |
|---|---|
class AbstractAction |
DEFAULT, NAME, SHORT_DESCRIPTION, LONG_DESCRIPTION, SMALL_ICON, ACTION_COMMAND_KEY, ACCELERATOR_KEY, MNEMONIC_KEY, SELECTED_KEY, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
actionPerformed(ActionEvent event)Invokes the configured closure in response to the action event. |
|
public Closure |
getClosure()Returns the closure invoked when the action fires. |
|
public void |
setClosure(Closure closure)Sets the closure invoked when the action fires. |
| Methods inherited from class | Name |
|---|---|
class AbstractAction |
accept, actionPerformed, addPropertyChangeListener, equals, getClass, getKeys, getPropertyChangeListeners, getValue, hashCode, isEnabled, notify, notifyAll, putValue, removePropertyChangeListener, setEnabled, toString, wait, wait, wait |
Invokes the configured closure in response to the action event.
event - the Swing action eventReturns the closure invoked when the action fires.
nullSets the closure invoked when the action fires.
closure - the action closure