home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.text;
-
- import com.sun.java.swing.undo.AbstractUndoableEdit;
- import com.sun.java.swing.undo.CannotRedoException;
- import com.sun.java.swing.undo.CannotUndoException;
-
- class DefaultStyledDocument$StyleChangeUndoableEdit extends AbstractUndoableEdit {
- protected AbstractDocument.AbstractElement element;
- protected Style newStyle;
- protected AttributeSet oldStyle;
-
- public DefaultStyledDocument$StyleChangeUndoableEdit(AbstractDocument.AbstractElement var1, Style var2) {
- this.element = var1;
- this.newStyle = var2;
- this.oldStyle = var1.getResolveParent();
- }
-
- public void redo() throws CannotRedoException {
- super.redo();
- this.element.setResolveParent(this.newStyle);
- }
-
- public void undo() throws CannotUndoException {
- super.undo();
- this.element.setResolveParent(this.oldStyle);
- }
- }
-