Skip to main content

[JAVAHELP] JEditorPane CSS capabilities?

4 replies [Last post]
Anonymous

Hello,

after struggling with JRE 1.3 and 1.3.1 I am now working with 1.4.1 and wondering what has changed regarding the display capabilities, i.e. CSS support. My first impression is: not very much.

Has anyone created or found an overview of the dos and don'ts of JavaHelp HTML/CSS formatting?

Thank you,

- Michael

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jimbo99
Offline
Joined: 2006-02-17
Points: 0

Michael,

I'm currently creating a css for a JavaHelp project and I've found the following:

For the text immediately before a table, I have to add a spacer image and set the height to 10 pixels, so that the JavaHelp 2.0 viewer correctly displays a line space between the paragraph and the table.

For the text immediately following an H1, H2, H3, or H4 heading (h5 and h6 too), I created a special class that applies a top margin of -10 pixels. Otherwise, I see too much space between the heading and the text

For bullets, I use the bluelistbull.gif. I got it from Paul Fussel at Sun.

In tables with multiple paragraphs, I found that I can only use "soft" returns between paragraphs. Otherwise, the JavaHelp 2.0 viewer appears to insert an extra linespace between the top of the table and the first paragraph.

Hope this helps.

Jim Reinhard

Paul Fussell

Attached is a simple CSS file that produces a fairly pleasing look in the
JavaHelp viewer without using class declarations. You can tweak it all you
like to make things look the way you want them to. I think it's better to
have your own CSS file than rely on the JavaHelp viewer's built-in styles
for the HTML tags. This style sheet doesn't define h5 and h6, but you could
add your own definitions. You could also add a class, for example, for
paragraphs inside table cells. (I usually don't define

s inside table
cells, either, but, like Jim, use
if necessary to separate lines.)

--Paul

At 01:20 PM 2/18/2004, javahelp1@JAVADESKTOP.ORG wrote:
>Michael,
>
>I'm currently creating a css for a JavaHelp project and I've found the
>following:
>
>For the text immediately before a table, I have to add a spacer image and
>set the height to 10 pixels, so that the JavaHelp 2.0 viewer correctly
>displays a line space between the paragraph and the table.
>
>For the text immediately following an H1, H2, H3, or H4 heading (h5 and h6
>too), I created a special class that applies a top margin of -10
>pixels. Otherwise, I see too much space between the heading and the text
>
>For bullets, I use the bluelistbull.gif. I got it from Paul Fussel at Sun.
>
>In tables with multiple paragraphs, I found that I can only use "soft"
>returns between paragraphs. Otherwise, the JavaHelp 2.0 viewer appears to
>insert an extra linespace between the top of the table and the first paragraph.
>
>Hope this helps.
>
>Jim Reinhard
>
>********************************************************************************
>
>You may leave the list at any time by sending message with no subject and
>"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
>are available at http://archives.java.sun.com/archives/javahelp-interest.html.
>Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

Chris Morris

Michael M�ller-Hillebrand wrote:
>Hello,
>
>after struggling with JRE 1.3 and 1.3.1 I am now working with 1.4.1 and
wondering what has >changed regarding the display capabilities, i.e. CSS
support. My first impression is: not very >much.
>
>Has anyone created or found an overview of the dos and don'ts of JavaHelp
HTML/CSS formatting?
>
>Thank you,
>
>- Michael
***************************************************

Look in the API documentation for the Java2 development kit for
javax.swing.text.html.CSS
( /j2sdk1.4.1/docs/api/index.html ).

This will give you a full list of what is and isn't supported in the CSS
spec.

Hope this helps.

====================================================
Chris Morris
Technical Author
SAA Consultants Ltd
http://www.saaconsultants.com
http://www.reims.net
====================================================
********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

Michael M�ller-Hillebrand

On 16.09.2003 (9:50 Uhr +0100), Chris Morris wrote:

>Michael M�ller-Hillebrand wrote:
>>Hello,
>>
>>after struggling with JRE 1.3 and 1.3.1 I am now working with 1.4.1 and
>wondering what has >changed regarding the display capabilities, i.e. CSS
>support. My first impression is: not very >much.
>>
>>Has anyone created or found an overview of the dos and don'ts of JavaHelp
>HTML/CSS formatting?
>>
>>Thank you,
>>
>>- Michael
>***************************************************
>
>Look in the API documentation for the Java2 development kit for
>javax.swing.text.html.CSS
>( /j2sdk1.4.1/docs/api/index.html ).
>
>This will give you a full list of what is and isn't supported in the CSS
>spec.

Thank you Chris,

the source you gave me lists all supported CSS keywords, and otherwise tells the reader how incomplete the implementation is. It also does not give any clue, to what extent any of the features are supported and in what combinations... so not very much has changed since JRE 1.3.x.

However, I found one very useful information: Class names must be completely lower-case to be accepted by the HTML renderer.

Thanks,

- Michael
--
_____________________________________________________________
Dipl.-Ing. Michael M�ller-Hillebrand
������������������������������������
"Mehr Effizienz f�r Wissensarbeiter" --> http://cap-studio.de

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.