public abstract class PuffinAction
extends javax.swing.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.
|
Constructor and Description |
---|
PuffinAction(java.lang.String name,
java.lang.String description)
Creates a new PuffinAction with the specified parameters.
|
PuffinAction(java.lang.String name,
java.lang.String description,
java.lang.Character accelerator,
boolean shift,
java.lang.Integer mnemonic)
Creates a new PuffinAction with the specified parameters.
|
PuffinAction(java.lang.String name,
java.lang.String description,
java.lang.Character accelerator,
boolean shift,
java.lang.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
public static final int modifierKey
public PuffinAction(java.lang.String name, java.lang.String description, java.lang.Character accelerator, boolean shift, java.lang.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(java.lang.String name, java.lang.String description, java.lang.Character accelerator, boolean shift, java.lang.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 PuffinAction(java.lang.String name, java.lang.String description)
name
- the name of the Action (used for the menu item)description
- a short description of the Action (used for the tooltip)public boolean isExcludedFromMenu()
true
if this Action should not be shown on menus