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
FieldsModifier and TypeFieldDescriptionprotected String
The attribute name.protected Element
The context element.protected String
The namespaceURI.protected String
New attribute value.protected String
Previous attribute value.Fields inherited from class org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
name
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.batik.apps.svgbrowser.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: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
-