pl.edu.agh.cast.backward.command
Class RenameDiagramCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by pl.edu.agh.cast.backward.command.RenameDiagramCommand

public class RenameDiagramCommand
extends org.eclipse.gef.commands.Command

Command to rename a diagram.

Author:
AGH CAST Team

Constructor Summary
RenameDiagramCommand(IDiagram diagram, String newName)
          Creates new instance of the diagram rename command.
 
Method Summary
 void execute()
          
 String getLabel()
          
 void undo()
          
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, canUndo, chain, dispose, getDebugLabel, redo, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenameDiagramCommand

public RenameDiagramCommand(IDiagram diagram,
                            String newName)
Creates new instance of the diagram rename command.

Parameters:
diagram - the diagram to rename
newName - the new name of the diagram
Method Detail

execute

public void execute()

Overrides:
execute in class org.eclipse.gef.commands.Command
See Also:
Command.execute()

undo

public void undo()

Overrides:
undo in class org.eclipse.gef.commands.Command
See Also:
Command.undo()

getLabel

public String getLabel()

Overrides:
getLabel in class org.eclipse.gef.commands.Command
See Also:
Command.getLabel()


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.