kaapo.projectmanager.command
Class MoveDiagramDownEdit

java.lang.Object
  extended by javax.swing.undo.AbstractUndoableEdit
      extended by kaapo.projectmanager.command.AbstractUndoableEdit
          extended by kaapo.projectmanager.command.MoveDiagramDownEdit
All Implemented Interfaces:
Serializable, UndoableEdit

public class MoveDiagramDownEdit
extends AbstractUndoableEdit

Moves diagram down in projects diagram hierarchy when executed.

Author:
paltamaa
See Also:
Serialized Form

Field Summary
 
Fields inherited from class kaapo.projectmanager.command.AbstractUndoableEdit
pm, visibleDiagram
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
MoveDiagramDownEdit(DiagramWrapper dw)
          Constructs an edit that moves given diagram up in the diagram list.
 
Method Summary
 boolean canRedo()
           
 boolean canUndo()
           
 void execute(ProjectManager pm)
          Executes this edit
 void redo()
           
 void undo()
           
 
Methods inherited from class kaapo.projectmanager.command.AbstractUndoableEdit
changeCorrectVisibleDiagram
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MoveDiagramDownEdit

public MoveDiagramDownEdit(DiagramWrapper dw)
Constructs an edit that moves given diagram up in the diagram list.

Parameters:
dw - diagram to move
Method Detail

execute

public void execute(ProjectManager pm)
             throws EditFailedException
Executes this edit

Specified by:
execute in class AbstractUndoableEdit
Parameters:
pm - the enviroment where the Edit is executed in.
Throws:
EditFailedException - if the edit fails for some reason
See Also:
AbstractUndoableEdit.execute(ProjectManager)

redo

public void redo()
          throws CannotRedoException
Specified by:
redo in interface UndoableEdit
Overrides:
redo in class AbstractUndoableEdit
Throws:
CannotRedoException
See Also:
AbstractUndoableEdit.redo()

undo

public void undo()
          throws CannotUndoException
Specified by:
undo in interface UndoableEdit
Overrides:
undo in class AbstractUndoableEdit
Throws:
CannotUndoException
See Also:
AbstractUndoableEdit.undo()

canRedo

public boolean canRedo()
Specified by:
canRedo in interface UndoableEdit
Overrides:
canRedo in class AbstractUndoableEdit
See Also:
AbstractUndoableEdit.canRedo()

canUndo

public boolean canUndo()
Specified by:
canUndo in interface UndoableEdit
Overrides:
canUndo in class AbstractUndoableEdit
See Also:
AbstractUndoableEdit.canUndo()