Package org.apache.batik.apps.svgbrowser
Class HistoryBrowserInterface.InsertNodeBeforeCommand
- java.lang.Object
-
- org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
-
- org.apache.batik.apps.svgbrowser.HistoryBrowserInterface.InsertNodeBeforeCommand
-
- All Implemented Interfaces:
UndoableCommand
- Enclosing class:
- HistoryBrowserInterface
public static class HistoryBrowserInterface.InsertNodeBeforeCommand extends AbstractUndoableCommand
Inserts the given node as a child to the given parent node before the specified sibling node, or as the last child of the given parent, if the sibling node is null.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.w3c.dom.NodechildThe node to be appended.protected org.w3c.dom.NodenewNextSiblingThe node's new next sibling.protected org.w3c.dom.NodeoldNextSiblingThe node's previous next sibling.protected org.w3c.dom.NodeoldParentThe node's previous parent.protected org.w3c.dom.NodeparentThe node's new parent.-
Fields inherited from class org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
name
-
-
Constructor Summary
Constructors Constructor Description InsertNodeBeforeCommand(java.lang.String commandName, org.w3c.dom.Node parent, org.w3c.dom.Node sibling, org.w3c.dom.Node child)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Executes this command.voidredo()Performs redo for this command.booleanshouldExecute()Tests if the command can be executed.voidundo()Performs undo for this command.-
Methods inherited from class org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
getName, setName
-
-
-
-
Field Detail
-
oldParent
protected org.w3c.dom.Node oldParent
The node's previous parent.
-
oldNextSibling
protected org.w3c.dom.Node oldNextSibling
The node's previous next sibling.
-
newNextSibling
protected org.w3c.dom.Node newNextSibling
The node's new next sibling.
-
parent
protected org.w3c.dom.Node parent
The node's new parent.
-
child
protected org.w3c.dom.Node child
The node to be appended.
-
-
Method Detail
-
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
-
-