Re: [Jeuclid-users] Displaying (X)Html and MathML in Swing Components
Brought to you by:
maxberger
From: Max B. <ma...@be...> - 2007-04-21 07:44:17
|
Dear Stefan, that is a real good requirement. Sounds like fun! Unfortunately I do not know any pre-made solution for redering (x)html+mml in Java. I will assume that you are talking about using HTMLEditorKit for displaying the HTML page? I've had a quick look at the documentation for HTMLEditorKit. In the intro section, it describes how to subclass it to provide support for an alternate Parser. I would envision the following: - Provide an alternate parser, use the standard xml parser, and pass all html elements straight through. - when mathml is encountered, create an simulated "img" tag. - render the mathml into an image for display. You may also have to write your own URLHandler, to manage loading the simulated img. I would love to have such an (X)HTML+MML component. If you write one I would gladly add it to the JEuclid distribution ( see http:// jeuclid.sourceforge.net/source.html ) Max Berger e-mail: ma...@be... -- PGP/GnuPG ID: E81592BC Print: F489F8759D4132923EC4 BC7E072AB73AE81592BC For information about me or my projects please see http:// max.berger.name Am 20.04.2007 um 13:21 schrieb Stefan Kunz: > Hi, > > I would like to display help files containing formulas within a Java > Application. There is no problem to display html in Swing components. > > Looking at the examples on the webpage I can see only the MathML part. > > Having a glance at the source code I didn't see a quick solution > to render mixed content (xhtml and MathML). > > It would be nice if anyone could provide me an example! > > Regards, > Stefan > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Jeuclid-users mailing list > Jeu...@li... > https://lists.sourceforge.net/lists/listinfo/jeuclid-users |