public abstract class PuffinAction extends AbstractAction
Modifier and Type | Field and Description |
---|---|
static int |
modifierKey
The standard modifier key for the platform; generally, this will
correspond to Ctrl on most systems, and ⌘ (‘Apple key’) on
Mac OS X systems.
|
changeSupport, enabled
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 and Description |
---|
PuffinAction(String name,
String description)
Creates a new PuffinAction with the specified parameters.
|
PuffinAction(String name,
String description,
Character accelerator,
boolean shift,
Integer mnemonic)
Creates a new PuffinAction with the specified parameters.
|
PuffinAction(String name,
String description,
Character accelerator,
boolean shift,
Integer mnemonic,
boolean specialMacMenuItem,
int modifier)
Creates a new PuffinAction with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isExcludedFromMenu()
Determines whether the Action should be excluded from the normal
application menus (on the grounds that it already exists in a
special Mac OS X menu and the application is being run on Mac OS X).
|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
actionPerformed
public static final int modifierKey
public PuffinAction(String name, String description, Character accelerator, boolean shift, Integer mnemonic, boolean specialMacMenuItem, int modifier)
name
- the name of the Action (used for the menu item)description
- a short description of the Action (used for the tooltip)accelerator
- the accelerator key (keyboard shortcut) for the Action.
If null
, no accelerator will be setshift
- true
if the accelerator should require shift to be held downmnemonic
- mnemonic key (used to select the Action from a menu when the
menu is open); if null
, no mnemonic key will be setspecialMacMenuItem
- if true
, no menu item should be
created on Mac OS X, because this Action (e.g. ‘quit’) is
conventionally reached via a different interface (e.g. the
application menu) under Mac OS Xmodifier
- the modifier key (usually 0
for no modifier
key, or modifierKey
for an automatically chosen
platform-appropriate modifier key (ctrl or ‘apple’).public PuffinAction(String name, String description, Character accelerator, boolean shift, Integer mnemonic)
name
- the name of the Action (used for the menu item)description
- a short description of the Action (used for the tooltip)accelerator
- the accelerator key (keyboard shortcut) for the Action.
If null
, no accelerator will be setshift
- true
if the accelerator should require shift to be held downmnemonic
- mnemonic key (used to select the Action from a menu when the
menu is open); if null
, no mnemonic key will be setpublic boolean isExcludedFromMenu()
true
if this Action should not be shown on menusCopyright © 2022. All rights reserved.