|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.AbstractAction
kawigi.cmd.DefaultAction
kawigi.cmd.SettingAction
public class SettingAction
Action implementation for setting actions. This class really serves two purposes. The first is to implement actions that are related to settings but aren't settings themselves (for instance, launching the config dialog and the OK and Cancel buttons on the config dialog). The other purpose is that it's the base class of all setting actions. As part of this, there are a set of static variables and methods that are shared by all setting instances. The intended behavior is that if the settings dialog is up, all settings are set on a temporary prefs object, and committed when the "OK" button is pushed. Otherwise, the setting is applied immediately. Therefore, if buttons bound to setting actions are put on the main UI somewhere, they will be effective immediately on being used, but settings done on the dialog are cancellable.
| Field Summary | |
|---|---|
protected static javax.swing.JDialog |
dialog
Reference to the config dialog. |
protected static PrefProxy |
tempPrefs
Temporary storage for settings until the settings dialog is committed. |
| Fields inherited from class kawigi.cmd.DefaultAction |
|---|
cmdid, COLOR, enableSet, FONT, LARGE_ICON, SELECTED, SPINNER_MODEL, SPINNER_VALUE, TEXT, visible, VISIBLE, visibleSet |
| Fields inherited from class javax.swing.AbstractAction |
|---|
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
|---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
|---|---|
SettingAction(ActID cmdid)
Constructs a new SettingAction for the given ActID. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Executes the non-setting setting commands. |
protected static boolean |
delayNotify()
Returns true if settings shouldn't be committed yet. |
void |
doUpdates()
Does all the commital actions that need to happen assuming all settings were changed at once. |
protected static PrefProxy |
getCurrentPrefs()
Returns the temporary prefs if there is one, otherwise the real KawigiEdit prefs. |
boolean |
isEnabled()
Returns true if this action is available. |
| Methods inherited from class kawigi.cmd.DefaultAction |
|---|
equals, getID, isVisible, reportError, setVisible, UIRefresh |
| Methods inherited from class javax.swing.AbstractAction |
|---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static PrefProxy tempPrefs
protected static javax.swing.JDialog dialog
| Constructor Detail |
|---|
public SettingAction(ActID cmdid)
| Method Detail |
|---|
protected static PrefProxy getCurrentPrefs()
protected static boolean delayNotify()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListeneractionPerformed in class DefaultActionpublic boolean isEnabled()
isEnabled in interface javax.swing.ActionisEnabled in class javax.swing.AbstractActionpublic void doUpdates()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||