Package de.sciss.gui
Class KeyedAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- de.sciss.gui.KeyedAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action
- Direct Known Subclasses:
DoClickAction
public abstract class KeyedAction extends javax.swing.AbstractActionA specialActionclass whose constructor requires an accelerator key. When the action listener is invoked, the current keyboard focus component is queried. If a text editing component has the focus, the action is silently aborted. Otherwise the abstract methodvalidActionPerformedis called. This method must be overriden by subclasses. This allows global keyboard commands without modifier keys to be installed and they won't interfer when the user edits text fields.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description KeyedAction(javax.swing.KeyStroke stroke)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)booleangetIgnoreFocus()javax.swing.KeyStrokegetStroke()voidsetIgnoreFocus(boolean ignore)protected abstract voidvalidActionPerformed(java.awt.event.ActionEvent e)-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Method Detail
-
setIgnoreFocus
public void setIgnoreFocus(boolean ignore)
-
getIgnoreFocus
public boolean getIgnoreFocus()
-
getStroke
public javax.swing.KeyStroke getStroke()
-
actionPerformed
public final void actionPerformed(java.awt.event.ActionEvent e)
-
validActionPerformed
protected abstract void validActionPerformed(java.awt.event.ActionEvent e)
-
-