API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.text. DefaultStyledDocument.ElementBuffer View Source
Author(s)
Since
Version
Serial
Hierarchy
 Object
      DefaultStyledDocument.ElementBuffer
Implements
 Serializable
Subclasses
Description
public class DefaultStyledDocument.ElementBuffer
  Class to manage changes to the element hierarchy.
See also:   
Constructors
public DefaultStyledDocument.ElementBuffer (Element root)
  Creates a new ElementBuffer.
Methods
Hide/Show inherited methods
pack-private void advance (int n)
move the current offset forward by n.
pack-private void beginEdits (int offset, int length)
Initialize the buffer
pack-private boolean canJoin (Element e0, Element e1)
Can the two given elements be coelesced together into one element?
public void change (int offset, int length, DefaultDocumentEvent de)
  Changes content.
protected void changeUpdate ()
Updates the element structure in response to a change in the document.
public Element clone (Element parent, Element clonee)
  Creates a copy of this element, with a different parent.
pack-private Element cloneAsNecessary (Element parent, Element clonee, int rmOffs0, int rmOffs1)
  Creates a copy of this element, with a different parent.
pack-private void create (int length, ElementSpec data, DefaultDocumentEvent de)
pack-private void endEdits (DefaultDocumentEvent de)
Creates the UndoableEdit record for the edits made in the buffer.
pack-private void fracture (int depth)
  Determines if a fracture needs to be performed.
pack-private void fractureDeepestLeaf (ElementSpec specs)
  Splits the bottommost leaf in path.
pack-private void fractureFrom (ElemChanges changed, int startIndex, int endFractureIndex)
  Recreates the elements to the right of the insertion point.
public Element getRootElement ()
  Gets the root element.
public void insert (int offset, int length, ElementSpec data, DefaultDocumentEvent de)
  Inserts new content.
pack-private void insertElement (ElementSpec es)
pack-private void insertFirstContent (ElementSpec specs)
  Inserts the first content.
protected void insertUpdate (ElementSpec data)
  Inserts an update into the document.
pack-private Element join (Element p, Element left, Element right, int rmOffs0, int rmOffs1)
Joins the two elements carving out a hole for the given removed range.
pack-private void pop ()
pack-private void push (Element e, int index)
pack-private void push (Element e, int index, boolean isFracture)
  Pushes a new element onto the stack that represents the current path.
pack-private Element recreateFracturedElement (Element parent, Element toDuplicate)
  Recreates toDuplicate.
public void remove (int offset, int length, DefaultDocumentEvent de)
  Removes content.
pack-private boolean removeElements (Element elem, int rmOffs0, int rmOffs1)
  Remove the elements from elem in range rmOffs0, rmOffs1.
protected void removeUpdate ()
  Updates the element structure in response to a removal from the associated sequence in the document.
pack-private boolean split (int offs, int len)
Fields
Hide/Show inherited fields
pack-privatetransient Vector changes
pack-privatetransient boolean createdFracture
Only for insert, set to true when the fracture has been created.
pack-privatetransient int endOffset
pack-privatetransient Element fracturedChild
Fractured child.
pack-privatetransient Element fracturedParent
Parent that contains the fractured child.
pack-privatetransient boolean insertOp
pack-privatetransient ElemChanges insertPath
For insert, path to inserted elements.
pack-privatetransient int length
pack-privatetransient int offset
pack-privatetransient boolean offsetLastIndex
Used to indicate when fracturing that the last leaf should be skipped.
pack-privatetransient boolean offsetLastIndexOnReplace
Used to indicate that the parent of the deepest leaf should offset the index by 1 when adding/removing elements in an insert.
pack-privatetransient Stack path
pack-privatetransient int pos
pack-privatetransient boolean recreateLeafs
pack-private Element root
Nested Classes
  DefaultStyledDocument.ElementBuffer.ElemChanges
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar