Rich Text Support

Pedro Duque Vieira pedro.duquevieira at gmail.com
Tue Oct 9 12:57:21 UTC 2018


It appears the hit testing for the Text node was introduced in newer
versions of JavaFX. I wasn't aware of this. Just checked the newer versions
of the API and there it is. That's a nice addition!

As a note, UI virtualization isn't exclusive to JavaFX. Nor an issue only
JavaFX has. You'll see this in android development, windows native
development, etc..

Cheers,





On Tue, Oct 9, 2018 at 6:29 AM Robert Lichtenberger <
r.lichtenberger at gmail.com> wrote:

> Am 08.10.2018 um 19:54 schrieb Tom Schindl:
> > Hi,
> >
> > as someone who has written a Code-Editor-Control (I don't talk about
> > RichText) I can say that what Robert says is wrong and other examples
> > like all Web-Based code editors (Monaco, Orion) show us it is perfectly
> > possible implement well performing Code editor using a Scene-Graph.
> >
> > The trick is as always you need to be virtual (ideally in both
> > directions but as a minimum vertically).
> That is the "trick". However the fact that you need such a trick goes to
> show that it is _harder_ to implement text editors with a scene graph.
> You have to know that it is impossible to have your whole text in the
> scene. Whereas the framework as such suggests you should do so.
>
> But I admit it is not impossible.
>
> > For code-editors an
> > optimization you can use is that often you have monospaced fonts so you
> > can very easily interpolate stuff.
> Personally I always (yes, even in the IDE) prefer proportional fonts, as
> they use less screen space and are easier to read.
> But yes, it gets a whole lot easier when you don't have to calculate
> variable line heights.
>
> >
> > As I said above ListView like support at minimum but ideally you are
> > virtual in both directions - something our rebuild code-editor control
> > is going to support.
> Having virtualization in both directions will certainly help if you open
> that file with X MB all in one line, something that most editors / list
> views choke upon.
>
> Thanks for the input (especially about the virtualization part), I'll
> try to study this in more detail, maybe I'll be able to resurrect my old
> editor code with that.
>
> Robert
>
>

-- 
Pedro Duque Vieira - https://www.pixelduke.com


More information about the openjfx-discuss mailing list