Groovy Documentation

griffon.swing
[Java] Class SwingAction.ActionBuilder

java.lang.Object
  griffon.swing.SwingAction.ActionBuilder

public static class SwingAction.ActionBuilder

A builder for actions.

Authors:
Andres Almiray
Since:
0.9.3


Field Summary
private KeyStroke accelerator

private Action action

private String command

private boolean enabled

private boolean enabledSet

private Icon largeIcon

private String longDescription

private int mnemonic

private boolean mnemonicSet

private String name

private Runnable runnable

private boolean selected

private boolean selectedSet

private String shortDescription

private Icon smallIcon

 
Constructor Summary
SwingAction.ActionBuilder()

SwingAction.ActionBuilder(Action action)

 
Method Summary
Action build()

ActionBuilder withAccelerator(String accelerator)

ActionBuilder withAccelerator(KeyStroke accelerator)

ActionBuilder withClosure(Closure runnable)

ActionBuilder withCommand(String command)

ActionBuilder withEnabled(boolean enabled)

ActionBuilder withLargeIcon(Icon largeIcon)

ActionBuilder withLongDescription(String longDescription)

ActionBuilder withMnemonic(String mnemonic)

ActionBuilder withMnemonic(int mnemonic)

ActionBuilder withName(String name)

ActionBuilder withRunnable(Runnable runnable)

ActionBuilder withRunnable(RunnableWithArgs runnable)

ActionBuilder withSelected(boolean selected)

ActionBuilder withShortDescription(String shortDescription)

ActionBuilder withSmallIcon(Icon smallIcon)

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

accelerator

private KeyStroke accelerator


action

private Action action


command

private String command


enabled

private boolean enabled


enabledSet

private boolean enabledSet


largeIcon

private Icon largeIcon


longDescription

private String longDescription


mnemonic

private int mnemonic


mnemonicSet

private boolean mnemonicSet


name

private String name


runnable

private Runnable runnable


selected

private boolean selected


selectedSet

private boolean selectedSet


shortDescription

private String shortDescription


smallIcon

private Icon smallIcon


 
Constructor Detail

SwingAction.ActionBuilder

public SwingAction.ActionBuilder()


SwingAction.ActionBuilder

public SwingAction.ActionBuilder(Action action)


 
Method Detail

build

public Action build()


withAccelerator

public ActionBuilder withAccelerator(String accelerator)


withAccelerator

public ActionBuilder withAccelerator(KeyStroke accelerator)


withClosure

public ActionBuilder withClosure(Closure runnable)


withCommand

public ActionBuilder withCommand(String command)


withEnabled

public ActionBuilder withEnabled(boolean enabled)


withLargeIcon

public ActionBuilder withLargeIcon(Icon largeIcon)


withLongDescription

public ActionBuilder withLongDescription(String longDescription)


withMnemonic

public ActionBuilder withMnemonic(String mnemonic)


withMnemonic

public ActionBuilder withMnemonic(int mnemonic)


withName

public ActionBuilder withName(String name)


withRunnable

public ActionBuilder withRunnable(Runnable runnable)


withRunnable

public ActionBuilder withRunnable(RunnableWithArgs runnable)


withSelected

public ActionBuilder withSelected(boolean selected)


withShortDescription

public ActionBuilder withShortDescription(String shortDescription)


withSmallIcon

public ActionBuilder withSmallIcon(Icon smallIcon)


 

Groovy Documentation