pl.edu.agh.cast.schema.editor.command
Class ChangeElementPropertyCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by pl.edu.agh.cast.schema.editor.command.ChangeElementPropertyCommand

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

Command which changes the given property value.

Note: The property to change must be writable, otherwise IllegalArgumentException is thrown during command instantiation.

Author:
AGH CAST Team

Constructor Summary
ChangeElementPropertyCommand(Property<? extends MetaProperty> property, String newValue)
          Constructor.
 
Method Summary
 boolean canUndo()
          
 void execute()
          
 void undo()
          
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, chain, dispose, getDebugLabel, getLabel, redo, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeElementPropertyCommand

public ChangeElementPropertyCommand(Property<? extends MetaProperty> property,
                                    String newValue)
Constructor.

Parameters:
property - property to change
newValue - new property value
Method Detail

canUndo

public boolean canUndo()

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

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()


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