Package com.tagtraum.core.app
Class ApplicationAction.ApplicationActionFacade
- java.lang.Object
-
- javax.swing.AbstractAction
-
- com.tagtraum.core.app.ApplicationAction
-
- com.tagtraum.core.app.ApplicationAction.ApplicationActionFacade
-
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
- Enclosing class:
- ApplicationAction
public static class ApplicationAction.ApplicationActionFacade extends ApplicationAction
Facade that suppresses certain action properties so that the action that may have rich icons etc can also be used in other contexts.- Author:
- Hendrik Schreiber
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tagtraum.core.app.ApplicationAction
ApplicationAction.ApplicationActionFacade
-
-
Field Summary
-
Fields inherited from class com.tagtraum.core.app.ApplicationAction
BUTTON_MODEL, DISABLED_ICON, DISABLED_SELECTED_ICON, PRESSED_ICON, ROLLOVER_ICON, SELECTED_ICON, SHORT_NAME
-
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
Constructors Constructor Description ApplicationActionFacade(ApplicationAction wrappedAction, String... validPropertiesArray)
Action Facade.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(ActionEvent e)
String
getId()
Returns a unique id for this action.Object
getValue(String key)
Returns only valid properties (supported by this facade).ApplicationAction
getWrappedAction()
The original/wrapped action.boolean
isEnabled()
void
setEnabled(boolean enabled)
-
Methods inherited from class com.tagtraum.core.app.ApplicationAction
getActionLocations, getButtonModel, getIconButtonFacade, getMenuFacade, getToolbarButtonFacade, isVisible, register, setButtonModel, setVisible
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, putValue, removePropertyChangeListener
-
-
-
-
Constructor Detail
-
ApplicationActionFacade
public ApplicationActionFacade(ApplicationAction wrappedAction, String... validPropertiesArray)
Action Facade.- Parameters:
wrappedAction
- action this facade is forvalidPropertiesArray
- valid properties
-
-
Method Detail
-
getWrappedAction
public ApplicationAction getWrappedAction()
The original/wrapped action.- Returns:
- action
-
getValue
public Object getValue(String key)
Returns only valid properties (supported by this facade).- Specified by:
getValue
in interfaceAction
- Overrides:
getValue
in classAbstractAction
- Parameters:
key
- key- Returns:
- value or null
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabled
in interfaceAction
- Overrides:
setEnabled
in classAbstractAction
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceAction
- Overrides:
isEnabled
in classAbstractAction
-
getId
public String getId()
Description copied from class:ApplicationAction
Returns a unique id for this action. Typically follows thex.y.z
notation from general to specific.- Specified by:
getId
in classApplicationAction
- Returns:
- unique id for this action
-
actionPerformed
public void actionPerformed(ActionEvent e)
-
-