Module com.iamsoft.util.ui
Class AbstractActivateableAction
java.lang.Object
javax.swing.AbstractAction
com.iamsoft.util.ui.swing.activation.AbstractActivateableAction
- All Implemented Interfaces:
Activatable
,ActionListener
,Serializable
,Cloneable
,EventListener
,Action
- Direct Known Subclasses:
SwingAction
Adapts action to Activatable interface.
- See Also:
-
Field Summary
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
ConstructorsConstructorDescriptionAbstractActivateableAction
(String pName) AbstractActivateableAction
(String pName, Icon pIcon) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addActivationCriterion
(ActivationCriterion pCriterion) Convenience method.static boolean
Display reasons for being disabled in tooltip text.Display reasons for being disabled in tooltip text.void
static void
setDisplayingDisablementReasonsByDefault
(boolean pDisplayingDisablementReasonsByDefault) void
setEnabled
(boolean pEnabled) static String
stripTooltip
(String pTooltip) Removes HTML and disablement info from tooltip.Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, removePropertyChangeListener
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
-
Constructor Details
-
AbstractActivateableAction
public AbstractActivateableAction() -
AbstractActivateableAction
-
AbstractActivateableAction
-
-
Method Details
-
isDisplayingDisablementReasonsByDefault
public static boolean isDisplayingDisablementReasonsByDefault()Display reasons for being disabled in tooltip text. -
getActivatableFacade
- Specified by:
getActivatableFacade
in interfaceActivatable
-
isDisplayingDisablementReasonsByOverride
Display reasons for being disabled in tooltip text. If null, value is taken from sDisplayingDisablementReasonsByDefault. -
setDisplayingDisablementReasonsByDefault
public static void setDisplayingDisablementReasonsByDefault(boolean pDisplayingDisablementReasonsByDefault) -
setEnabled
public void setEnabled(boolean pEnabled) - Specified by:
setEnabled
in interfaceAction
- Overrides:
setEnabled
in classAbstractAction
-
addActivationCriterion
Convenience method. -
putValue
- Specified by:
putValue
in interfaceAction
- Overrides:
putValue
in classAbstractAction
-
stripTooltip
Removes HTML and disablement info from tooltip.
-