|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.batik.apps.svgbrowser.HistoryBrowserInterface
public class HistoryBrowserInterface
The wrapper for the history browser. The commands for the historyBrowser are implemented here
Nested Class Summary | |
---|---|
static class |
HistoryBrowserInterface.AppendChildCommand
The AppendChild command. |
static class |
HistoryBrowserInterface.AttributeAddedCommand
Adds the attribute to an element (MutationEvent.ADDITION) |
static class |
HistoryBrowserInterface.AttributeModifiedCommand
Modifies the attribute of an element (MutationEvent.MODIFICATION) |
static class |
HistoryBrowserInterface.AttributeRemovedCommand
Removes the attribute of an element (MutationEvent.REMOVAL) |
static class |
HistoryBrowserInterface.ChangeNodeValueCommand
The Change Node Value command. |
static class |
HistoryBrowserInterface.CharDataModifiedCommand
Sets the node value. |
static class |
HistoryBrowserInterface.CompoundUpdateCommand
The compound command. |
static class |
HistoryBrowserInterface.InsertNodeBeforeCommand
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. |
static class |
HistoryBrowserInterface.NodeInsertedCommand
Inserts the given node as a child of another. |
static class |
HistoryBrowserInterface.NodeRemovedCommand
Removes the node from its parent node. |
static class |
HistoryBrowserInterface.RemoveChildCommand
The RemoveChild command. |
static class |
HistoryBrowserInterface.ReplaceChildCommand
insertBefore |
Field Summary | |
---|---|
protected AbstractCompoundCommand |
currentCompoundCommand
Used to group custom number of changes into a single command. |
protected HistoryBrowser |
historyBrowser
The history browser. |
Constructor Summary | |
---|---|
HistoryBrowserInterface(HistoryBrowser.CommandController commandController)
Constructor. |
Method Summary | |
---|---|
void |
addToCurrentCompoundCommand(AbstractUndoableCommand cmd)
Adds the given command to current compound command. |
void |
appendChild(Node parent,
Node child)
Adds and executes the AppendChildCommand to historyBrowser. |
void |
attributeAdded(Element contextElement,
String attributeName,
String newAttributeValue,
String namespaceURI)
Adds the AttributeAddedCommand to historyBrowser. |
void |
attributeModified(Element contextElement,
String attributeName,
String prevAttributeValue,
String newAttributeValue,
String namespaceURI)
Adds the AttributeModifiedCommand to historyBrowser. |
void |
attributeRemoved(Element contextElement,
String attributeName,
String prevAttributeValue,
String namespaceURI)
Adds the AttributeRemovedCommand to historyBrowser. |
void |
charDataModified(Node contextNode,
String oldValue,
String newValue)
Adds CharDataModifiedCommand to historyBrowser. |
HistoryBrowserInterface.AppendChildCommand |
createAppendChildCommand(Node parent,
Node child)
Creates and return the AppendChild command. |
HistoryBrowserInterface.AttributeAddedCommand |
createAttributeAddedCommand(Element contextElement,
String attributeName,
String newAttributeValue,
String namespaceURI)
Creates the AttributeAdded command. |
HistoryBrowserInterface.AttributeModifiedCommand |
createAttributeModifiedCommand(Element contextElement,
String attributeName,
String prevAttributeValue,
String newAttributeValue,
String namespaceURI)
Creates the AttributeModified command. |
HistoryBrowserInterface.AttributeRemovedCommand |
createAttributeRemovedCommand(Element contextElement,
String attributeName,
String prevAttributeValue,
String namespaceURI)
Creates the AttributeRemoved command. |
HistoryBrowserInterface.ChangeNodeValueCommand |
createChangeNodeValueCommand(Node contextNode,
String newValue)
Creates and returns the ChangeNodeValue command. |
HistoryBrowserInterface.CharDataModifiedCommand |
createCharDataModifiedCommand(Node contextNode,
String oldValue,
String newValue)
Creates the CharDataModified command. |
HistoryBrowserInterface.CompoundUpdateCommand |
createCompoundUpdateCommand(String commandName)
Creates the compound update command, that consists of custom number of commands. |
UndoableCommand |
createInsertChildCommand(Node parent,
Node sibling,
Node child)
Creates InsertChildBefore or AppendChild command, depending on the value of siblingNode. |
HistoryBrowserInterface.InsertNodeBeforeCommand |
createInsertNodeBeforeCommand(Node parent,
Node sibling,
Node child)
Creates and returns the InsertNodeBeforeCommand. |
HistoryBrowserInterface.CompoundUpdateCommand |
createNodeChangedCommand(Node node)
Creates the compound NodeChangedCommand. |
HistoryBrowserInterface.NodeInsertedCommand |
createNodeInsertedCommand(Node newParent,
Node newSibling,
Node contextNode)
Creates the NodeInserted command. |
HistoryBrowserInterface.NodeRemovedCommand |
createNodeRemovedCommand(Node oldParent,
Node oldSibling,
Node contextNode)
Creates the NodeRemoved command. |
HistoryBrowserInterface.CompoundUpdateCommand |
createNodesDroppedCommand(ArrayList nodes)
Creates the compound NodesDroppedCommand. |
HistoryBrowserInterface.RemoveChildCommand |
createRemoveChildCommand(Node parent,
Node child)
Creates and returns the RemoveChild command. |
HistoryBrowserInterface.CompoundUpdateCommand |
createRemoveSelectedTreeNodesCommand(ArrayList nodes)
Creates the compound RemoveSelectedTreeNodesCommand. |
AbstractCompoundCommand |
getCurrentCompoundCommand()
Gets the current compound command. |
HistoryBrowser |
getHistoryBrowser()
Gets the history browser. |
void |
insertChildBefore(Node parent,
Node sibling,
Node child)
Adds and executes the InsertNodeBeforeCommand to historyBrowser. |
void |
nodeInserted(Node newParent,
Node newSibling,
Node contextNode)
Adds the NodeInsertedCommand to historyBrowser. |
void |
nodeRemoved(Node oldParent,
Node oldSibling,
Node contextNode)
Adds the NodeRemovedCommand to historyBrowser. |
void |
performCompoundUpdateCommand(UndoableCommand command)
Executes the given compound update command. |
void |
performCurrentCompoundCommand()
Adds and executes the current compound command to history browser. |
void |
removeChild(Node parent,
Node child)
Adds and executes the RemoveChild command to the History Browser. |
void |
replaceChild(Node parent,
Node newChild,
Node oldChild)
Adds and executes the ReplaceChild command to historyBrowser. |
void |
setCommmandController(HistoryBrowser.CommandController newCommandController)
Sets the history browser's command controller. |
void |
setNodeValue(Node contextNode,
String newValue)
Adds and executes the ChangeNodeValueCommand to historyBrowser. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected HistoryBrowser historyBrowser
protected AbstractCompoundCommand currentCompoundCommand
Constructor Detail |
---|
public HistoryBrowserInterface(HistoryBrowser.CommandController commandController)
Method Detail |
---|
public void setCommmandController(HistoryBrowser.CommandController newCommandController)
newCommandController
- The commandController to setpublic HistoryBrowserInterface.CompoundUpdateCommand createCompoundUpdateCommand(String commandName)
commandName
- Compound command name
public HistoryBrowserInterface.CompoundUpdateCommand createNodeChangedCommand(Node node)
public HistoryBrowserInterface.CompoundUpdateCommand createNodesDroppedCommand(ArrayList nodes)
nodes
- The list of the nodes that are being dropped
public HistoryBrowserInterface.CompoundUpdateCommand createRemoveSelectedTreeNodesCommand(ArrayList nodes)
nodes
- The list of the nodes that are selected and should be removed
public void performCompoundUpdateCommand(UndoableCommand command)
command
- The given compound update commandpublic HistoryBrowser getHistoryBrowser()
public void nodeInserted(Node newParent, Node newSibling, Node contextNode)
newParent
- New parent nodenewSibling
- New (next) sibling nodecontextNode
- The node to be appendedpublic HistoryBrowserInterface.NodeInsertedCommand createNodeInsertedCommand(Node newParent, Node newSibling, Node contextNode)
newParent
- New parent nodenewSibling
- New (next) sibling nodecontextNode
- The node to be appendedpublic void nodeRemoved(Node oldParent, Node oldSibling, Node contextNode)
oldParent
- The node's old parentoldSibling
- The node's old next siblingcontextNode
- The node to be removedpublic HistoryBrowserInterface.NodeRemovedCommand createNodeRemovedCommand(Node oldParent, Node oldSibling, Node contextNode)
oldParent
- The node's old parentoldSibling
- The node's old next siblingcontextNode
- The node to be removedpublic void attributeAdded(Element contextElement, String attributeName, String newAttributeValue, String namespaceURI)
contextElement
- The context elementattributeName
- The attribute namenewAttributeValue
- The attribute valuenamespaceURI
- The namespaceURIpublic HistoryBrowserInterface.AttributeAddedCommand createAttributeAddedCommand(Element contextElement, String attributeName, String newAttributeValue, String namespaceURI)
contextElement
- The context elementattributeName
- The attribute namenewAttributeValue
- The attribute valuenamespaceURI
- The namespaceURIpublic void attributeRemoved(Element contextElement, String attributeName, String prevAttributeValue, String namespaceURI)
contextElement
- The context elementattributeName
- The attribute nameprevAttributeValue
- The previous attribute valuenamespaceURI
- The namespaceURIpublic HistoryBrowserInterface.AttributeRemovedCommand createAttributeRemovedCommand(Element contextElement, String attributeName, String prevAttributeValue, String namespaceURI)
contextElement
- The context elementattributeName
- The attribute nameprevAttributeValue
- The previous attribute valuenamespaceURI
- The namespaceURIpublic void attributeModified(Element contextElement, String attributeName, String prevAttributeValue, String newAttributeValue, String namespaceURI)
contextElement
- The context elementattributeName
- The attribute nameprevAttributeValue
- The previous attribute valuenewAttributeValue
- The new attribute valuenamespaceURI
- The namespaceURIpublic HistoryBrowserInterface.AttributeModifiedCommand createAttributeModifiedCommand(Element contextElement, String attributeName, String prevAttributeValue, String newAttributeValue, String namespaceURI)
contextElement
- The context elementattributeName
- The attribute nameprevAttributeValue
- The previous attribute valuenewAttributeValue
- The new attribute valuenamespaceURI
- The namespaceURIpublic void charDataModified(Node contextNode, String oldValue, String newValue)
contextNode
- The node whose nodeValue changedoldValue
- The old node valuenewValue
- The new node valuepublic HistoryBrowserInterface.CharDataModifiedCommand createCharDataModifiedCommand(Node contextNode, String oldValue, String newValue)
contextNode
- The node whose nodeValue changedoldValue
- The old node valuenewValue
- The new node valuepublic void appendChild(Node parent, Node child)
parent
- The given parentchild
- The node to be appendedpublic HistoryBrowserInterface.AppendChildCommand createAppendChildCommand(Node parent, Node child)
parent
- The given parentchild
- The node to be appended
public void insertChildBefore(Node parent, Node sibling, Node child)
parent
- The given parentsibling
- Points where to be insertedchild
- The node to insertpublic UndoableCommand createInsertChildCommand(Node parent, Node sibling, Node child)
parent
- The parent nodesibling
- The sibling nodechild
- The child node
public HistoryBrowserInterface.InsertNodeBeforeCommand createInsertNodeBeforeCommand(Node parent, Node sibling, Node child)
parent
- The given parentsibling
- Points where to be insertedchild
- The node to insert
public void replaceChild(Node parent, Node newChild, Node oldChild)
parent
- The parent nodenewChild
- Points where to be insertedoldChild
- The node to be appendedpublic void removeChild(Node parent, Node child)
parent
- The given parentchild
- The given childpublic HistoryBrowserInterface.RemoveChildCommand createRemoveChildCommand(Node parent, Node child)
parent
- The parent nodechild
- The child node
public void setNodeValue(Node contextNode, String newValue)
contextNode
- The node whose nodeValue changednewValue
- The new node valuepublic HistoryBrowserInterface.ChangeNodeValueCommand createChangeNodeValueCommand(Node contextNode, String newValue)
contextNode
- The node whose nodeValue changednewValue
- The new node value
public AbstractCompoundCommand getCurrentCompoundCommand()
public void addToCurrentCompoundCommand(AbstractUndoableCommand cmd)
cmd
- The command to addpublic void performCurrentCompoundCommand()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |