org.apache.batik.apps.svgbrowser
Class HistoryBrowserInterface.AttributeModifiedCommand

java.lang.Object
  extended byorg.apache.batik.apps.svgbrowser.AbstractUndoableCommand
      extended byorg.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
protected  String attributeName
          The attribute name.
protected  Element contextElement
          The context element.
protected  String namespaceURI
          The namespaceURI.
protected  String newAttributeValue
          New attribute value.
protected  String prevAttributeValue
          Previous attribute value.
 
Fields inherited from class org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
name
 
Constructor Summary
HistoryBrowserInterface.AttributeModifiedCommand(String commandName, Element contextElement, String attributeName, String prevAttributeValue, String newAttributeValue, String namespaceURI)
          Constructor.
 
Method Summary
 void execute()
          Executes this command.
 void redo()
          Performs redo for this command.
 boolean shouldExecute()
          Tests if the command can be executed.
 void undo()
          Performs undo for this command.
 
Methods inherited from class org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contextElement

protected Element contextElement
The context element.


attributeName

protected String attributeName
The attribute name.


prevAttributeValue

protected String prevAttributeValue
Previous attribute value.


newAttributeValue

protected String newAttributeValue
New attribute value.


namespaceURI

protected String namespaceURI
The namespaceURI.

Constructor Detail

HistoryBrowserInterface.AttributeModifiedCommand

public HistoryBrowserInterface.AttributeModifiedCommand(String commandName,
                                                        Element contextElement,
                                                        String attributeName,
                                                        String prevAttributeValue,
                                                        String newAttributeValue,
                                                        String namespaceURI)
Constructor.

Parameters:
commandName - The name of this command.
contextElement - The context element
attributeName - The attribute name
prevAttributeValue - The previous attribute value
newAttributeValue - The new attribute value
namespaceURI - The namespaceURI
Method Detail

execute

public void execute()
Description copied from interface: UndoableCommand
Executes this command.

Specified by:
execute in interface UndoableCommand
Overrides:
execute in class AbstractUndoableCommand

undo

public void undo()
Description copied from interface: UndoableCommand
Performs undo for this command.

Specified by:
undo in interface UndoableCommand
Overrides:
undo in class AbstractUndoableCommand

redo

public void redo()
Description copied from interface: UndoableCommand
Performs redo for this command.

Specified by:
redo in interface UndoableCommand
Overrides:
redo in class AbstractUndoableCommand

shouldExecute

public boolean shouldExecute()
Description copied from interface: UndoableCommand
Tests if the command can be executed.

Specified by:
shouldExecute in interface UndoableCommand
Overrides:
shouldExecute in class AbstractUndoableCommand


Copyright © 2009 Apache Software Foundation. All Rights Reserved.