Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Generated Object

A javax.swing.Action object, of some sort.

Value Argument

A pre-existing javax.swing.Action instance can be provided. In this cases the attributes will be applied to that action instead of createing a new groovy.swing.impl.DefaultAction.

Attributes

  • closure <Closure> The action to be performed when the actionPerformend method is called. The actionEvent will be the only parameter passed in.
  • name <String> The name to be shown on a button or menu item
  • shortDescription <String> The text to be displayed as a button's tool tip
  • smallIcon <String> The icon shown on the button or menu item
  • actionCommandKey <String> Sets the actionCommand on the button or menu item
  • accelerator <String> or <KeyStroke> The keyboard accelerator for a menu item to associate with this action
  • mnemonic <char> or <String> The mnemonic for the action in the button or menu item
  • enabled <boolean> Whether this action is enabled. Will be reflected in enabled state of button or menu item

unused Action magic values

  • longDescription <String> Intended for context sensitive help (like a status bar).

Content

No content is accepted by an action() node.

Usage

Actions are the lifeblood of a full fledged swing application. Other sources can expound on their usefullness.

Examples

//TBD

  • No labels