com.mindfusion.diagramming
Class RemoveFromContainerCmd

java.lang.Object
  extended by com.mindfusion.diagramming.Command
      extended by com.mindfusion.diagramming.RemoveFromContainerCmd

public class RemoveFromContainerCmd
extends Command

Undoable command that implements removal of nodes from a container.


Constructor Summary
protected RemoveFromContainerCmd(ContainerNode container, DiagramNode node, boolean interactive)
          Intializes a new instance of the AddToContainerCmd class.
 
Method Summary
protected  boolean adopt(Command command)
          Merges adjacent commands in the history queue if they are related.
 void execute(boolean undoEnabled)
          Carries out the command action.
 ContainerNode getContainer()
          Gets the group associated with the command.
 DiagramNode getNode()
          Gets the item associated with the command.
 void redo()
          Redoes the command.
 void undo()
          Undoes the command.
 
Methods inherited from class com.mindfusion.diagramming.Command
addSubCmd, getContext, getSubCommands, getTitle, isContainerOf, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoveFromContainerCmd

protected RemoveFromContainerCmd(ContainerNode container,
                                 DiagramNode node,
                                 boolean interactive)
Intializes a new instance of the AddToContainerCmd class.

Method Detail

execute

public void execute(boolean undoEnabled)
Carries out the command action.

Specified by:
execute in class Command
Parameters:
undoEnabled - true if the undo manager is enabled at this time, otherwise false.

undo

public void undo()
Undoes the command.

Overrides:
undo in class Command

redo

public void redo()
Redoes the command.

Overrides:
redo in class Command

adopt

protected boolean adopt(Command command)
Merges adjacent commands in the history queue if they are related.

Overrides:
adopt in class Command
Parameters:
command - The Command that might be adopted by this command.
Returns:
true if the specified command has been adopted; otherwise, false.

getContainer

public ContainerNode getContainer()
Gets the group associated with the command.


getNode

public DiagramNode getNode()
Gets the item associated with the command.