javax.swing.text
Class  AbstractDocument.ElementEdit
java.lang.Object
  |
  +--javax.swing.undo.AbstractUndoableEdit
        |
        +--javax.swing.text.AbstractDocument.ElementEdit
- public static class AbstractDocument.ElementEdit
- extends AbstractUndoableEdit
- implements DocumentEvent.ElementChange
   
An implementation of ElementChange that can be added to the document
 event.
- See Also: 
 - Serialized Form
 
 
 
 
 
 
AbstractDocument.ElementEdit
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 elementindex - the index into the model >= 0removed - a set of elements that were removedadded - a set of elements that were added
 
 
getElement
public Element getElement()
- Returns the underlying element.
- Specified by: 
 - getElement in interface DocumentEvent.ElementChange
 - Returns:
 - the element
 
 
 
getIndex
public int getIndex()
- Returns the index into the list of elements.
- Specified by: 
 - getIndex in interface DocumentEvent.ElementChange
 - Returns:
 - the index >= 0
 
 
 
getChildrenRemoved
public Element[] getChildrenRemoved()
- Gets a list of children that were removed.
- Specified by: 
 - getChildrenRemoved in interface DocumentEvent.ElementChange
 - Returns:
 - the list
 
 
 
getChildrenAdded
public Element[] getChildrenAdded()
- Gets a list of children that were added.
- Specified by: 
 - getChildrenAdded in interface DocumentEvent.ElementChange
 - 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
 
 
 
Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A.  All Rights Reserved.