|
|||||||||
Home >> All >> javax >> swing >> [ text overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
javax.swing.text
Class DefaultStyledDocument.AttributeUndoableEdit

java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.undo.UndoableEdit
- Enclosing class:
- DefaultStyledDocument
- public static class DefaultStyledDocument.AttributeUndoableEdit
- extends javax.swing.undo.AbstractUndoableEdit
An javax.swing.undo.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 |
copy
protected AttributeSet copy
- A copy of the old attributes.
newAttributes
protected AttributeSet newAttributes
- The new attributes.
isReplacing
protected boolean isReplacing
- If the new attributes replaced the old attributes or if they only were
added to them.
element
protected Element element
- The element that has changed.
Constructor Detail |
DefaultStyledDocument.AttributeUndoableEdit
public DefaultStyledDocument.AttributeUndoableEdit(Element el, AttributeSet newAtts, boolean replacing)
- Creates a new
AttributeUndoableEdit
.
Method Detail |
undo
public void undo()
- Undos the attribute change. The
copy
field is set as attributes onelement
.
redo
public void redo()
- Redos an attribute change. This adds
newAttributes
to theelement
's attribute set, possibly clearing all attributes ifisReplacing
is true.
|
|||||||||
Home >> All >> javax >> swing >> [ text overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |