org.jhotdraw.app.action.edit
Class AbstractSelectionAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.jhotdraw.app.action.edit.AbstractSelectionAction
-
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
- Direct Known Subclasses:
- ClearSelectionAction, CopyAction, CutAction, DuplicateAction, PasteAction, SelectAllAction
public abstract class AbstractSelectionAction extends javax.swing.AbstractActionAbstractSelectionActionacts on the selection of a target component.By default, the action is disabled when the target component is disabled or has no selection. If the target component is null, updateEnabled does nothing. You can change this behavior by overriding method
updateEnabled().This action registers a
WeakPropertyChangeListeneron the component.
Design PatternsFramework
The interfaces and classes listed below work together:
Contract:EditableComponent,JTextComponent.
Client:AbstractSelectionAction,DeleteAction,DuplicateAction,SelectAllAction,ClearSelectionAction.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description AbstractSelectionAction(javax.swing.JComponent target)Creates a new instance which acts on the specified component.
-
Method Summary
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Constructor Detail
-
AbstractSelectionAction
public AbstractSelectionAction(@Nullable javax.swing.JComponent target)
Creates a new instance which acts on the specified component.- Parameters:
target- The target of the action. Specify null for the currently focused component.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG