Oracle JEWT API Reference
Release 4.2.24.0.0
B12199-01

oracle.bali.ewt.help
Class HelpUtils

java.lang.Object
  |
  +--oracle.bali.ewt.help.HelpUtils

public class HelpUtils
extends java.lang.Object

The HelpUtils class provides ways for clients to set properties on an object to allow the HelpProvider.showHelp() call to work, and for certain help-knowledgeable objects to call help on their own.

Exactly what data should be set for each property depends on the particular help system in use; however, in general, the HelpID property will be a string identifying an individual topic, and the HelpSet property will be an object containing many topics (a JavaHelp HelpSet or an OHJ Book.) The HelpProvider property must be an object implementing the oracle.bali.ewt.help.HelpProvider interface.


Method Summary
static java.lang.String getDefaultHelpID()
          Gets the current default Help ID.
static HelpProvider getDefaultHelpProvider()
          Gets the default HelpProvider.
static java.lang.Object getDefaultHelpSet()
          Gets the current default HelpSet.
static java.lang.String getHelpID(java.awt.Component component)
          Gets the current help ID for a given component.
static HelpProvider getHelpProvider(java.awt.Component component)
          Gets the current HelpProvider for a given component.
static java.lang.Object getHelpSet(java.awt.Component component)
          Gets the current HelpSet for a given component.
static void setDefaultHelpID(java.lang.String id)
          Sets the default HelpID.
static void setDefaultHelpProvider(HelpProvider provider)
          Sets the default HelpProvider for the application.
static void setDefaultHelpSet(java.lang.Object helpset)
          Sets the default HelpSet object.
static void setHelpID(javax.swing.JComponent component, java.lang.String id)
          Sets a HelpID property on a component.
static void setHelpProvider(javax.swing.JComponent component, HelpProvider provider)
          Sets a HelpProvider property on a component.
static void setHelpSet(javax.swing.JComponent component, java.lang.Object helpset)
          Sets a HelpSet property on a component.
static void showHelp(java.awt.Component component)
          Shows help for the component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

showHelp

public static void showHelp(java.awt.Component component)
                     throws HelpUnavailableException
Shows help for the component. Simply a convenience
Parameters:
component - The component to find a HelpProvider for

setDefaultHelpProvider

public static void setDefaultHelpProvider(HelpProvider provider)
Sets the default HelpProvider for the application. If no HelpProvider can be found among the component or its ancestors, the default (if there is one) is used.
Parameters:
provider - The new default HelpProvider

getDefaultHelpProvider

public static HelpProvider getDefaultHelpProvider()
Gets the default HelpProvider. Returns null if no default has been set.
Returns:
The current default HelpProvider.

setDefaultHelpSet

public static void setDefaultHelpSet(java.lang.Object helpset)
Sets the default HelpSet object. This HelpSet object will be used if no HelpSet can be found on a component or any of its ancestors.

The exact type of this object will depend on the help system in use.

Parameters:
helpset - The new default HelpSet

getDefaultHelpSet

public static java.lang.Object getDefaultHelpSet()
Gets the current default HelpSet. Returns null if no default has been set.
Returns:
The current default HelpSet.

setDefaultHelpID

public static void setDefaultHelpID(java.lang.String id)
Sets the default HelpID. This HelpID will be used if no HelpID can be found on a component or any of its ancestors.

Parameters:
id - The new default Help ID.

getDefaultHelpID

public static java.lang.String getDefaultHelpID()
Gets the current default Help ID. Returns null if no default has been set.
Returns:
The current default HelpID.

setHelpProvider

public static void setHelpProvider(javax.swing.JComponent component,
                                   HelpProvider provider)
Sets a HelpProvider property on a component. This allows this component, if it is capable of showing help for itself, to do so when needed. (For example, a Wizard can have a HelpProvider, which will be activated when the Help button is activated.)
Parameters:
component - The component to set the property on.
provider - The provider to set on the given component.

setHelpSet

public static void setHelpSet(javax.swing.JComponent component,
                              java.lang.Object helpset)
Sets a HelpSet property on a component. This allows the HelpProvider or another context-sensitive-help class to show the appropriate help for the component.
Parameters:
component - The component to set the property on.
helpset - The helpset to associate with the given component.

setHelpID

public static void setHelpID(javax.swing.JComponent component,
                             java.lang.String id)
Sets a HelpID property on a component. This allows the HelpProvider or another context-sensitive-help class to show the appropriate help topic for the component.
Parameters:
component - The component to set the property on.
id - The ID to associate with the given component.

getHelpProvider

public static HelpProvider getHelpProvider(java.awt.Component component)
Gets the current HelpProvider for a given component. Walks up the component hierarchy as needed to find one; returns the default if no provider was found for the component or any ancestor.
Parameters:
component - The component to find a HelpProvider for
Returns:
The HelpProvider for the given component; null if no such provider could be found.

getHelpSet

public static java.lang.Object getHelpSet(java.awt.Component component)
Gets the current HelpSet for a given component. Walks up the component hierarchy as needed to find one; returns the default if no HelpSet was found for the component or any ancestor.
Parameters:
component - The component to find a HelpSet for
Returns:
The HelpSet for the given component; null if no such provider could be found.

getHelpID

public static java.lang.String getHelpID(java.awt.Component component)
Gets the current help ID for a given component. Walks up the component hierarchy as needed to find one; returns the default if no help ID was found for the component or any ancestor.
Parameters:
component - The component to find a help ID for
Returns:
The help ID for the given component; null if no such provider could be found.

Oracle JEWT 4.2.24

Copyright © [xxxx],2003, Oracle. All Rights Reserved.