Modelers

org.topcased.modeler.commands
Class ChangeBoundsCommand

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

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

Changing bounds of a object
creation : 30 nov. 2004


Constructor Summary
ChangeBoundsCommand(GraphNode node, PortConstraint constraint)
          Constructor
ChangeBoundsCommand(GraphNode node, PortConstraint constraint, boolean childAttach)
          Constructor
ChangeBoundsCommand(GraphNode node, org.eclipse.draw2d.geometry.Rectangle constraint)
          Constructor
ChangeBoundsCommand(GraphNode node, org.eclipse.draw2d.geometry.Rectangle constraint, boolean childAttach)
          Constructor
 
Method Summary
 boolean canExecute()
           
 void execute()
           
 void redo()
           
 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

ChangeBoundsCommand

public ChangeBoundsCommand(GraphNode node,
                           org.eclipse.draw2d.geometry.Rectangle constraint)
Constructor

Parameters:
node - the node to resize
constraint - the new rectangle that contain the figure

ChangeBoundsCommand

public ChangeBoundsCommand(GraphNode node,
                           PortConstraint constraint)
Constructor

Parameters:
node - the node to resize
constraint - the new rectangle that contain the figure

ChangeBoundsCommand

public ChangeBoundsCommand(GraphNode node,
                           PortConstraint constraint,
                           boolean childAttach)
Constructor

Parameters:
node - the node to resize
constraint - the new rectangle that contain the figure
childAttach - true if the children of the node should have the same attachement

ChangeBoundsCommand

public ChangeBoundsCommand(GraphNode node,
                           org.eclipse.draw2d.geometry.Rectangle constraint,
                           boolean childAttach)
Constructor

Parameters:
node - the node to resize
constraint - the new rectangle that contain the figure
childAttach - true if the children of the node should have the same attachement
Method Detail

canExecute

public boolean canExecute()
Overrides:
canExecute in class org.eclipse.gef.commands.Command
See Also:
Command.canExecute()

execute

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

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.