R
Roedy Green
I have spend the last two weekends implementing one of my student
products:
http://mindprod.com/projjavapresenter.html
It takes pre-parsed Java source snippets, not necessarily
syntactically valid, and displays them in colours and fonts in a way
to make the meaning of the program more obvious.
For example, it highlights RETURNs, and boldens references in the
places they are defined.
I render with drawString paying attention to the clip region. Boy is
this fast!
I am still playing with the colourscheme to give maximal information
without sensory overload. I want the effects to be subtle, but
sufficiently distinct so you can tell what's a keyword, method,
variable, constant, Class, Interface just by looking at the word
without having to study the context.
I use variable size ()[] {} to make it easier to visually balance.
All the hard stuff is done. One more weekend, converting my website
to the new scheme, and working out macros to generate the <applet tags
and I should be there.
All I will have to do to post Java code on my website is put the
snippet in a special directory, and refer to it by name in my HTML
using a macro. That will generate an applet with just the right size
window (or scrolling window), to view the source. You can cut/paste
to cannibalise. For people without Java, they will have the option to
download the snippet as a *.java file.
products:
http://mindprod.com/projjavapresenter.html
It takes pre-parsed Java source snippets, not necessarily
syntactically valid, and displays them in colours and fonts in a way
to make the meaning of the program more obvious.
For example, it highlights RETURNs, and boldens references in the
places they are defined.
I render with drawString paying attention to the clip region. Boy is
this fast!
I am still playing with the colourscheme to give maximal information
without sensory overload. I want the effects to be subtle, but
sufficiently distinct so you can tell what's a keyword, method,
variable, constant, Class, Interface just by looking at the word
without having to study the context.
I use variable size ()[] {} to make it easier to visually balance.
All the hard stuff is done. One more weekend, converting my website
to the new scheme, and working out macros to generate the <applet tags
and I should be there.
All I will have to do to post Java code on my website is put the
snippet in a special directory, and refer to it by name in my HTML
using a macro. That will generate an applet with just the right size
window (or scrolling window), to view the source. You can cut/paste
to cannibalise. For people without Java, they will have the option to
download the snippet as a *.java file.