Package org.apache.batik.apps.svgbrowser
Class HistoryBrowserInterface.NodeInsertedCommand
java.lang.Object
org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
org.apache.batik.apps.svgbrowser.HistoryBrowserInterface.NodeInsertedCommand
- All Implemented Interfaces:
UndoableCommand
- Enclosing class:
HistoryBrowserInterface
Inserts the given node as a child of another.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Node
The node to be appended.protected Node
The node's new parent.protected Node
The node's next sibling.Fields inherited from class org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
name
-
Constructor Summary
ConstructorsConstructorDescriptionNodeInsertedCommand
(String commandName, Node parent, Node sibling, Node contextNode) Constructor. -
Method Summary
Methods inherited from class org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
getName, setName
-
Field Details
-
newSibling
The node's next sibling. -
newParent
The node's new parent. -
contextNode
The node to be appended.
-
-
Constructor Details
-
NodeInsertedCommand
Constructor.
-
-
Method Details
-
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
-