java.lang.Object
javax.swing.undo.AbstractUndoableEdit
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit
- All Implemented Interfaces:
Serializable
,UndoableEdit
- Enclosing class:
- DefaultStyledDocument
public static class DefaultStyledDocument.AttributeUndoableEdit extends AbstractUndoableEdit
An UndoableEdit used to remember AttributeSet changes to an
Element.
-
Field Summary
Fields Modifier and Type Field Description protected AttributeSet
copy
Copy of the AttributeSet the Element contained.protected Element
element
Affected Element.protected boolean
isReplacing
true if all the attributes in the element were removed first.protected AttributeSet
newAttributes
AttributeSet containing additional entries, must be non-mutable!Fields declared in class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
-
Constructor Summary
Constructors Constructor Description AttributeUndoableEdit(Element element, AttributeSet newAttributes, boolean isReplacing)
Constructs anAttributeUndoableEdit
. -
Method Summary
Methods declared in class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
-
Field Details
-
newAttributes
AttributeSet containing additional entries, must be non-mutable! -
copy
Copy of the AttributeSet the Element contained. -
isReplacing
protected boolean isReplacingtrue if all the attributes in the element were removed first. -
element
Affected Element.
-
-
Constructor Details
-
AttributeUndoableEdit
Constructs anAttributeUndoableEdit
.- Parameters:
element
- the elementnewAttributes
- the new attributesisReplacing
- true if all the attributes in the element were removed first.
-
-
Method Details
-
redo
Redoes a change.- Specified by:
redo
in interfaceUndoableEdit
- Overrides:
redo
in classAbstractUndoableEdit
- Throws:
CannotRedoException
- if the change cannot be redone- See Also:
AbstractUndoableEdit.canRedo()
-
undo
Undoes a change.- Specified by:
undo
in interfaceUndoableEdit
- Overrides:
undo
in classAbstractUndoableEdit
- Throws:
CannotUndoException
- if the change cannot be undone- See Also:
AbstractUndoableEdit.canUndo()
-