Why would you use it? For the same sorts of reasons you use colours and fonts in an IDE like IntelliJ or Eclipse. They make your code much easier to understand for visitors to your website. The techniques used are more much more efficient of bandwidth than displaying images.
There is no server-side code used. Java utilities parse the code snippets into compact binary tokens, assigning colours, fonts, sizes and weights to each token. Then the tokens can be rendered three ways:
I presume the user is familiar with bat and ant files and Java building.
I have not included the enormous HTML static macros package which I use for deciding the sizes and display rendering method for each snippet, though I did include the code to make those decisions hooked into your own framework. At some point in the near future I will make the htmlmacros package available for download separately.
The parsers are rough and ready. They need to work on code snippets and erroneous code, not perfect code the way a standard parser does. If improve the parsers, or add new ones, please pass them along for the public distribution.
JDisplay is enormously more complicated than it appears on the surface. You can spelunk and discover all manner of interesting code you can cannibalise. There are finite state machines, clipregion sensitive Canvas rendering, HTML generators, ObjectStreams...
| com.mindprod.compactor | compacts html to remove excess white space. |
| com.mindprod.entities | interconvert & ⇔ & etc. |
| com.mindprod.filter | set of FilenameFilters |
| com.mindprod.htmlmacros jdisplay.java | part of a large static macros package to expand macros embedded in HTML before the files are uploaded to the server. |
| com.mindprod.hunkio | does IO in big hunks. |
| com.mindprod.jdisplayaux | static macro to decide which of three ways to render a given snippet and inserts the appropriate HTML to do that into your HTML. |
| com.mindprod.jdisplayorphans | detects orphans not referenced by any of your HTML. |
| com.mindprod.jprep | parses the snippets of code, producing binary *.ser files. |
| com.mindprod.jtokens | Tokens and parsers for various languages rendered. |
| mindprod.css | style sheet that controls the fonts/tokens/sizes |
... Border b1 = BorderFactory.createLineBorder( Color.black ); Border b2 = BorderFactory.createEtchedBorder( EtchedBorder.LOWERED ); Border b3 = new BevelBorder ( BevelBorder.LOWERED, Color.red ); JPanel panel = new JPanel(); panel.setBorder( b2 );
| Package | Version | Released | Licence | Language | Notes | ||
|---|---|---|---|---|---|---|---|
JDisplay |
3.9 | 2008-08-08 | free | Java |
summary
/ PAD description
/ screenshot
for the current version of JDisplay.
Displays Java, HTML, bat, SQL, ini, csv, properties... source.
download
JDisplay source and compiled class files to run on your own machine as an Applet.
First install the most recent Java.
To install, extract the zip download with WinZip,
(or similar unzip utility) into any directory you please,
often J:\ — ticking off the
“user folder names” option.
download ASP PAD XML program description for the current version of JDisplay. JDisplay is free.
Full source included.
You may even include the source code, modified or unmodified
in commercial programs that you write and distribute. Non-military use only. |
||
E:\mindprod\jgloss
Then the corresponding program listing snippets will live in:
E:\mindprod\jgloss\snippet
the generated *.ser files live in
E:\mindprod\jgloss\snippet\ser
and the generated iframe *.html files will live in
E:\mindprod\jgloss\snippet\iframe
All off this must be uploaded to your website.
If you have questions, please feel free to ask at
.
It will help me put together some minimalist documentation.
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| mindprod.com IP:[65.110.21.43] | |||
| Your face IP:[38.103.63.62] | The information on this page is for non-military use only. | ||
| You are visitor number 11. | Military use includes use by defence contractors. | ||
| You can get a fresh copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | ||
| http://mindprod.com/applet/jdisplay.html | J:\mindprod\applet\jdisplay.html | ||