Package org.apache.batik.apps.svgbrowser
Class HistoryBrowserInterface.AppendChildCommand
- java.lang.Object
-
- org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
-
- org.apache.batik.apps.svgbrowser.HistoryBrowserInterface.AppendChildCommand
-
- All Implemented Interfaces:
UndoableCommand
- Enclosing class:
- HistoryBrowserInterface
public static class HistoryBrowserInterface.AppendChildCommand extends AbstractUndoableCommand
The AppendChild command. Appends the given node to the given parent node as a last child.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.w3c.dom.Node
childNode
The node to be appended.protected org.w3c.dom.Node
oldNextSibling
The node's previous next sibling.protected org.w3c.dom.Node
oldParentNode
The node's previous parent.protected org.w3c.dom.Node
parentNode
The node's new parent.-
Fields inherited from class org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
name
-
-
Constructor Summary
Constructors Constructor Description AppendChildCommand(java.lang.String commandName, org.w3c.dom.Node parentNode, org.w3c.dom.Node childNode)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
Executes this command.void
redo()
Performs redo for this command.boolean
shouldExecute()
Tests if the command can be executed.void
undo()
Performs undo for this command.-
Methods inherited from class org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
getName, setName
-
-
-
-
Field Detail
-
oldParentNode
protected org.w3c.dom.Node oldParentNode
The node's previous parent.
-
oldNextSibling
protected org.w3c.dom.Node oldNextSibling
The node's previous next sibling.
-
parentNode
protected org.w3c.dom.Node parentNode
The node's new parent.
-
childNode
protected org.w3c.dom.Node childNode
The node to be appended.
-
-
Method Detail
-
execute
public void execute()
Description copied from interface:UndoableCommand
Executes this command.- Specified by:
execute
in interfaceUndoableCommand
- Overrides:
execute
in classAbstractUndoableCommand
-
undo
public void undo()
Description copied from interface:UndoableCommand
Performs undo for this command.- Specified by:
undo
in interfaceUndoableCommand
- Overrides:
undo
in classAbstractUndoableCommand
-
redo
public void redo()
Description copied from interface:UndoableCommand
Performs redo for this command.- Specified by:
redo
in interfaceUndoableCommand
- Overrides:
redo
in classAbstractUndoableCommand
-
shouldExecute
public boolean shouldExecute()
Description copied from interface:UndoableCommand
Tests if the command can be executed.- Specified by:
shouldExecute
in interfaceUndoableCommand
- Overrides:
shouldExecute
in classAbstractUndoableCommand
- Returns:
- True if command should be executed
-
-