Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8194703

Add methods to Textflow to return node index at start and end of each line

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      A DESCRIPTION OF THE REQUEST :
      A long TextFlow wraps inside its container. Some applications need to know the nodes at the start and end of each line. Currently this information appears to be hidden with no public API.

      Add a new method to return ObservableList<LineInfo> for all lines. Add a second method to return LineInfo, for a given node index.
      LineInfo could contain line start index, line end index, line height, line width.


      JUSTIFICATION :
      Some applications need to know the nodes at the start and end of each line. For example to determine where to place a page break. Or for editing the TextFlow, jumping to the line home or line end.


      CUSTOMER SUBMITTED WORKAROUND :
      One workaround is to loop over every node in TextFlow and compare the change in x,y coords to determine where a new line begins, and save the node index at that point.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: