You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm using RichTextFX to highlight search matches from a search algorithm i'm testing, somehow the way Chrome shows you the matches when you use the Find function.
For that im using:
styleClassedTextArea.setStyle(...);
I'm getting perfect results for a few amount of matches but it scales badly with larger texts. I was wondering if there's a more efficient way to set the Styles in the given ranges or maybe i'm using the wrong method for my purposes. Taking a look at the source I already started using setStyle instead of setStyleClass because of the second one creating a new ArrayList on every call.
Anyway, still great features and perhaps you have a tip for me.
The text was updated successfully, but these errors were encountered:
A more efficient way of setting multiple style ranges at once is setStyleSpans. Note, however, that this way you also have to specify style for all the intermediate (non-highlighted) ranges.
Hi Tomas,
i'm using RichTextFX to highlight search matches from a search algorithm i'm testing, somehow the way Chrome shows you the matches when you use the Find function.
For that im using:
styleClassedTextArea.setStyle(...);
I'm getting perfect results for a few amount of matches but it scales badly with larger texts. I was wondering if there's a more efficient way to set the Styles in the given ranges or maybe i'm using the wrong method for my purposes. Taking a look at the source I already started using setStyle instead of setStyleClass because of the second one creating a new ArrayList on every call.
Anyway, still great features and perhaps you have a tip for me.
The text was updated successfully, but these errors were encountered: