Package com.nomagic.actions
Class ColorChooseAction
java.lang.Object
javax.swing.AbstractAction
com.nomagic.actions.NMAction
com.nomagic.actions.ColorChooseAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,Comparable
,EventListener
,Action
Action for choosing a color.
- See Also:
-
Field Summary
Fields inherited from class com.nomagic.actions.NMAction
ACTION_SHORTCUTS, BELONGS_TO_SEPARATE_GROUP_IN_UI, DO_NO_SHOW_ACTION_NAME_IN_UI, DO_NOT_REGISTER_ACTION_TO_COMPONENTS, GENERATED_ID_PREFIX, GROUP, ID, LARGE_ICON, MENU_SHORTCUT_MASK, TINY_ICON
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
ConstructorDescriptionColorChooseAction
(String moreLabel, String noFillLabel, boolean noFillAvailable, Color[] recentColors) Constructs new color action. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Shows ColorPallet in JPopupMenu when this action is performed.getColor()
Returns color selected by this action.Methods inherited from class com.nomagic.actions.NMAction
accept, addAction, addPropertyChangeListener, addShortcut, addShotcut, addWeakPropertyChangeListener, clone, compareTo, createMenuItem, equals, firePropertyChange, forEach, forEachIncludingSelf, getActions, getCommandKey, getDescription, getGroup, getIcon, getID, getLargeIcon, getLargeOrSmallIcon, getMenuShortcutMaskAsString, getMnemonicKey, getName, getPropertyChangeListeners, getShortcuts, getSmallIcon, getSmallOrLargeIcon, getTinyIcon, hashCode, hasMenuShortcutMask, isIDGenerated, removeAction, removeIf, removePropertyChangeListener, removeShortcut, removeWeakPropertyChangeListener, setActions, setDescription, setGroup, setIcon, setLargeIcon, setMnemonicKey, setName, setShortcuts, setSmallIcon, setTinyIcon, shallowClone, toString, updateState
Methods inherited from class javax.swing.AbstractAction
getKeys, getValue, isEnabled, putValue, setEnabled
-
Constructor Details
-
Method Details
-
actionPerformed
Shows ColorPallet in JPopupMenu when this action is performed. For showing popup event source parent is used.- Specified by:
actionPerformed
in interfaceActionListener
- Specified by:
actionPerformed
in classNMAction
- Parameters:
e
- an event caused invocation
-
getColor
Returns color selected by this action.- Returns:
- the selected color.
-