getLength
getLength: (Document) -> numberThe length in UTF-16 units.
| Method | Returns | Description |
|---|---|---|
getLength() | number | The length in UTF-16 units. |
getText(offset: number, length: number) | string | length units from offset; raises BadLocationException outside the text. |
insertString(offset: number, str: string?, attributes: any?) | () | Inserts str at offset (the attributes are ignored: plain text). |
remove(offset: number, length: number) | () | Removes length units at offset. |
addDocumentListener(any) | () | insertUpdate, removeUpdate, changedUpdate, the last added first. |
addUndoableEditListener(any) | () | A function of the event, a table with undoableEditHappened, or an UndoManager. |
| Method | Returns | Description |
|---|---|---|
JTextComponent.getDocument | Document | The component's Document, the same one each call. |
getLengthgetLength: (Document) -> numberThe length in UTF-16 units.
getTextgetText: (Document, offset: number, length: number) -> stringlength units from offset; raises BadLocationException outside the text.
insertStringinsertString: (Document, offset: number, str: string?, attributes: any?) -> ()Inserts str at offset (the attributes are ignored: plain text).
removeremove: (Document, offset: number, length: number) -> ()Removes length units at offset.
addDocumentListeneraddDocumentListener: (Document, any) -> ()insertUpdate, removeUpdate, changedUpdate, the last added first.
addUndoableEditListeneraddUndoableEditListener: (Document, any) -> ()A function of the event, a table with undoableEditHappened, or an UndoManager.