public class DefaultStyledDocument.ElementBuffer extends Objectimplements Serializable
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 JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.
| Constructor and Description |
|---|
ElementBuffer(Element
Creates a new ElementBuffer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
change(int offset, int length, AbstractDocument
Changes content.
|
protected void |
changeUpdate()
Updates the element structure in response to a change in the document.
|
Element |
clone(Element
Creates a copy of this element, with a different parent.
|
Element |
getRootElement()
Gets the root element.
|
void |
insert(int offset, int length, DefaultStyledDocument
Inserts new content.
|
protected void |
insertUpdate(DefaultStyledDocument
Inserts an update into the document.
|
void |
remove(int offset, int length, AbstractDocument
Removes content.
|
protected void |
removeUpdate()
Updates the element structure in response to a removal from the associated sequence in the document.
|
public ElementBuffer(Elementroot)
root - the root element
public ElementgetRootElement()
public void insert(int offset,
int length,
DefaultStyledDocument.ElementSpec [] data,
AbstractDocument.DefaultDocumentEvent de)
offset - the starting offset >= 0
length - the length >= 0
data - the data to insert
de - the event capturing this edit
public void remove(int offset,
int length,
AbstractDocument.DefaultDocumentEvent de)
offset - the starting offset >= 0
length - the length >= 0
de - the event capturing this edit
public void change(int offset,
int length,
AbstractDocument.DefaultDocumentEvent de)
offset - the starting offset >= 0
length - the length >= 0
de - the event capturing this edit
protected void insertUpdate(DefaultStyledDocument.ElementSpec [] data)
data - the elements to insert
protected void removeUpdate()
protected void changeUpdate()