Since the actual activation of the help system (call to the static 'help server' method) has to be programmed by whoever is doing the interface, that means you are pretty much free to define the activation action that has to be taken by the user.
If you press F1, it would trigger among others the KeyPressed event, passing an EventObject (KeyEvent inherits this one) as a parameter. With that object you are able to access the source component of that event.
All the events that are key driven or mouse driven has a source object that you can pass to the help system.
For the key events this would be the component that has the focus in the moment. For the mouse events it would be the component under the cursor at the moment of the event.
Check out these events as they carry some more information that is useful.
That seems like a good way to make context sensitive help.
To be honest I did not check out the Java Help system. I think the big download (20+ MB ??) stalled me the last time I tried.
I'll have to make the effort someday.
Color
If you press F1, it would trigger among others the KeyPressed event, passing an EventObject (KeyEvent inherits this one) as a parameter. With that object you are able to access the source component of that event.
All the events that are key driven or mouse driven has a source object that you can pass to the help system.
For the key events this would be the component that has the focus in the moment. For the mouse events it would be the component under the cursor at the moment of the event.
Check out these events as they carry some more information that is useful.
That seems like a good way to make context sensitive help.
To be honest I did not check out the Java Help system. I think the big download (20+ MB ??) stalled me the last time I tried.
I'll have to make the effort someday.
Color
Comment