The correct way to implement Context Sensitive Help?

Greetings,

the subject line say about it all; I've implemented a 'colour measuring control system' in Java, applying

the classic MVC pattern where the software M(odel) communicates with the colour measuring hardware,

the C(ontroller) implements all the application logic and the V(iew), well it's just the View ...

Everything runs as a breeze, from a simple RS232 Model on a local machine (talking to the hardware

through an RS232/RS485 line) to an Internet enabled model (a machine somewhere else serves as a

proxy Controller for the actual Model). There's one thing though, and I've googled quite a bit but it just

added to my confusion w.r.t. this topic: what's the 'best', or 'standard' way to add Context Sensitive Help in

a platform independent way to an application? Let's say I'm talking 1.4.2 here ...

kind regards,

Jos

ps. FYI: I enjoyed developing the whole shebang but implementing all those Views/GUIs was a

boring exercise; (just IMHO of course ;-)

[1057 byte] By [JosAH] at [2007-9-30 20:36:41]
# 1
There's no magic I know of.Best / easiest way I'd think would be to put together a couple of web (.html) pages and when the user clicks help display the correct one in a JEditorPane
tjacobs01 at 2007-7-7 1:26:02 > top of Java-index,Java Essentials,Java Programming...
# 2

> There's no magic I know of.

>

> Best / easiest way I'd think would be to put together

> a couple of web (.html) pages and when the user clicks

> help display the correct one in a JEditorPane

Yep I figured out that much, but is there really no 'standard' (mind the quotes) way of doing this? I can't

believe that no one has done this (tedious) stuff before ...

I do like your approach though, I just don't like doing this (boring) stuff all over again ;-)

kind regards,

Jos

JosAH at 2007-7-7 1:26:02 > top of Java-index,Java Essentials,Java Programming...
# 3
JavaHelp provides contex-sensitive help. Here's a list of its features http://java.sun.com/products/javahelp/features.html
ChuckBing at 2007-7-7 1:26:02 > top of Java-index,Java Essentials,Java Programming...
# 4
There's also JavaHelp which I suppose might aid in this process. (Not that I've actually used it) http://java.sun.com/products/javahelp/index.jspOf course, this solution is Java-platform dependent...
RadcliffePike at 2007-7-7 1:26:02 > top of Java-index,Java Essentials,Java Programming...
# 5
Oooh, Chuck and I had the same idea at the same time...but different links!
RadcliffePike at 2007-7-7 1:26:02 > top of Java-index,Java Essentials,Java Programming...
# 6

Yeah, that's a good idea. I was unaware of JavaHelp. It seems like it's basically the same idea I was presenting, but with searching, etc. The question you need to ask yourself is "is searching worth the extra 6 mBytes to add to distribution?" It could very well be, I don't know. For an app that seems ok, and for an applet people should only have to download it once. But it would take awhile over 28.8

tjacobs01 at 2007-7-7 1:26:02 > top of Java-index,Java Essentials,Java Programming...
# 7
I must be a clunmsy oaf; I haven't found JavaHelp anywhere while pirating Google ... Thanks for thelinks folks; I guess Sun's JavaHelp is the right choice here ...kind regards,Jos
JosAH at 2007-7-7 1:26:02 > top of Java-index,Java Essentials,Java Programming...
# 8
> Oooh, Chuck and I had the same idea at the same time... but different links!Duh, you were two minutes behind according to my information ;-Pkind regards,Jos
JosAH at 2007-7-7 1:26:02 > top of Java-index,Java Essentials,Java Programming...
# 9

> > Oooh, Chuck and I had the same idea at the same

> time... but different links!

>

> Duh, you were two minutes behind according to my

> information ;-P

>

> kind regards,

>

> Jos

Probably due to my blazing typing speed, I got there first. ;)

ChuckBing at 2007-7-7 1:26:02 > top of Java-index,Java Essentials,Java Programming...
# 10

How about doing this one?:

For each dialog box, have a little button that when pressed will pop up a tooltip or perhaps another dialog box, containing the relevant contextual help info. (I think NetBeans has something similar)

Yes, this does sound tedious. Maybe make the HTML help pages, and link each dialog to an HTML reference (either an HTML page, or a text file, that you package with the program)

You could <grits teeth for the most laborious yet> subclass JDialog [for all your dialogs in the program!!!] and just pass in an extra String parameter to the constructor, representing the help resource with which to associate the dialog...

regards,

lutha

Lutha at 2007-7-7 1:26:02 > top of Java-index,Java Essentials,Java Programming...
# 11

If you only need it for the HTML there is the "title" field on html objects which allows you to display a small bit of information about it when you put your mouse over it. For example, hold your mouse over the yellow duke dollar icon on people you have awarded dukes to; it will say how many you have awarded.

Implemented as:

<img src="..." title="10 Duke dollars awarded" />

yasias at 2007-7-7 1:26:02 > top of Java-index,Java Essentials,Java Programming...
# 12

> For each dialog box, have a little button that when pressed will pop up a tooltip or perhaps another

> dialog box, containing the relevant contextual help info. (I think NetBeans has something similar)

>

> Yes, this does sound tedious.

Yes it does; as far as I've made a decision now, I'm going for the JavaHelp package (see above).

As far as I can tell now, the JavaHelp approach is tedious also ;-)

kind regards,

Jos

ps. I already use ToolTipTexts for about every visual component; I want it to be possible to simply

press F1 (help) to make context sensitive help pop up ...

JosAH at 2007-7-7 1:26:02 > top of Java-index,Java Essentials,Java Programming...
# 13

> If you only need it for the HTML there is the "title" field on html objects which allows you to display a

> small bit of information about it when you put your mouse over it. For example, hold your mouse over the

> yellow duke dollar icon on people you have awarded dukes to; it will say how many you have awarded.

>

> Implemented as:

> <img src="..." title="10 Duke dollars awarded" />

Yep, but I already use ToolTipTexts and they're all localized too (L10N and I18N stuff, using ResourceBundles).

This approach doesn't fit in the L10N mechanism ...

kind regards,

Jos

JosAH at 2007-7-7 1:26:02 > top of Java-index,Java Essentials,Java Programming...
# 14

> > For each dialog box, have a little button that when

> pressed will pop up a tooltip or perhaps another

> > dialog box, containing the relevant contextual help

> info. (I think NetBeans has something similar)

> >

> > Yes, this does sound tedious.

>

> Yes it does; as far as I've made a decision now, I'm

> going for the JavaHelp package (see above).

> As far as I can tell now, the JavaHelp approach is

> tedious also ;-)

who said programming's not a lot of work... ;)

>

> kind regards,

>

> Jos

>

> ps. I already use ToolTipTexts for about every visual

> component; I want it to be possible to simply

> press F1 (help) to make context sensitive help pop up

> ...

is there no way to have a 'state' variable of sorts?

when yoiu press F1 it checks what the stste is (ie which part of the program you are in)

and then displsays help info as appropriate?

just an idea...

lutha (typung with 1 hand caUse I'm eating Lays with the other. plz excuse...)

Lutha at 2007-7-7 1:26:02 > top of Java-index,Java Essentials,Java Programming...