br.edu.fei.dcc.raciocinioespacial.editor.shapes.model.command
Class ShapeSetConstraintCommand
java.lang.Object
org.eclipse.gef.commands.Command
br.edu.fei.dcc.raciocinioespacial.editor.shapes.model.command.ShapeSetConstraintCommand
public class ShapeSetConstraintCommand
- extends org.eclipse.gef.commands.Command
Comando para mover e redimensionar as formas/shapes.
O comando pode ser desfeito e refeito.
Constructor Summary |
ShapeSetConstraintCommand(Shape shape,
org.eclipse.gef.requests.ChangeBoundsRequest req,
org.eclipse.draw2d.geometry.Rectangle newBounds)
Cria um comando que redimensiona ou move uma forma/shape. |
Methods inherited from class org.eclipse.gef.commands.Command |
canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShapeSetConstraintCommand
public ShapeSetConstraintCommand(Shape shape,
org.eclipse.gef.requests.ChangeBoundsRequest req,
org.eclipse.draw2d.geometry.Rectangle newBounds)
- Cria um comando que redimensiona ou move uma forma/shape.
- Parameters:
shape
- a forma/shape a ser redimensionado.req
- quem requisita a movimentação ou o redimensionamento.newBounds
- novo tamanho e nova localização.
- Throws:
java.lang.IllegalArgumentException
- se algum parâmetro for nulo.
canExecute
public boolean canExecute()
- Overrides:
canExecute
in class org.eclipse.gef.commands.Command
execute
public void execute()
- Overrides:
execute
in class org.eclipse.gef.commands.Command
redo
public void redo()
- Overrides:
redo
in class org.eclipse.gef.commands.Command
undo
public void undo()
- Overrides:
undo
in class org.eclipse.gef.commands.Command