http://www.jpicedt.org

jpicedt.graphic.toolkit
Class EditorKit.EditDispositionAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by jpicedt.graphic.toolkit.PEAction
          extended by 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
static java.lang.String BACKWARD
          Action command for moving element backward
static java.lang.String FORWARD
          Action command for moving element forward
static java.lang.String TOBACK
          Action command for bringing elements to back
static java.lang.String TOFRONT
          Action command for bringing elements to front
 
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, 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
 void actionPerformed(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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

EditorKit.EditDispositionAction

public EditorKit.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: PEAction
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 java.awt.event.ActionListener
Overrides:
actionPerformed in class PEAction

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org