http://www.jpicedt.org

jpicedt.graphic.toolkit
Class EditorKit.EditDispositionAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by jpicedt.graphic.toolkit.PEAbstractAction<Element>
          extended by jpicedt.graphic.toolkit.PEAction
              extended by jpicedt.graphic.toolkit.EditorKit.EditDispositionAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, 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
static String BACKWARD
          Action command for moving element backward
static String FORWARD
          Action command for moving element forward
static String TOBACK
          Action command for bringing elements to back
static String TOFRONT
          Action command for bringing elements to front
 
Fields inherited from class jpicedt.graphic.toolkit.PEAbstractAction
targetElement
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
EditorKit.EditDispositionAction(ActionDispatcher actionDispatcher, ActionLocalizer localizer, String type)
          Change the layer-disposition of one or more selected objects if there's one (and only ONE !
 
Method Summary
 void actionPerformed(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
getIterator, setAttribute
 
Methods inherited from class jpicedt.graphic.toolkit.PEAbstractAction
getCanvas, getDrawing, getEditorKit, getSelectedObject, setSelectedObject, undoableActionPerformed
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOFRONT

public static final String TOFRONT
Action command for bringing elements to front

See Also:
Constant Field Values

TOBACK

public static final String TOBACK
Action command for bringing elements to back

See Also:
Constant Field Values

FORWARD

public static final String FORWARD
Action command for moving element forward

See Also:
Constant Field Values

BACKWARD

public static final String BACKWARD
Action command for moving element backward

See Also:
Constant Field Values
Constructor Detail

EditorKit.EditDispositionAction

public EditorKit.EditDispositionAction(ActionDispatcher actionDispatcher,
                                       ActionLocalizer localizer,
                                       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(ActionEvent e)
Description copied from class: PEAbstractAction
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.

Action that don't want to be undoable should simply override this method as usual.

Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class PEAbstractAction<Element>

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org