kawigi.cmd
Class EditorAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by kawigi.cmd.DefaultAction
          extended by kawigi.cmd.EditorAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class EditorAction
extends DefaultAction

This is the big thing that controls common editor commands that act on a specific CodePane. Since they act on a code pane, they are local actions, and the context is the CodePane, and they should belong to a non-global dispatcher. Examples of actions implemented here include copy, paste, undo, and indent.

See Also:
Serialized Form

Field Summary
protected  CodePane context
          The CodePane this action should act on.
 
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
EditorAction(ActID cmdid, CodePane context)
          Constructs a new EditorAction that executes the ActID on the CodePane.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Runs the action of the command.
 boolean isEnabled()
          Returns true if a button for this action should appear enabled.
 
Methods inherited from class kawigi.cmd.DefaultAction
equals, getID, isNeedTrackEnabled, 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

context

protected CodePane context
The CodePane this action should act on.

Constructor Detail

EditorAction

public EditorAction(ActID cmdid,
                    CodePane context)
Constructs a new EditorAction that executes the ActID on the CodePane.

Method Detail

isEnabled

public boolean isEnabled()
Returns true if a button for this action should appear enabled.

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 action of the command.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Specified by:
actionPerformed in class DefaultAction