com.eteks.sweethome3d.swing
Class ResourceAction
java.lang.Object
javax.swing.AbstractAction
com.eteks.sweethome3d.swing.ResourceAction
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
- Direct Known Subclasses:
- ControllerAction
public class ResourceAction
- extends javax.swing.AbstractAction
An action with properties read from a resource bundle file.
- Author:
- Emmanuel Puybaret
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
POPUP
|
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
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,
java.lang.Class<?> resourceClass,
java.lang.String actionPrefix)
Creates a disabled action with properties retrieved from a resource bundle
in which key starts with actionPrefix . |
ResourceAction(UserPreferences preferences,
java.lang.Class<?> resourceClass,
java.lang.String actionPrefix,
boolean enabled)
Creates an action with properties retrieved from a resource bundle
in which key starts with actionPrefix . |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent ev)
Unsupported operation. |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
POPUP
public static final java.lang.String POPUP
- See Also:
- Constant Field Values
ResourceAction
public ResourceAction(UserPreferences preferences,
java.lang.Class<?> resourceClass,
java.lang.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,
java.lang.Class<?> resourceClass,
java.lang.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(java.awt.event.ActionEvent ev)
- Unsupported operation. Subclasses should override this method if they want
to associate a real action to this class.