[Lazarus] Java's Document & Elements model

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Jun 26 23:35:13 CEST 2008


2008/6/26 Felipe Monteiro de Carvalho <felipemonteiro.carvalho at gmail.com>:
> I think it's not that easy. The HTML viewer will have to be very
> flexible to support this kind of stuff.

It clearly is, because sun.java.swing.text package contains an HTML
and RTF viewer and editor.  :-) They seem to work very well actually.
Then there was also the Java based web browser from ages ago, but I
think that was before Swing, so don't know what they used there.

> Also in SynEdit the biggest unit I have ever seen is FPCMacOSAll with
> 100.000 lines, and even there SynEdit works nicely.

And one of the Qt and Java tests, for reasons beyond me, is to paste
1Mb of text in a TextEdit component. No slow down in painting, moving
the cursor or scrolling the text is experienced. So it scales very
well.

> My point is: Don't optimize unless you have actually tested and this
> is a bottleneck, or else you will probably just make things worse.

Good point. I'll test this by implementing a styled document viewer
(and possibly editor) for HTML and RTF and see how it goes.

> university in places where it is absolutely not a good choice. Some
> example. They made a 3D Game library in Java in a laboratory.
> Surprisingly their biggest problem is that its't so slow it's unusable

I cannot say what is the cause of the slowness in Swing or AWT. But  I
must say, I have seen very impressing 3D demos using Java and they
where silky smooth. How they did it is beyond me, but I was very
impressed! Pitty those developers couldn't help speed up the Java GUI
components.


Regards,
 - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the Lazarus mailing list