adding your own styles to Javadoc so that they work automatically?  
Author Message
Kent Paul Dolan





PostPosted: 2006-1-4 5:36:00 Top

java-programmer, adding your own styles to Javadoc so that they work automatically? I've managed to get my own styles into the Javadoc
"package.html" file; even though javadoc nukes the
"<head>...</head>" part of the file; this works when
inserted into the _body_ up toward the top, a bit of a
happy surprise to me, I expected it _had_ to go into
the <head>...</head> part:

<style>
span.tbd { font-weight: 700; color: red }
body { background-color: #FFFFFF ; background:
url("http://www.well.com/user/xanthian/images/webback.gif") }
</style>

Well, fine, that's because the original is a *.html
file, making things work fairly naturally.

Things aren't so nice for the *.java files, though.
This definitely does _not_ work at the top of a
*.java file to accomplish the same two style
declarations:

/**
* <style>
* span.tbd { font-weight: 700; color: red }
* body { background-color: #FFFFFF ; background:
url("http://www.well.com/user/xanthian/images/webback.gif") }
* </style>
*/

[Excuse if moronic Google Groups has probably
wrapped the "body" line, that's supposed to be all
one line in both cases.]

Is there some easy way to make this work, so that I
can have my Javadocs pages decorated with my
favorite spiderweb background design, without having
to edit by hand the stylesheet.css that javadoc() emits,
after running javadoc(), _every single time_ I run
javadoc() (which is many times an hour when I'm
working on cleaning up the javadoc output, and so is
an insufferable nuisance)?

IMWTK

xanthian.

 
Kent Paul Dolan





PostPosted: 2006-1-4 5:46:00 Top

java-programmer >> adding your own styles to Javadoc so that they work automatically? Kent Paul Dolan wrote:
> Things aren't so nice for the *.java files, though.
> This definitely does _not_ work at the top of a
> *.java file to accomplish the same two style
> declarations:
>
> /**
> * <style>
> * span.tbd { font-weight: 700; color: red }
> * body { background-color: #FFFFFF ; background:
> url("http://www.well.com/user/xanthian/images/webback.gif") }
> * </style>
> */

And promptly found the answer to my own question.
The above doesn't work because I put the style
declarations into a Javadoc comment that wasn't
attached to anything documentable, just "floating
out in space" at the top of the file, and so
ignored, just as the Javadoc Reference Manual page
tells me javadoc() would do.

When I moved the style declaration into the Javadoc
comment for the class declaration, I got exactly the
spiderweb-on-the-web-pun background I craved.

Sorry for the too-soon query.

xanthian.