Skip to Main Content
Creating Effective JavaHelp
book

Creating Effective JavaHelp

by Kevin Lewis
June 2000
Intermediate to advanced content levelIntermediate to advanced
192 pages
4h 53m
English
O'Reilly Media, Inc.
Content preview from Creating Effective JavaHelp

Using Field-Level Context-Sensitive Help

You can take context-sensitivity one step further and implement field-level help (sometimes called What’s This? help). In this scheme, the user clicks a button or selects a menu item that causes the mouse pointer to change—perhaps to a question mark. The user then clicks a control, such as a button or selection box, and the application displays online help specific to that control.

The TypeFacer application consists of buttons, boxes, and text-display areas, all of which are potential targets for field-level help. For example, a user might not know what the Show button does—a situation perfect for using field-level help. Figure 7.7 shows the help system after a user accesses field-level help for the Show button.

Field-level help

Figure 7-7. Field-level help

Programming Field-Level Context-Sensitive Help

Field-level context-sensitive help works like screen-level context-sensitive help. You use the same setHelpIDString( ) method as for screen-level help. Using this method, you provide a map ID for every component in the application, not just its usage modes or screens.

Use the following steps to add field-level context-sensitive help to the TypeFacer application. For this revision of the program, all the lines to be uncommented start with //#4.

  1. Associate a help topic with each user-interface component:

    // assign map IDs for field-level context-sensitive help CSH.setHelpIDString(inputField, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Expert One-on-One™ J2EE™ Development without EJB™

Expert One-on-One™ J2EE™ Development without EJB™

Rod Johnson, Juergen Hoeller
Pro JavaFX 9: A Definitive Guide to Building Desktop, Mobile, and Embedded Java Clients

Pro JavaFX 9: A Definitive Guide to Building Desktop, Mobile, and Embedded Java Clients

Johan Vos, Stephen Chin, Weiqi Gao, James Weaver, Dean Iverson

Publisher Resources

ISBN: 1565927192Supplemental ContentCatalog PageErrata