Package org.apache.batik.apps.svgbrowser
Class HistoryBrowserInterface.AttributeModifiedCommand
- java.lang.Object
-
- org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
-
- org.apache.batik.apps.svgbrowser.HistoryBrowserInterface.AttributeModifiedCommand
-
- All Implemented Interfaces:
UndoableCommand
- Enclosing class:
- HistoryBrowserInterface
public static class HistoryBrowserInterface.AttributeModifiedCommand extends AbstractUndoableCommand
Modifies the attribute of an element (MutationEvent.MODIFICATION)
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringattributeNameThe attribute name.protected org.w3c.dom.ElementcontextElementThe context element.protected java.lang.StringnamespaceURIThe namespaceURI.protected java.lang.StringnewAttributeValueNew attribute value.protected java.lang.StringprevAttributeValuePrevious attribute value.-
Fields inherited from class org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
name
-
-
Constructor Summary
Constructors Constructor Description AttributeModifiedCommand(java.lang.String commandName, org.w3c.dom.Element contextElement, java.lang.String attributeName, java.lang.String prevAttributeValue, java.lang.String newAttributeValue, java.lang.String namespaceURI)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
-
contextElement
protected org.w3c.dom.Element contextElement
The context element.
-
attributeName
protected java.lang.String attributeName
The attribute name.
-
prevAttributeValue
protected java.lang.String prevAttributeValue
Previous attribute value.
-
newAttributeValue
protected java.lang.String newAttributeValue
New attribute value.
-
namespaceURI
protected java.lang.String namespaceURI
The namespaceURI.
-
-
Constructor Detail
-
AttributeModifiedCommand
public AttributeModifiedCommand(java.lang.String commandName, org.w3c.dom.Element contextElement, java.lang.String attributeName, java.lang.String prevAttributeValue, java.lang.String newAttributeValue, java.lang.String namespaceURI)Constructor.- Parameters:
commandName- The name of this command.contextElement- The context elementattributeName- The attribute nameprevAttributeValue- The previous attribute valuenewAttributeValue- The new attribute valuenamespaceURI- The namespaceURI
-
-
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
-
-