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

Remove final modifier from Text.impl_createPeer

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: emb-8u26
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:
    • Subcomponent:

      Description

      Hello,

      I am currently developing an application where the user provides a text which is than scanned for matching words or substrings. Afterwards the matches should be highlighted in the text so that the user can easily see them.

      To implement this I would like to use a Textflow where the relevant parts are instances of Text. Currently I can use the Text.setFill method to paint these parts in a different color, but I would also like to draw some a colored background behind the text. After some digging I believe to have found the correct place in the code to modify, which is the NGText.renderContent2D method. If I am not mistaken it should be possible to add the necessary code at this location, however I cannot override impl_createPeer to return my subclassed NGText.

      It would be nice if you could remove the final modifier, otherwise I would probably have to create my own control for this.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              msladecek Martin Sládeček
              Reporter:
              cmuthingjfx Clemens Muthing (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: