javax.swing.text
Class DefaultStyledDocument.ElementBuffer

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.text.DefaultStyledDocument.ElementBuffer
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Enclosing class:
DefaultStyledDocument sample code for javax.swing.text.DefaultStyledDocument definition code for javax.swing.text.DefaultStyledDocument

public class DefaultStyledDocument.ElementBuffer
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Serializable sample code for java.io.Serializable definition code for java.io.Serializable

Class to manage changes to the element hierarchy.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
Serialized Form

Constructor Summary
DefaultStyledDocument.ElementBuffer sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.DefaultStyledDocument.ElementBuffer(javax.swing.text.Element) definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.DefaultStyledDocument.ElementBuffer(javax.swing.text.Element) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  root)
          Creates a new ElementBuffer.
 
Method Summary
 void change sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.change(int, int, javax.swing.text.AbstractDocument.DefaultDocumentEvent) definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.change(int, int, javax.swing.text.AbstractDocument.DefaultDocumentEvent) (int offset, int length, AbstractDocument.DefaultDocumentEvent sample code for javax.swing.text.AbstractDocument.DefaultDocumentEvent definition code for javax.swing.text.AbstractDocument.DefaultDocumentEvent  de)
          Changes content.
protected  void changeUpdate sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.changeUpdate() definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.changeUpdate() ()
          Updates the element structure in response to a change in the document.
 Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element clone sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.clone(javax.swing.text.Element, javax.swing.text.Element) definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.clone(javax.swing.text.Element, javax.swing.text.Element) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  parent, Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  clonee)
          Creates a copy of this element, with a different parent.
 Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element getRootElement sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.getRootElement() definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.getRootElement() ()
          Gets the root element.
 void insert sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.insert(int, int, javax.swing.text.DefaultStyledDocument.ElementSpec[], javax.swing.text.AbstractDocument.DefaultDocumentEvent) definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.insert(int, int, javax.swing.text.DefaultStyledDocument.ElementSpec[], javax.swing.text.AbstractDocument.DefaultDocumentEvent) (int offset, int length, DefaultStyledDocument.ElementSpec sample code for javax.swing.text.DefaultStyledDocument.ElementSpec definition code for javax.swing.text.DefaultStyledDocument.ElementSpec [] data, AbstractDocument.DefaultDocumentEvent sample code for javax.swing.text.AbstractDocument.DefaultDocumentEvent definition code for javax.swing.text.AbstractDocument.DefaultDocumentEvent  de)
          Inserts new content.
protected  void insertUpdate sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.insertUpdate(javax.swing.text.DefaultStyledDocument.ElementSpec[]) definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.insertUpdate(javax.swing.text.DefaultStyledDocument.ElementSpec[]) (DefaultStyledDocument.ElementSpec sample code for javax.swing.text.DefaultStyledDocument.ElementSpec definition code for javax.swing.text.DefaultStyledDocument.ElementSpec [] data)
          Inserts an update into the document.
 void remove sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.remove(int, int, javax.swing.text.AbstractDocument.DefaultDocumentEvent) definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.remove(int, int, javax.swing.text.AbstractDocument.DefaultDocumentEvent) (int offset, int length, AbstractDocument.DefaultDocumentEvent sample code for javax.swing.text.AbstractDocument.DefaultDocumentEvent definition code for javax.swing.text.AbstractDocument.DefaultDocumentEvent  de)
          Removes content.
protected  void removeUpdate sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.removeUpdate() definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.removeUpdate() ()
          Updates the element structure in response to a removal from the associated sequence in the document.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

DefaultStyledDocument.ElementBuffer sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer(javax.swing.text.Element) definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer(javax.swing.text.Element)

public DefaultStyledDocument.ElementBuffer(Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  root)
Creates a new ElementBuffer.

Parameters:
root - the root element
Method Detail

getRootElement sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.getRootElement() definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.getRootElement()

public Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  getRootElement()
Gets the root element.

Returns:
the root element

insert sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.insert(int, int, javax.swing.text.DefaultStyledDocument.ElementSpec[], javax.swing.text.AbstractDocument.DefaultDocumentEvent) definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.insert(int, int, javax.swing.text.DefaultStyledDocument.ElementSpec[], javax.swing.text.AbstractDocument.DefaultDocumentEvent)

public void insert(int offset,
                   int length,
                   DefaultStyledDocument.ElementSpec sample code for javax.swing.text.DefaultStyledDocument.ElementSpec definition code for javax.swing.text.DefaultStyledDocument.ElementSpec [] data,
                   AbstractDocument.DefaultDocumentEvent sample code for javax.swing.text.AbstractDocument.DefaultDocumentEvent definition code for javax.swing.text.AbstractDocument.DefaultDocumentEvent  de)
Inserts new content.

Parameters:
offset - the starting offset >= 0
length - the length >= 0
data - the data to insert
de - the event capturing this edit

remove sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.remove(int, int, javax.swing.text.AbstractDocument.DefaultDocumentEvent) definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.remove(int, int, javax.swing.text.AbstractDocument.DefaultDocumentEvent)

public void remove(int offset,
                   int length,
                   AbstractDocument.DefaultDocumentEvent sample code for javax.swing.text.AbstractDocument.DefaultDocumentEvent definition code for javax.swing.text.AbstractDocument.DefaultDocumentEvent  de)
Removes content.

Parameters:
offset - the starting offset >= 0
length - the length >= 0
de - the event capturing this edit

change sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.change(int, int, javax.swing.text.AbstractDocument.DefaultDocumentEvent) definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.change(int, int, javax.swing.text.AbstractDocument.DefaultDocumentEvent)

public void change(int offset,
                   int length,
                   AbstractDocument.DefaultDocumentEvent sample code for javax.swing.text.AbstractDocument.DefaultDocumentEvent definition code for javax.swing.text.AbstractDocument.DefaultDocumentEvent  de)
Changes content.

Parameters:
offset - the starting offset >= 0
length - the length >= 0
de - the event capturing this edit

insertUpdate sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.insertUpdate(javax.swing.text.DefaultStyledDocument.ElementSpec[]) definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.insertUpdate(javax.swing.text.DefaultStyledDocument.ElementSpec[])

protected void insertUpdate(DefaultStyledDocument.ElementSpec sample code for javax.swing.text.DefaultStyledDocument.ElementSpec definition code for javax.swing.text.DefaultStyledDocument.ElementSpec [] data)
Inserts an update into the document.

Parameters:
data - the elements to insert

removeUpdate sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.removeUpdate() definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.removeUpdate()

protected void removeUpdate()
Updates the element structure in response to a removal from the associated sequence in the document. Any elements consumed by the span of the removal are removed.


changeUpdate sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.changeUpdate() definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.changeUpdate()

protected void changeUpdate()
Updates the element structure in response to a change in the document.


clone sample code for javax.swing.text.DefaultStyledDocument.ElementBuffer.clone(javax.swing.text.Element, javax.swing.text.Element) definition code for javax.swing.text.DefaultStyledDocument.ElementBuffer.clone(javax.swing.text.Element, javax.swing.text.Element)

public Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  clone(Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  parent,
                     Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  clonee)
Creates a copy of this element, with a different parent.

Parameters:
parent - the parent element
clonee - the element to be cloned
Returns:
the copy