Serializable
, UndoableEdit
public static class DefaultStyledDocument.AttributeUndoableEdit extends AbstractUndoableEdit
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!
|
RedoName, UndoName
Constructor | Description |
---|---|
AttributeUndoableEdit(Element element,
AttributeSet newAttributes,
boolean isReplacing) |
Constructs an
AttributeUndoableEdit . |
Modifier and Type | Method | Description |
---|---|---|
void |
redo() |
Redoes a change.
|
void |
undo() |
Undoes a change.
|
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
protected AttributeSet newAttributes
protected AttributeSet copy
protected boolean isReplacing
protected Element element
public AttributeUndoableEdit(Element element, AttributeSet newAttributes, boolean isReplacing)
AttributeUndoableEdit
.element
- the elementnewAttributes
- the new attributesisReplacing
- true if all the attributes in the element were removed first.public void redo() throws CannotRedoException
redo
in interface UndoableEdit
redo
in class AbstractUndoableEdit
CannotRedoException
- if the change cannot be redoneAbstractUndoableEdit.canRedo()
public void undo() throws CannotUndoException
undo
in interface UndoableEdit
undo
in class AbstractUndoableEdit
CannotUndoException
- if the change cannot be undoneAbstractUndoableEdit.canUndo()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps