net.sf.vex.dom
Class Element.AttributeChangeEdit

java.lang.Object
  |
  +--javax.swing.undo.AbstractUndoableEdit
        |
        +--net.sf.vex.dom.Element.AttributeChangeEdit
All Implemented Interfaces:
java.io.Serializable, javax.swing.undo.UndoableEdit
Enclosing class:
Element

public class Element.AttributeChangeEdit
extends javax.swing.undo.AbstractUndoableEdit

Represents an insertion of text into the document.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
Element.AttributeChangeEdit(java.lang.String name, java.lang.String oldValue, java.lang.String newValue)
          Class constructor.
 
Method Summary
 Element getElement()
          Returns the element to which this edit applies.
 java.lang.String getName()
          Returns the name of the attribute that was changed.
 java.lang.String getNewValue()
          Returns the new value of the attribute.
 java.lang.String getOldValue()
          Returns the value of the attribute before the change.
 java.lang.String getPresentationName()
           
 java.lang.String getRedoPresentationName()
           
 java.lang.String getUndoPresentationName()
           
 void redo()
           
 void undo()
           
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, isSignificant, replaceEdit, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Element.AttributeChangeEdit

public Element.AttributeChangeEdit(java.lang.String name,
                                   java.lang.String oldValue,
                                   java.lang.String newValue)
Class constructor.

Method Detail

undo

public void undo()
          throws javax.swing.undo.CannotUndoException
Specified by:
undo in interface javax.swing.undo.UndoableEdit
Overrides:
undo in class javax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CannotUndoException
See Also:
UndoableEdit.undo()

redo

public void redo()
          throws javax.swing.undo.CannotRedoException
Specified by:
redo in interface javax.swing.undo.UndoableEdit
Overrides:
redo in class javax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CannotRedoException
See Also:
UndoableEdit.redo()

getElement

public Element getElement()
Returns the element to which this edit applies.


getName

public java.lang.String getName()
Returns the name of the attribute that was changed.


getNewValue

public java.lang.String getNewValue()
Returns the new value of the attribute. If the attribute was removed returns null.


getOldValue

public java.lang.String getOldValue()
Returns the value of the attribute before the change. If the attribute did not exist before the change, returns null.


getPresentationName

public java.lang.String getPresentationName()
Specified by:
getPresentationName in interface javax.swing.undo.UndoableEdit
Overrides:
getPresentationName in class javax.swing.undo.AbstractUndoableEdit
See Also:
UndoableEdit.getPresentationName()

getUndoPresentationName

public java.lang.String getUndoPresentationName()
Specified by:
getUndoPresentationName in interface javax.swing.undo.UndoableEdit
Overrides:
getUndoPresentationName in class javax.swing.undo.AbstractUndoableEdit
See Also:
UndoableEdit.getUndoPresentationName()

getRedoPresentationName

public java.lang.String getRedoPresentationName()
Specified by:
getRedoPresentationName in interface javax.swing.undo.UndoableEdit
Overrides:
getRedoPresentationName in class javax.swing.undo.AbstractUndoableEdit
See Also:
UndoableEdit.getRedoPresentationName()