MTextPanel is implemented by Components which provide selectable editable styled text.
Implementations of MTextPanel provide a simple, standard user interface for text editing. MTextPanel supplies scrollable display, typing, arrow-key support, character selection, word- and sentence-selection (by double-clicking and triple-clicking, respectively), text styles, clipboard operations (cut, copy and paste) and a log of changes for undo-redo.
MTextPanel implementations do not provide user interface elements such as an edit menu or style menu. This support is provided in different packages, and is implemented with MTextPanel's API. MTextPanel includes methods for setting selections and styles on text, and using the clipboard and command-log functionality. MTextPanel's API for selection and text handling is similar to that of java.awt.TextArea and java.awt.TextComponent.
MTextPanel supports bidirectional and complex text. In bidirectional text, offsets at direction boundaries have dual carets. Logical selection is used, so selections across run directions may not be contiguous in display.