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.


Constructor Index

 o DefaultDocumentEvent.ElementEdit(Element, int, Element[], Element[])
Construct an edit record.

Method Index

 o getChildrenAdded()
Gets a list of children that were added.
 o getChildrenRemoved()
Gets a list of children that were removed.
 o getElement()
Returns the underlying element.
 o getIndex()
Returns the index into the list of elements.
 o redo()
Redoes a change.
 o undo()
Undoes a change.

Constructors

 o 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

Methods

 o getElement
public Element getElement()
Returns the underlying element.

Returns:
the element
 o getIndex
public int getIndex()
Returns the index into the list of elements.

Returns:
the index
 o getChildrenRemoved
public Element[] getChildrenRemoved()
Gets a list of children that were removed.

Returns:
the list
 o getChildrenAdded
public Element[] getChildrenAdded()
Gets a list of children that were added.

Returns:
the list
 o redo
public void redo() throws CannotRedoException
Redoes a change.

Throws: CannotRedoException
if the change cannot be redone
Overrides:
redo in class AbstractUndoableEdit
 o 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