Hello,
we are currently designing an application where the user imports some text which is then analyzed for specific keywords. These keywords should then be highlighted in the text so that the user can easily see which words have been found.
Now with Java 8 we'd like to use the new TextFlow class for this. I know that I can easily change the font of the words that have been identified, but it would also be nice if I could add a background color for even easier visual scanning of the text. Is there anyway how to achieve this using the Text class? I know that I could also add a label to the TextFlow, however this would break the flow of the Text because sometimes we also need to highlight larger parts of the text, and if that text extends beyond the end of the line the linkebreaks will just be hideous.
I already thought about subclassing Text and a background, but simply do not know where I would have to change the way how the rendering happens.
Any tips would be appreciated