Sweet Home 3D 4.1

com.eteks.sweethome3d.swing
Class ResourceAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by 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

Nested Class Summary
static class ResourceAction.ButtonAction
          An action decorator for buttons.
static class ResourceAction.MenuItemAction
          An action decorator for menu items.
static class ResourceAction.PopupMenuItemAction
          An action decorator for popup menu items.
static class ResourceAction.ToolBarAction
          An action decorator for tool bar buttons.
 
Field Summary
static String POPUP
           
static String TOGGLE_BUTTON_MODEL
           
 
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, 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.
 
Method Summary
 void actionPerformed(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
 

Field Detail

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
Constructor Detail

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 action
resourceClass - the class used as a context to retrieve localized properties of the action
actionPrefix - 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 action
resourceClass - the class used as a context to retrieve localized properties of the action
actionPrefix - prefix used in resource bundle to search action properties
enabled - true if the action should be enabled at creation.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent ev)
Unsupported operation. Subclasses should override this method if they want to associate a real action to this class.


Sweet Home 3D 4.1

© Copyrights 2006-2013 eTeks - All rights reserved
Distributed under GNU General Public License