This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.text
class AbstractDocument.ElementEdit

java.lang.Object extended by javax.swing.undo.AbstractUndoableEdit extended by 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 Summary
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
AbstractDocument.ElementEdit(Element e, int index, Element[] removed, Element[] added)

          Constructs an edit record.
 
Method Summary
 Element[]

          Gets a list of children that were added.
 Element[]

          Gets a list of children that were removed.
 Element

          Returns the underlying element.
 int

          Returns the index into the list of elements.
 void

          Redoes a change.
 void

          Undoes a change.
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, redo, replaceEdit, toString, undo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 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 Detail

getChildrenAdded

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

Returns:
the list

getChildrenRemoved

public Element[] getChildrenRemoved()
Gets a list of children that were removed.

Returns:
the list

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 >= 0

redo

public void redo()
          throws CannotRedoException
Redoes a change.

Overrides:
redo in class AbstractUndoableEdit
Throws:
CannotRedoException - if the change cannot be redone

undo

public void undo()
          throws CannotUndoException
Undoes a change.

Overrides:
undo in class AbstractUndoableEdit
Throws:
CannotUndoException - if the change cannot be undone


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.