Class HistoryBrowserInterface.RemoveChildCommand
java.lang.Object
org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
org.apache.batik.apps.svgbrowser.HistoryBrowserInterface.RemoveChildCommand
- All Implemented Interfaces:
UndoableCommand
- Enclosing class:
HistoryBrowserInterface
The RemoveChild command. Removes the given child node from its given
parent node.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected NodeThe node to be removed.protected intNode's index in parent's children array.protected NodeNode's previous parent.Fields inherited from class AbstractUndoableCommand
name -
Constructor Summary
ConstructorsConstructorDescriptionRemoveChildCommand(String commandName, Node parentNode, Node childNode) Constructor. -
Method Summary
Methods inherited from class AbstractUndoableCommand
getName, setName
-
Field Details
-
parentNode
Node's previous parent. -
childNode
The node to be removed. -
indexInChildrenArray
protected int indexInChildrenArrayNode's index in parent's children array.
-
-
Constructor Details
-
RemoveChildCommand
-
-
Method Details
-
execute
public void execute()Description copied from interface:UndoableCommandExecutes this command.- Specified by:
executein interfaceUndoableCommand- Overrides:
executein classAbstractUndoableCommand
-
undo
public void undo()Description copied from interface:UndoableCommandPerforms undo for this command.- Specified by:
undoin interfaceUndoableCommand- Overrides:
undoin classAbstractUndoableCommand
-
redo
public void redo()Description copied from interface:UndoableCommandPerforms redo for this command.- Specified by:
redoin interfaceUndoableCommand- Overrides:
redoin classAbstractUndoableCommand
-
shouldExecute
public boolean shouldExecute()Description copied from interface:UndoableCommandTests if the command can be executed.- Specified by:
shouldExecutein interfaceUndoableCommand- Overrides:
shouldExecutein classAbstractUndoableCommand- Returns:
- True if command should be executed
-