com.eteks.sweethome3d.swing
Class ResourceAction
java.lang.Object
javax.swing.AbstractAction
com.eteks.sweethome3d.swing.ResourceAction
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
- Direct Known Subclasses:
- ControllerAction
public class ResourceAction
- extends AbstractAction
An action with properties read from a resource bundle file.
- Author:
- Emmanuel Puybaret
- See Also:
- Serialized Form
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary |
ResourceAction(UserPreferences preferences,
Class<?> resourceClass,
String actionPrefix)
Creates a disabled action with properties retrieved from a resource bundle
in which key starts with actionPrefix . |
ResourceAction(UserPreferences preferences,
Class<?> resourceClass,
String actionPrefix,
boolean enabled)
Creates an action with properties retrieved from a resource bundle
in which key starts with actionPrefix . |
POPUP
public static final String POPUP
- See Also:
- Constant Field Values
TOGGLE_BUTTON_MODEL
public static final String TOGGLE_BUTTON_MODEL
- See Also:
- Constant Field Values
ResourceAction
public ResourceAction(UserPreferences preferences,
Class<?> resourceClass,
String actionPrefix)
- Creates a disabled action with properties retrieved from a resource bundle
in which key starts with
actionPrefix
.
- Parameters:
preferences
- user preferences used to retrieve localized properties of the actionresourceClass
- the class used as a context to retrieve localized properties of the actionactionPrefix
- prefix used in resource bundle to search action properties
ResourceAction
public ResourceAction(UserPreferences preferences,
Class<?> resourceClass,
String actionPrefix,
boolean enabled)
- Creates an action with properties retrieved from a resource bundle
in which key starts with
actionPrefix
.
- Parameters:
preferences
- user preferences used to retrieve localized description of the actionresourceClass
- the class used as a context to retrieve localized properties of the actionactionPrefix
- prefix used in resource bundle to search action propertiesenabled
- true
if the action should be enabled at creation.
actionPerformed
public void actionPerformed(ActionEvent ev)
- Unsupported operation. Subclasses should override this method if they want
to associate a real action to this class.