Package jpicedt.graphic.toolkit
Class EditorKit.EditDispositionAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- jpicedt.graphic.toolkit.PEAction
-
- jpicedt.graphic.toolkit.EditorKit.EditDispositionAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action
- Enclosing class:
- EditorKit
public static class EditorKit.EditDispositionAction extends PEAction
Bring one or more selected objets to back, to front, forward or backward. Latter actions work only if a single Element is selected (otherwise it 's really too tedious to work out)- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBACKWARDAction command for moving element backwardstatic java.lang.StringFORWARDAction command for moving element forwardstatic java.lang.StringTOBACKAction command for bringing elements to backstatic java.lang.StringTOFRONTAction command for bringing elements to front
-
Constructor Summary
Constructors Constructor Description EditDispositionAction(ActionDispatcher actionDispatcher, ActionLocalizer localizer, java.lang.String type)Change the layer-disposition of one or more selected objects if there's one (and only ONE ! ) at the time the action is performed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)This is a default implementation of the "actionPerformed" method suited for undoable actions : we first call "beginUndoableUpdate" with "actionName" as the presentation name, then delegate to "undoableActionPerformed", finally mark the undoable-update as ended.-
Methods inherited from class jpicedt.graphic.toolkit.PEAction
getCanvas, getDrawing, getEditorKit, getSelectedObject, setAttribute, undoableActionPerformed
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
TOFRONT
public static final java.lang.String TOFRONT
Action command for bringing elements to front- See Also:
- Constant Field Values
-
TOBACK
public static final java.lang.String TOBACK
Action command for bringing elements to back- See Also:
- Constant Field Values
-
FORWARD
public static final java.lang.String FORWARD
Action command for moving element forward- See Also:
- Constant Field Values
-
BACKWARD
public static final java.lang.String BACKWARD
Action command for moving element backward- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EditDispositionAction
public EditDispositionAction(ActionDispatcher actionDispatcher, ActionLocalizer localizer, java.lang.String type)
Change the layer-disposition of one or more selected objects if there's one (and only ONE ! ) at the time the action is performed.- Parameters:
type- TOFRONT, TOBACK, FORWARD or BACKWARD
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class:PEActionThis is a default implementation of the "actionPerformed" method suited for undoable actions : we first call "beginUndoableUpdate" with "actionName" as the presentation name, then delegate to "undoableActionPerformed", finally mark the undoable-update as ended.Action that don't want to be undoable should simply override this method as usual.
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Overrides:
actionPerformedin classPEAction
-
-