|
Modelers | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gef.commands.Command
org.topcased.modeler.commands.ReplaceNodeContainerCommand
public class ReplaceNodeContainerCommand
The command to replace one object inside a new container. Because we treat with containment references, the deletion and the addition of objects from containers take place here.
Any other treatment, such as supplementary feature modification, may be done by overriding the getOrphandChildenCommand() of a LayoutEditPolicy
.
LayoutEditPolicy
Constructor Summary | |
---|---|
ReplaceNodeContainerCommand(GraphElement currentObject,
GraphElement hostNode,
org.eclipse.draw2d.geometry.Point position)
Node ContainerCommand Constructor. |
Method Summary | |
---|---|
boolean |
canExecute()
|
void |
execute()
|
void |
redo()
|
protected void |
redoGraphics()
Updates the diagram graphically |
protected void |
redoModel()
Model modification made here |
void |
setSynchronization(boolean isSynchronized)
Sets the parameter which says if model will refresh graphics automatically or not |
void |
undo()
|
protected void |
undoGraphics()
Undo any graphical modification made by redoGraphics() method |
protected void |
undoModel()
Undo any model modification made by the redoModel() method |
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 |
---|
public ReplaceNodeContainerCommand(GraphElement currentObject, GraphElement hostNode, org.eclipse.draw2d.geometry.Point position)
currentObject
- The node being manipulatedhostNode
- The node or container to contain the manipulated nodeposition
- The position relative to the hostNodeMethod Detail |
---|
public boolean canExecute()
canExecute
in class org.eclipse.gef.commands.Command
Command.canExecute()
public void execute()
execute
in class org.eclipse.gef.commands.Command
Command.execute()
public void redo()
redo
in class org.eclipse.gef.commands.Command
Command.redo()
public void undo()
undo
in class org.eclipse.gef.commands.Command
Command.undo()
public void setSynchronization(boolean isSynchronized)
isSynchronized
- True
if model is synchronized The default value is false
;protected void redoModel()
protected void redoGraphics()
protected void undoModel()
protected void undoGraphics()
|
Modelers | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.