kawigi.cmd
Class TemplateAction
java.lang.Object
javax.swing.AbstractAction
kawigi.cmd.DefaultAction
kawigi.cmd.TemplateAction
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class TemplateAction
- extends DefaultAction
Action implementation for Template editor actions.
- See Also:
- Serialized Form
| 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 |
TemplateAction(ActID cmdid)
Constructs a new TemplateAction for the given ActID. |
|
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent e)
Runs the command. |
boolean |
isEnabled()
Returns true if these actions are available. |
static void |
save(boolean prompt)
Saves the current file. |
| 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 |
TemplateAction
public TemplateAction(ActID cmdid)
- Constructs a new TemplateAction for the given ActID.
isEnabled
public boolean isEnabled()
- Returns true if these actions are available.
- Specified by:
isEnabled in interface javax.swing.Action- Overrides:
isEnabled in class javax.swing.AbstractAction
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Runs the command.
- Specified by:
actionPerformed in interface java.awt.event.ActionListener- Specified by:
actionPerformed in class DefaultAction
save
public static void save(boolean prompt)
- Saves the current file.
Prompts the user for the file to save to if necessary, or if prompt is true.