Method Summary |
|
public void | addListener(TextPanelListener listener) Add the given TextPanelListener to the listeners which will
receive update notifications from this TextPanel. |
public void | append(MConstText newText) Append the given text to the end of the document. |
public boolean | canRedo() Return true if there is a change which can be redone. |
public boolean | canUndo() Return true if there is a change which can be undone. |
public void | clear() Remove selected text from the document, without altering the clipboard. |
public void | clearCommandLog() Remove all commands from the command log. |
public boolean | clipboardNotEmpty() Return true if the clipboard contains contents which could be
transfered into the text. |
public void | copy() Place the selected text on the clipboard. |
public void | cut() Remove the selected text from the document and place it
on the clipboard. |
public Object | getCharacterStyleOverSelection(Object key) This method inspects the character style runs in the selection
range (or the typing style at the insertion point). |
public int | getCommandLogSize() Return the number of commands the command log can hold. |
public static TextPanelSettings | getDefaultSettings() Return a TextPanelSettings instance with all settings set
to the default values. |
public AttributeMap | getDefaultValues() Return an AttributeMap of keys with default values. |
public int | getFormatWidth() Return the total format width, in pixels. |
ATextPanelImpl | getImpl() |
public KeyRemap | getKeyRemap() Return the KeyRemap used to process key events. |
public Object | getParagraphStyleOverSelection(Object key) This method inspects the paragraph style runs in the selection
range (or the typing style at the insertion point). |
public int | getSelectionEnd() Return the offset of the end of the selection. |
public int | getSelectionStart() Return the offset of the start of the selection. |
public MConstText | getText() Return the text document in the TextPanel. |
public int | getTextLength() Return the length of the text document in the TextPanel. |
public void | insert(MConstText newText, int position) Insert the given text into the document at the given position. |
public boolean | isModified() Return the modification flag of the current text change. |
public void | modifyCharacterStyleOnSelection(StyleModifier modifier) Modify the character styles on the selected characters. |
public void | modifyParagraphStyleOnSelection(StyleModifier modifier) Modify the paragraph styles in paragraphs containing selected characters, or
the paragraph containing the insertion point. |
public boolean | paragraphIsLeftToRight(int offset) Return true if the paragraph at the given offset is left-to-right. |
public void | paste() Replace the currently selected text with the text on the clipboard. |
public void | redo() Redo the most recent text change. |
public void | removeListener(TextPanelListener listener) Remove the given TextPanelListener from the listeners which will
receive update notifications from this TextPanel. |
public void | replaceRange(MConstText newText, int start, int end) Replace the given range with newText. |
public void | select(int selectionStart, int selectionEnd) Set the selection range to the given range. |
public void | selectAll() Select all of the text in the document. |
public void | setCaretPosition(int position) Set the selection range to an insertion point at the given
offset. |
public void | setCommandLogSize(int size) Set the number of commands the command log can hold. |
public void | setKeyRemap(KeyRemap remap) Use the given KeyRemap to map key events to characters.
Only key
events are affected by the remap; other text entering the
control (via the clipboard, for example) is not affected
by the KeyRemap.
Do not pass null to this method to leave key
events unmapped. |
public void | setModified(boolean modified) Set the modification flag of the current text change. |
public void | setSelectionEnd(int selectionEnd) Set the end of the selection range. |
public void | setSelectionStart(int selectionStart) Set the beginning of the selection range. |
public void | setText(MConstText newText) Set the document to newText. |
public void | undo() Undo the most recent text change. |