java.lang.Object
javax.swing.undo.AbstractUndoableEdit
javax.swing.text.AbstractDocument.ElementEdit
- All Implemented Interfaces:
- Serializable,- DocumentEvent.ElementChange,- UndoableEdit
- Enclosing class:
- AbstractDocument
public static class AbstractDocument.ElementEdit
extends AbstractUndoableEdit
implements DocumentEvent.ElementChange
An implementation of ElementChange that can be added to the document
 event.
- 
Field SummaryFields declared in class javax.swing.undo.AbstractUndoableEditRedoName, UndoName
- 
Constructor SummaryConstructorsConstructorDescriptionElementEdit(Element e, int index, Element[] removed, Element[] added) Constructs an edit record.
- 
Method SummaryMethods declared in class javax.swing.undo.AbstractUndoableEditaddEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
- 
Constructor Details- 
ElementEditConstructs 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
 
 
- 
- 
Method Details- 
getElementReturns the underlying element.- Specified by:
- getElementin interface- DocumentEvent.ElementChange
- Returns:
- the element
 
- 
getIndexpublic int getIndex()Returns the index into the list of elements.- Specified by:
- getIndexin interface- DocumentEvent.ElementChange
- Returns:
- the index >= 0
 
- 
getChildrenRemovedGets a list of children that were removed.- Specified by:
- getChildrenRemovedin interface- DocumentEvent.ElementChange
- Returns:
- the list
 
- 
getChildrenAddedGets a list of children that were added.- Specified by:
- getChildrenAddedin interface- DocumentEvent.ElementChange
- Returns:
- the list
 
- 
redoRedoes a change.- Specified by:
- redoin interface- UndoableEdit
- Overrides:
- redoin class- AbstractUndoableEdit
- Throws:
- CannotRedoException- if the change cannot be redone
- See Also:
 
- 
undoUndoes a change.- Specified by:
- undoin interface- UndoableEdit
- Overrides:
- undoin class- AbstractUndoableEdit
- Throws:
- CannotUndoException- if the change cannot be undone
- See Also:
 
 
-