This discussion is archived
5 Replies Latest reply: Dec 11, 2009 2:54 PM by 793415 RSS

Javahelp and JDIC

801455 Newbie
Currently Being Moderated
Hi All,

I am developing help for swing application.
But the default help viewer was unable to load stylesheets.
But in java hekp users guide they mentioned that we can use JDIC for native browser support.
Then, i think that it may solve my probelm.
I have the following doubts regarding this.

How to use the JDIC components and render the help through the Native Browser?
How to integrate JDIC in to our applications?
How to get DefaultContentViewer?
How to set these native browser?

Please help for this questions.It helps me a lot.

If there is any other alternative please suggest me.

Correct me if i am wrong.

Thank you
Mourya
  • 1. Re: Javahelp and JDIC
    793415 Pro
    Currently Being Moderated
    sindhumourya wrote:
    ..I am developing help for swing application.
    But the default help viewer was unable to load stylesheets.
    The default HelpViewer has no problem loading stylesheets that are imported using relative paths and are available on the run-time classpath of the application. Java in general has trouble (read 'ignores') a variety of CSS. To check the stylesheet is loaded at all, try doing something simple like changing the background-color to red.
    ...
    How to use the JDIC components and render the help through the Native Browser?
    How to integrate JDIC in to our applications?
    How to get DefaultContentViewer?
    How to set these native browser?
    <DWS>Gee, at 5 Dukes for 4 questions, does that mean 1.25 per 'answer complete with code', or are they weighted somehow? If so, I'll go for the one that earns 2!</DWS>
  • 2. Re: Javahelp and JDIC
    801455 Newbie
    Currently Being Moderated
    Hi AndrewThompson,

    Thanks for your reply.
    I am using classes in my style sheet.
    The java help viewer was unable to load these styles.
    this is the actual probelm.

    for example:
    .pageGeneralTextStyleNormal {
         background-color:#990033;
         font-size: 13;
         font-family:Arial, Helvetica, sans-serif;
    }
  • 3. Re: Javahelp and JDIC
    793415 Pro
    Currently Being Moderated
    sindhumourya wrote:
    ..Thanks for your reply.
    I am using classes in my style sheet.
    The java help viewer was unable to load these styles.
    this is the actual probelm.
    Are you absolutely positive?
    for example:
    .pageGeneralTextStyleNormal {
         background-color:#990033;
         font-size: 13;
         font-family:Arial, Helvetica, sans-serif;
    }
    for example via: [http://jigsaw.w3.org/css-validator/#validate_by_input]
    Sorry! We found the following errors (1)
    ...
    3      .pageGeneralTextStyleNormal      Value Error : font-size only 0 can be a length. You must put a unit after your number : 13 
    That should be..
    .pageGeneralTextStyleNormal {
         background-color:#990033;
         font-size: 13px;
         font-family:Arial, Helvetica, sans-serif;
    }
    Or, since Arial is considered the poor cousin of Helvetica..
    .pageGeneralTextStyleNormal {
         background-color:#990033;
         font-size: 13px;
         font-family:Helvetica, Arial, sans-serif;
    }
    Now.
    1) How are you referring to the style-sheets in the HTML? Copy/paste an import statement.
    2) What is the run-time classpath of the application, and what are the contents of those archives?

    I hoped you might have the initiative to do these things and report them after my first post..
  • 4. Re: Javahelp and JDIC
    801455 Newbie
    Currently Being Moderated
    1) How are you referring to the style-sheets in the HTML? Copy/paste an import statement.
    <head>
    <title>Help Doc</title>
    <link rel=stylesheet type="text/css" href="mycss.css">
    </head>

    2) What is the run-time classpath of the application, and what are the contents of those archives?
    "%JDK_PATH%\bin\java" -client -Xmx128m -cp "./;./help-test.jar;./jdic-0.9.5-bin-cross-platform/lib/jdic.jar;" HelpTest.Main

    And also i got another eroor with the BasicNativeContentViewerUI,
    SwingHelpUtilities.setContentViewerUI("javax.help.plaf.basic.BasicNativeContentViewerUI");
    Error is : ContentViewerClass javax.help.plaf.basic.BasicNativeContentViewerUI doesn't exist

    TIA

    Edited by: sindhumourya on Dec 11, 2009 10:07 AM
  • 5. Re: Javahelp and JDIC
    793415 Pro
    Currently Being Moderated
    sindhumourya wrote:
    ..
    "%JDK_PATH%\bin\java" -client -Xmx128m -cp "./;./help-test.jar;./jdic-0.9.5-bin-cross-platform/lib/jdic.jar;" HelpTest.Main
    OK. What is the output of
    jar tvf help-test.jar
    ?
    & What is the name/location of the HTML attempting to load the CSS? Gee, how much do you understand about the concept of a 'relative reference'?

    Edited by: AndrewThompson64 on Dec 12, 2009 9:53 AM