Class DefaultStyledDocument.AttributeUndoableEdit
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit
- All Implemented Interfaces:
Serializable, UndoableEdit
- Enclosing class:
DefaultStyledDocument
An UndoableEdit used to remember AttributeSet changes to an
Element.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AttributeSetCopy of the AttributeSet the Element contained.protected ElementAffected Element.protected booleantrue if all the attributes in the element were removed first.protected AttributeSetAttributeSet containing additional entries, must be non-mutable!Fields declared in class AbstractUndoableEdit
RedoName, UndoNameModifier and TypeFieldDescriptionprotected static final StringString returned bygetRedoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used.protected static final StringString returned bygetUndoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used. -
Constructor Summary
ConstructorsConstructorDescriptionAttributeUndoableEdit(Element element, AttributeSet newAttributes, boolean isReplacing) Constructs anAttributeUndoableEdit. -
Method Summary
Methods declared in class AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toStringModifier and TypeMethodDescriptionbooleanaddEdit(UndoableEdit anEdit) This default implementation returns false.booleancanRedo()Returnstrueif this edit isaliveandhasBeenDoneisfalse.booleancanUndo()Returns true if this edit isaliveandhasBeenDoneistrue.voiddie()Setsaliveto false.This default implementation returns "".Retrieves the value from the defaults table with keyAbstractUndoableEdit.redoTextand returns that value followed by a space, followed bygetPresentationName.Retrieves the value from the defaults table with keyAbstractUndoableEdit.undoTextand returns that value followed by a space, followed bygetPresentationName.booleanThis default implementation returns true.booleanreplaceEdit(UndoableEdit anEdit) This default implementation returns false.toString()Returns a string that displays and identifies this object's properties.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Creates and returns a copy of this object.booleanIndicates whether some other object is "equal to" this one.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.Finalization is deprecated and subject to removal in a future release.final Class<?> getClass()Returns the runtime class of thisObject.inthashCode()Returns a hash code value for this object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.final voidwait()Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
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:
redoin interfaceUndoableEdit- Overrides:
redoin classAbstractUndoableEdit- Throws:
CannotRedoException- if the change cannot be redone- See Also:
-
undo
Undoes a change.- Specified by:
undoin interfaceUndoableEdit- Overrides:
undoin classAbstractUndoableEdit- Throws:
CannotUndoException- if the change cannot be undone- See Also:
-