All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.swing.text.DefaultDocumentEvent.ElementEdit
java.lang.Object
|
+----java.awt.swing.undo.AbstractUndoableEdit
|
+----java.awt.swing.text.DefaultDocumentEvent.ElementEdit
- public static class DefaultDocumentEvent.ElementEdit
- extends AbstractUndoableEdit
- implements DocumentEvent.ElementChange
An implementation of ElementChange that can be added to the document
event.
DefaultDocumentEvent.ElementEdit(Element, int, Element[], Element[])
- Construct an edit record.
getChildrenAdded()
- Gets a list of children that were added.
getChildrenRemoved()
- Gets a list of children that were removed.
getElement()
- Returns the underlying element.
getIndex()
- Returns the index into the list of elements.
redo()
- Redoes a change.
undo()
- Undoes a change.
DefaultDocumentEvent.ElementEdit
public DefaultDocumentEvent.ElementEdit(Element e,
int index,
Element[] removed,
Element[] added)
- Construct 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
- removed - a set of elements that were removed
- added - a set of elements that were added
getElement
public Element getElement()
- Returns the underlying element.
- Returns:
- the element
getIndex
public int getIndex()
- Returns the index into the list of elements.
- Returns:
- the index
getChildrenRemoved
public Element[] getChildrenRemoved()
- Gets a list of children that were removed.
- Returns:
- the list
getChildrenAdded
public Element[] getChildrenAdded()
- Gets a list of children that were added.
- Returns:
- the list
redo
public void redo() throws CannotRedoException
- Redoes a change.
- Throws:
CannotRedoException
- if the change cannot be redone
- Overrides:
- redo in class AbstractUndoableEdit
undo
public void undo() throws CannotUndoException
- Undoes a change.
- Throws:
CannotUndoException
- if the change cannot be undone
- Overrides:
- undo in class AbstractUndoableEdit
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature