Sundararajan's Weblog

javafxdoc-style docs for Java code

Guest Author

You may have browsed JavaFX API docs generated by javafxdoc tool. javafxdoc tool is implemented as a doclet. It is possible to use javafxdoc's doclet to generate API docs for Java code.

Note: The XMLDoclet implemented as part of javafxdoc tool is an implementation detail and not part of official JavaFX/tool API and so please do not depend on this. This is more for fun/learning/personal use!)

I generated javadoc for BTrace source using the following command:

javadoc -docletpath $JAVAFX_HOME/lib/shared/javafxdoc.jar -doclet com.sun.tools.xmldoclet.XMLDoclet -sourcepath . -subpackages com.sun.btrace

where JAVAFX_HOME is the directory where JavaFX SDK lives.

A screenshot from generated docs:

Join the discussion

Comments ( 5 )
  • Andres Almiray Sunday, July 12, 2009

    While the initial look is much better than the default one I'm afraid this is really a step backwards (no, I'm not about to bash JavaFX) because the search capabilities are minimal now, given that the TOC is now Ajax powered. I'm aware that (at least on a particular platform/browser combination) clicking on a class or package makes the browser redraw the whole page (Linux 2.6/FF 3.0.5). The inheritance chain is also a pain to glance at.

    In summary, it looks nicer but the usability is experience is worse :-(

  • A. Sundararajan Sunday, July 12, 2009

    There is one JIRA issue filed to include expand/collapse link in every page - so that user can expand and do page search. This is being addressed in the next release. Also, it is an XML emitting doclet -- there is an option to dump intermediate XML file containing complete source model along with doc comments. It is be possible to write a different XSLT to generate differently formatted HTML or something else altogether.

  • Leon Fan Sunday, July 12, 2009

    We are also provide another way to present API doc. You can see it online on http://doc.java.sun.com. We also plan to support JavaFX API doc on same site end of this month.

  • Josh Marinacci Monday, July 13, 2009

    Hi Andres. What would be your preferred way of letting you search everything in the page. 'expand-all' button?

  • Andres Almiray Monday, July 13, 2009

    Thanks for the updates, really appreciate it.

    @Josh: I'd like the search option to expand those categories that actually match, not all of them. That might require additional checks on the meatadata via javascript calls, but hey, that's what browsers are for, right?

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.