javax.swing.text
Class DefaultStyledDocument.StyleChangeUndoableEdit

java.lang.Object
  extended byjavax.swing.undo.AbstractUndoableEdit
      extended byjavax.swing.text.DefaultStyledDocument.StyleChangeUndoableEdit
All Implemented Interfaces:
Serializable, UndoableEdit
Enclosing class:
DefaultStyledDocument

static class DefaultStyledDocument.StyleChangeUndoableEdit
extends AbstractUndoableEdit

UndoableEdit for changing the resolve parent of an Element.


Field Summary
protected  AbstractDocument.AbstractElement element
          Element to change resolve parent of.
protected  Style newStyle
          New style.
protected  AttributeSet oldStyle
          Old style, before setting newStyle.
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
DefaultStyledDocument.StyleChangeUndoableEdit(AbstractDocument.AbstractElement element, Style newStyle)
           
 
Method Summary
 void redo()
          Redoes a change.
 void undo()
          Undoes a change.
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

element

protected AbstractDocument.AbstractElement element
Element to change resolve parent of.


newStyle

protected Style newStyle
New style.


oldStyle

protected AttributeSet oldStyle
Old style, before setting newStyle.

Constructor Detail

DefaultStyledDocument.StyleChangeUndoableEdit

public DefaultStyledDocument.StyleChangeUndoableEdit(AbstractDocument.AbstractElement element,
                                                     Style newStyle)
Method Detail

redo

public void redo()
          throws CannotRedoException
Redoes a change.

Specified by:
redo in interface UndoableEdit
Overrides:
redo in class AbstractUndoableEdit
Throws:
CannotRedoException - if the change cannot be redone
See Also:
AbstractUndoableEdit.canRedo()

undo

public void undo()
          throws CannotUndoException
Undoes a change.

Specified by:
undo in interface UndoableEdit
Overrides:
undo in class AbstractUndoableEdit
Throws:
CannotUndoException - if the change cannot be undone
See Also:
AbstractUndoableEdit.canUndo()