org.apache.batik.apps.svgbrowser

Class HistoryBrowserInterface.InsertNodeBeforeCommand

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
protected Nodechild
The node to be appended.
protected NodenewNextSibling
The node's new next sibling.
protected NodeoldNextSibling
The node's previous next sibling.
protected NodeoldParent
The node's previous parent.
protected Nodeparent
The node's new parent.
Constructor Summary
InsertNodeBeforeCommand(String commandName, Node parent, Node sibling, Node child)
Constructor.
Method Summary
voidexecute()
voidredo()
booleanshouldExecute()
voidundo()

Field Detail

child

protected Node child
The node to be appended.

newNextSibling

protected Node newNextSibling
The node's new next sibling.

oldNextSibling

protected Node oldNextSibling
The node's previous next sibling.

oldParent

protected Node oldParent
The node's previous parent.

parent

protected Node parent
The node's new parent.

Constructor Detail

InsertNodeBeforeCommand

public InsertNodeBeforeCommand(String commandName, Node parent, Node sibling, Node child)
Constructor.

Method Detail

execute

public void execute()

redo

public void redo()

shouldExecute

public boolean shouldExecute()

undo

public void undo()
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.