Class Overview
An implementation of ElementChange that can be added to the document
event.
Summary
[Expand]
Inherited Methods |
From class
javax.swing.undo.AbstractUndoableEdit
boolean
|
addEdit(UndoableEdit anEdit)
This default implementation returns false.
|
boolean
|
canRedo()
Returns true if this edit is alive
and hasBeenDone is false .
|
boolean
|
canUndo()
Returns true if this edit is alive
and hasBeenDone is true .
|
void
|
die()
Sets alive to false.
|
String
|
getPresentationName()
This default implementation returns "".
|
String
|
getRedoPresentationName()
Retreives the value from the defaults table with key
AbstractUndoableEdit.redoText and returns
that value followed by a space, followed by
getPresentationName .
|
String
|
getUndoPresentationName()
Retreives the value from the defaults table with key
AbstractUndoableEdit.undoText and returns
that value followed by a space, followed by
getPresentationName .
|
boolean
|
isSignificant()
This default implementation returns true.
|
void
|
redo()
Throws CannotRedoException if canRedo
returns false.
|
boolean
|
replaceEdit(UndoableEdit anEdit)
This default implementation returns false.
|
String
|
toString()
Returns a string that displays and identifies this
object's properties.
|
void
|
undo()
Throws CannotUndoException if canUndo
returns false .
|
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
From interface
javax.swing.event.DocumentEvent.ElementChange
|
From interface
javax.swing.undo.UndoableEdit
abstract
boolean
|
addEdit(UndoableEdit anEdit)
Adds an UndoableEdit to this UndoableEdit .
|
abstract
boolean
|
canRedo()
Returns true if this edit may be redone.
|
abstract
boolean
|
canUndo()
Returns true if this edit may be undone.
|
abstract
void
|
die()
Informs the edit that it should no longer be used.
|
abstract
String
|
getPresentationName()
Returns a localized, human-readable description of this edit, suitable
for use in a change log, for example.
|
abstract
String
|
getRedoPresentationName()
Returns a localized, human-readable description of the redoable form of
this edit, suitable for use as a Redo menu item, for example.
|
abstract
String
|
getUndoPresentationName()
Returns a localized, human-readable description of the undoable form of
this edit, suitable for use as an Undo menu item, for example.
|
abstract
boolean
|
isSignificant()
Returns true if this edit is considered significant.
|
abstract
void
|
redo()
Re-applies the edit.
|
abstract
boolean
|
replaceEdit(UndoableEdit anEdit)
Returns true if this UndoableEdit should replace
anEdit .
|
abstract
void
|
undo()
Undo the edit.
|
|
Public Constructors
public
AbstractDocument.ElementEdit
(Element e, int index, Element[] removed, Element[] added)
Constructs an edit record. This does not modify the element
so it can safely be used to catch up a view to the
current model state for views that just attached to a model.
Parameters
e
| the element |
index
| the index into the model >= 0 |
removed
| a set of elements that were removed |
added
| a set of elements that were added
|
Public Methods
public
Element[]
getChildrenAdded
()
Gets a list of children that were added.
public
Element[]
getChildrenRemoved
()
Gets a list of children that were removed.
public
Element
getElement
()
Returns the underlying element.
public
int
getIndex
()
Returns the index into the list of elements.