org.openide.awt 7.31.1

org.openide.awt
Annotation Type ActionRegistration


@Retention(value=SOURCE)
@Target(value={TYPE,FIELD,METHOD})
public @interface ActionRegistration

Registers an action under associated identifier specified by separate ActionID annotation on the same element. Here is few usage examples:

Since:
7.26

Required Element Summary
 String displayName
          Display name.
 
Optional Element Summary
 boolean asynchronous
          Shall the action be performed outside of AWT thread.
 String iconBase
          Path to image representing the action's icon.
 boolean iconInMenu
          Shall the action's icon be visible in menu?
 String key
          Shall this action be associated with a particular key in an ActionMap? E.g.
 boolean surviveFocusChange
          Shall the action work on last selection when it was enabled?
 

Element Detail

displayName

public abstract String displayName
Display name. Usually prefixed with '#' to reference value from a Bundle.properties file in the same package.

Returns:
display name for the action

iconBase

public abstract String iconBase
Path to image representing the action's icon.

Returns:
"org/myproject/mypkg/Icon.png"
Default:
""

iconInMenu

public abstract boolean iconInMenu
Shall the action's icon be visible in menu?

Returns:
true or false
Default:
true

key

public abstract String key
Shall this action be associated with a particular key in an ActionMap? E.g. behave like Actions.callback(java.lang.String, javax.swing.Action, boolean, java.lang.String, java.lang.String, boolean) one?

Returns:
the value of the key to seek in currently selected ActionMap
Default:
""

asynchronous

public abstract boolean asynchronous
Shall the action be performed outside of AWT thread.

Returns:
false, if the action shall run synchronously
Default:
false

surviveFocusChange

public abstract boolean surviveFocusChange
Shall the action work on last selection when it was enabled?

Default:
false

org.openide.awt 7.31.1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.