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

Remove final modifier from Text.impl_createPeer

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • emb-8u26
    • javafx

      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.

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

              Created:
              Updated:
              Resolved:
              Imported: