|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
org.jminor.common.ui.control.Control
public class Control
A beefed up Action.
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 | |
---|---|
Control()
Constructs a new Control. |
|
Control(String name)
Constructs a new Control. |
|
Control(String name,
StateObserver enabledState)
Constructs a new Control. |
|
Control(String name,
StateObserver enabledState,
Icon icon)
Constructs a new Control. |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
|
String |
getDescription()
|
StateObserver |
getEnabledState()
|
Icon |
getIcon()
|
int |
getMnemonic()
|
String |
getName()
|
boolean |
isEnabled()
|
Control |
setDescription(String description)
|
void |
setEnabled(boolean newValue)
|
Control |
setIcon(Icon icon)
|
Control |
setKeyStroke(KeyStroke ks)
|
Control |
setMnemonic(int key)
|
Control |
setName(String name)
|
Methods inherited from class javax.swing.AbstractAction |
---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Control()
public Control(String name)
name
- the control namepublic Control(String name, StateObserver enabledState)
name
- the control nameenabledState
- the state observer dictating the enable state of this controlpublic Control(String name, StateObserver enabledState, Icon icon)
name
- the control nameenabledState
- the state observer dictating the enable state of this controlicon
- the iconMethod Detail |
---|
public final boolean isEnabled()
isEnabled
in interface Action
isEnabled
in class AbstractAction
public final void setEnabled(boolean newValue)
setEnabled
in interface Action
setEnabled
in class AbstractAction
public void actionPerformed(ActionEvent e)
public final String getDescription()
public final Control setDescription(String description)
description
- the description string
public final String getName()
public final Control setName(String name)
name
- the name of this Control instance
public final StateObserver getEnabledState()
public final Control setMnemonic(int key)
key
- the mnemonic to associate with this Control instance
public final int getMnemonic()
public final Control setKeyStroke(KeyStroke ks)
ks
- the KeyStroke to associate with this Control
public final Control setIcon(Icon icon)
icon
- the icon to associate with this Control
public final Icon getIcon()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |