|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit
public static class DefaultStyledDocument.AttributeUndoableEdit
An UndoableEdit
that can undo attribute changes to an element.
Field Summary | |
---|---|
protected AttributeSet |
copy
A copy of the old attributes. |
protected Element |
element
The element that has changed. |
protected boolean |
isReplacing
If the new attributes replaced the old attributes or if they only were added to them. |
protected AttributeSet |
newAttributes
The new attributes. |
Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
---|
RedoName, UndoName |
Constructor Summary | |
---|---|
DefaultStyledDocument.AttributeUndoableEdit(Element el,
AttributeSet newAtts,
boolean replacing)
Creates a new AttributeUndoableEdit . |
Method Summary | |
---|---|
void |
redo()
Redos an attribute change. |
void |
undo()
Undos the attribute 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 |
---|
protected AttributeSet copy
protected AttributeSet newAttributes
protected boolean isReplacing
protected Element element
Constructor Detail |
---|
public DefaultStyledDocument.AttributeUndoableEdit(Element el, AttributeSet newAtts, boolean replacing)
AttributeUndoableEdit
.
el
- the element that changes attributesnewAtts
- the new attributesreplacing
- if the new attributes replace the old or only append to themMethod Detail |
---|
public void undo()
copy
field is set as
attributes on element
.
undo
in interface UndoableEdit
undo
in class AbstractUndoableEdit
AbstractUndoableEdit.canUndo()
,
AbstractUndoableEdit.redo()
public void redo()
newAttributes
to the
element
's attribute set, possibly clearing all attributes
if isReplacing
is true.
redo
in interface UndoableEdit
redo
in class AbstractUndoableEdit
AbstractUndoableEdit.canRedo()
,
AbstractUndoableEdit.undo()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |