O'Reilly logo

Creating Effective JavaHelp by Kevin Lewis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix C. The JavaHelp API

This appendix describes the classes in Version 1.1 of the Java programming libraries (“packages”) javax.help and javax.help.event.

Classes in Package javax.help

BadIDException

This exception is thrown when creating an ID with invalid arguments or using an ID that does not exist in the specified HelpSet. The getID( ) method returns the offending ID.

public class BadIDException extends IllegalArgumentException {
 // Constructors
   public BadIDException(String msg, Map map, String id, HelpSet hs)
 // Instance Methods
   public HelpSet getHelpSet(  )
   public String getID(  )
   public Map getMap(  )
}

CSH

This Context Sensitive Help (CSH) class provides many static convenience routines that help retrofit existing components with JavaHelp-specific properties. You can also create instances of its three inner classes for simple help-event handling. The CSH.DisplayHelpAfterTracking class, in particular, supports the field-level context sensitive help events.

public class CSH {
 // Inner Classes
   public static class DisplayHelpAfterTracking implements ActionListener
   public static class DisplayHelpFromFocus implements ActionListener
   public static class DisplayHelpFromSource implements ActionListener
 // Constructors
   public CSH(  )
 // Static Methods
   public static String getHelpIDString(Component comp)
   public static String getHelpIDString(MenuItem comp)
   public static HelpSet getHelpSet(Component comp)
   public static HelpSet getHelpSet(MenuItem comp)
   public static void setHelpIDString ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required