Example usage for Java javax.swing.text Document fields, constructors, methods, implement or subclass
The text is from its open source code.
String | StreamDescriptionProperty The property name for the description of the stream used to initialize the document. |
String | TitleProperty The property name for the title of the document, if there is one. |
void | addDocumentListener(DocumentListener listener) Registers the given observer to begin receiving notifications when changes are made to the document. |
void | addUndoableEditListener(UndoableEditListener listener) Registers the given observer to begin receiving notifications when undoable edits are made to the document. |
Position | createPosition(int offs) This method allows an application to mark a place in a sequence of character content. |
Element | getDefaultRootElement() Returns the root element that views should be based upon, unless some other mechanism for assigning views to element structures is provided. |
int | getLength() Returns number of characters of content currently in the document. |
Object | getProperty(Object key) Gets the properties associated with the document. |
Position | getStartPosition() Returns a position that represents the start of the document. |
String | getText(int offset, int length) Fetches the text contained within the given portion of the document. |
void | getText(int offset, int length, Segment txt) Fetches the text contained within the given portion of the document. |
void | insertString(int offset, String str, AttributeSet a) Inserts a string of content. |
void | putProperty(Object key, Object value) Associates a property with the document. |
void | remove(int offs, int len) Removes a portion of the content of the document. |
void | removeDocumentListener(DocumentListener listener) Unregisters the given observer from the notification list so it will no longer receive change updates. |
void | removeUndoableEditListener(UndoableEditListener listener) Unregisters the given observer from the notification list so it will no longer receive updates. |
void | render(Runnable r) Allows the model to be safely rendered in the presence of concurrency, if the model supports being updated asynchronously. |