com.ca.commons.cbutil
Class CBHelpSystem

java.lang.Object
  |
  +--com.ca.commons.cbutil.CBHelpSystem

public class CBHelpSystem
extends java.lang.Object

A wrapper around the JavaHelp system.


Constructor Summary
CBHelpSystem(java.lang.String helpset_Name)
          fires up the Help Broker, using the passed help file name (which is checked for localisation).
CBHelpSystem(java.lang.String helpset_Name, java.lang.ClassLoader cl)
          fires up the Help Broker, using the passed help file name (which is checked for localisation).
 
Method Summary
 void addHelpSet(HelpSet newSet)
           
 void addHelpSet(java.lang.String pluginHelpSet, java.lang.ClassLoader loader)
          Appends a new help set to the main help set - useful for plugin help sets.
static void addToDefaultHelpSystem(java.lang.String newHelpSet, java.lang.ClassLoader loader)
           
protected  void doDelayedConstructor()
          A piece of performance evil; delay actually doing all the help initialisation until we *really* have to ('cause it's so darn expensive)
static CBHelpSystem getDefaultHelpSystem()
           
 HelpBroker getHelpBroker()
           
 HelpSet getHelpSet()
           
static HelpSet getHelpSet(java.lang.String newHelpSetName, java.lang.ClassLoader loader)
          Uses the specified class loader (or the default, if the class loader is null) to look up the named help set, and return it.
 void open()
          Show the help window
 void open(java.lang.String contentID)
          Shows the help window at a defined location (specifically set up for dialog help buttons).
 boolean ready()
           
static void setdefaultHelpSystem(CBHelpSystem set)
           
static void useDefaultHelp(javax.swing.JButton button, java.lang.String helpString)
          Sets up a help button with a listener that when clicked will open the at the defined location in java help.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CBHelpSystem

public CBHelpSystem(java.lang.String helpset_Name)
fires up the Help Broker, using the passed help file name (which is checked for localisation).


CBHelpSystem

public CBHelpSystem(java.lang.String helpset_Name,
                    java.lang.ClassLoader cl)
fires up the Help Broker, using the passed help file name (which is checked for localisation).

Parameters:
cl - the class loader used to load the help set url.
Method Detail

ready

public boolean ready()

doDelayedConstructor

protected void doDelayedConstructor()
A piece of performance evil; delay actually doing all the help initialisation until we *really* have to ('cause it's so darn expensive)


getHelpSet

public HelpSet getHelpSet()

getHelpBroker

public HelpBroker getHelpBroker()

getHelpSet

public static HelpSet getHelpSet(java.lang.String newHelpSetName,
                                 java.lang.ClassLoader loader)
Uses the specified class loader (or the default, if the class loader is null) to look up the named help set, and return it.

Parameters:
newHelpSetName - the base name of the help set (without any localisation extensions.)

addHelpSet

public void addHelpSet(java.lang.String pluginHelpSet,
                       java.lang.ClassLoader loader)
Appends a new help set to the main help set - useful for plugin help sets.

Parameters:
loader - - the class loader used to find the plugin help set
pluginHelpSet - - the

addHelpSet

public void addHelpSet(HelpSet newSet)

open

public void open()
Show the help window


open

public void open(java.lang.String contentID)
Shows the help window at a defined location (specifically set up for dialog help buttons).

Parameters:
contentID - the location (or topic ID) to be displayed when the help opens.

setdefaultHelpSystem

public static void setdefaultHelpSystem(CBHelpSystem set)

getDefaultHelpSystem

public static CBHelpSystem getDefaultHelpSystem()

addToDefaultHelpSystem

public static void addToDefaultHelpSystem(java.lang.String newHelpSet,
                                          java.lang.ClassLoader loader)

useDefaultHelp

public static void useDefaultHelp(javax.swing.JButton button,
                                  java.lang.String helpString)
Sets up a help button with a listener that when clicked will open the at the defined location in java help. Solves the modal problem too.

Parameters:
button - the help button.
helpString - the map ID (java help location that is to be displayed).