com.klg.jclass.util.swing
Class JCAction
java.lang.Object
|
+--com.klg.jclass.util.swing.JCAction
- All Implemented Interfaces:
- Action, ActionListener, EventListener, Serializable
- Direct Known Subclasses:
- BaseWizardPage.CancelAction, BaseWizardPage.HelpAction, BaseWizardPage.NextAction, BaseWizardPage.PreviousAction, JCMDIPane.ArrangeAction, JCMDIPane.CascadeAction, JCMDIPane.MaxMinAction, JCMDIPane.TileHAction, JCMDIPane.TileVAction
- public abstract class JCAction
- extends Object
- implements Action, Serializable
Abstract implementation of Action
interface, but also adds
i18n/l10n functionality.
Key enhancements are implementations of Accelerator
and
Mnemonic
support. Does not implement
actionPerformed()
.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT
public static final String DEFAULT
- See Also:
- Constant Field Values
NAME
public static final String NAME
- See Also:
- Constant Field Values
SHORT_DESCRIPTION
public static final String SHORT_DESCRIPTION
- See Also:
- Constant Field Values
LONG_DESCRIPTION
public static final String LONG_DESCRIPTION
- See Also:
- Constant Field Values
SMALL_ICON
public static final String SMALL_ICON
- See Also:
- Constant Field Values
ACCELERATOR
public static final String ACCELERATOR
- See Also:
- Constant Field Values
MNEMONIC
public static final String MNEMONIC
- See Also:
- Constant Field Values
values
protected Vector values
enabled
protected boolean enabled
property
protected PropertyChangeSupport property
name
protected String name
JCAction
public JCAction(String name)
JCAction
public JCAction(String label,
Integer mnemonic,
KeyStroke accelerator)
- Creates an action.
- Parameters:
label
- Label of the action used when creating buttons. On request of
the NAME, this value will be used as a key into the
JCLocaleManager
's default implementation. If the key is not
found therein, it will be returned directly.mnemonic
- mnemonic key to use when constructing a menu itemaccelerator
- accelerator key to use when constructing a menu item
or button- See Also:
JCMenu
,
JCLocaleManager
JCAction
public JCAction(String label,
int mnemonic,
KeyStroke accelerator)
getValue
public Object getValue(String key)
- Specified by:
getValue
in interface Action
putValue
public void putValue(String key,
Object v)
- Specified by:
putValue
in interface Action
setEnabled
public void setEnabled(boolean b)
- Specified by:
setEnabled
in interface Action
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interface Action
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
- Specified by:
addPropertyChangeListener
in interface Action
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
- Specified by:
removePropertyChangeListener
in interface Action
createButton
public JButton createButton(boolean use_mnemonic)
createButton
public JButton createButton()
createMenu
public JMenu createMenu()
createMenuItem
public JMenuItem createMenuItem()