kaapo.projectmanager.command
Class RemoveDiagramEdit

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

public class RemoveDiagramEdit
extends AbstractUndoableEdit

An UndoableEdit that removes the current visible Diagram in ProjectManager or a given Diagram from a Project.

Author:
hprajani
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
RemoveDiagramEdit()
          constructor to edit that removes the visible diagram
RemoveDiagramEdit(DiagramWrapper diagram)
          constuctor to edit that removes the given diagram
 
Method Summary
 void execute(ProjectManager pm)
          Adds a new Diagram to current Project and sets it visible in the ProjectManager
 void redo()
           
 void undo()
           
 
Methods inherited from class kaapo.projectmanager.command.AbstractUndoableEdit
canRedo, canUndo, 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

RemoveDiagramEdit

public RemoveDiagramEdit()
constructor to edit that removes the visible diagram


RemoveDiagramEdit

public RemoveDiagramEdit(DiagramWrapper diagram)
constuctor to edit that removes the given diagram

Parameters:
diagram -
Method Detail

undo

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

redo

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

execute

public void execute(ProjectManager pm)
Adds a new Diagram to current Project and sets it visible in the ProjectManager

Specified by:
execute in class AbstractUndoableEdit
Parameters:
pm - the enviroment where the Edit is executed in.
See Also:
AbstractUndoableEdit.execute(kaapo.projectmanager.ProjectManager)