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
FieldsModifier and TypeFieldDescriptionprotected StringThe attribute name.protected ElementThe context element.protected StringThe namespaceURI.protected StringNew attribute value.protected StringPrevious attribute value.Fields inherited from class AbstractUndoableCommand
name -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractUndoableCommand
getName, setName
-
Field Details
-
contextElement
The context element. -
attributeName
The attribute name. -
prevAttributeValue
Previous attribute value. -
newAttributeValue
New attribute value. -
namespaceURI
The namespaceURI.
-
-
Constructor Details
-
AttributeModifiedCommand
public AttributeModifiedCommand(String commandName, Element contextElement, String attributeName, String prevAttributeValue, String newAttributeValue, 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 Details
-
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
-