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

[Text, TextFlow] Make public API from internal "impl" APIs

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: javafx
    • Labels:

      Description

      Text and TextFlow contain API with names that include 'impl', which are public but deprecated and meant for internal use only. Some, but not necessarily all, of these should be renamed and made fully supported API.

      Approved new API:

      New class javafx.scene.text.HitInfo (no public constructor):

      public class HitInfo {
          public int getCharIndex();
          public int getInsertionIndex();
          public boolean isLeading();
      }


      New API in javafx.scene.text.Text (previously known as "impl" methods):

          public final ReadOnlyObjectProperty<PathElement[]> selectionShapeProperty();
          public final PathElement[] getSelectionShape();

          public final IntegerProperty selectionStartProperty();
          public final void setSelectionStart(int value);
          public final int getSelectionStart();

          public final IntegerProperty selectionEndProperty();
          public final void setSelectionEnd(int value);
          public final int getSelectionEnd();

          public final ObjectProperty<Paint> selectionFillProperty();
          public final void setSelectionFill(Paint paint);
          public final Paint getSelectionFill();

          public final ReadOnlyObjectProperty<PathElement[]> caretShapeProperty();
          public final PathElement[] getCaretShape();

          public final IntegerProperty caretPositionProperty();
          public final void setCaretPosition(int value);
          public final int getCaretPosition();

          public final BooleanProperty caretBiasProperty();
          public final void setCaretBias(boolean value);
          public final boolean isCaretBias();

          public final HitInfo hitTest(Point2D point);

          public final PathElement[] caretShape(int charIndex, boolean leading);
          public final PathElement[] rangeShape(int start, int end);
          public final PathElement[] underlineShape(int start, int end);

      New API in javafx.scene.text.TextFlow:

          public final PathElement[] caretShape(int charIndex, boolean leading);

          public final HitInfo hitTest(Point2D point);

          public final PathElement[] rangeShape(int start, int end);

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                leifs Leif Samuelsson (Inactive)
                Reporter:
                leifs Leif Samuelsson (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: