RichTextArea: line endings

XMLWordPrintable

    • Type: CSR
    • Resolution: Unresolved
    • Priority: P4
    • jfx26
    • Component/s: javafx
    • None
    • source
    • minimal
    • New methods are added to some classes being incubated.
    • Java API
    • JDK

      Summary

      Adds LineEnding enum to represent 4 possible cases:

      • CR classic Mac
      • CRLF Windows
      • LF Linux
      • (null) platform default

      Adds the lineEnding attribute to StyledTextModel via two methods:

      • setLineEnding
      • getLineEnding

      In the CodeArea control, the line endings are expressed via the new lineEnding property.

      Problem

      The line endings are important in the following operations:

      • copy plain text to clipboard
      • save plain text (or get plain text)
      • IME

      Solution

      The solution is to provide an attribute to the base model class (StyledTextArea), as well as a property to the control which uses essentially a plain text model (CodeArea).

      Specification

      See the attached diff file.

            Assignee:
            Andy Goryachev
            Reporter:
            Andy Goryachev
            Jayathirth D V
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: