Modelers

org.topcased.modeler.commands
Class ChangeLabelTextCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by org.topcased.modeler.commands.ChangeLabelTextCommand

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

This is a command called to change the text of a Label linked with an EStructuralFeature of an EObject


Constructor Summary
ChangeLabelTextCommand(EObject eObj, EStructuralFeature feat)
          The Constructor
 
Method Summary
 boolean canExecute()
           
 void execute()
           
 void redo()
           
 void setName(java.lang.String newName)
          Sets the new Column name
 void setOldName(java.lang.String string)
          Sets the old Column name
 void undo()
           
 
Methods inherited from class org.eclipse.gef.commands.Command
canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeLabelTextCommand

public ChangeLabelTextCommand(EObject eObj,
                              EStructuralFeature feat)
The Constructor

Parameters:
eObj - the model object
feat - the feature of the model object
Method Detail

execute

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

canExecute

public boolean canExecute()
Overrides:
canExecute in class org.eclipse.gef.commands.Command
Returns:
whether we can apply changes
See Also:
Command.canExecute()

setName

public void setName(java.lang.String newName)
Sets the new Column name

Parameters:
newName - the new name

setOldName

public void setOldName(java.lang.String string)
Sets the old Column name

Parameters:
string - the old name

redo

public void redo()
Overrides:
redo in class org.eclipse.gef.commands.Command
See Also:
Command.redo()

undo

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

Modelers

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.