|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.help.CSH
A convenience class that provides simple access to context-senstive help functionality. It creates a default JavaHelp viewer as well as ActionListeners for "Help" keys, on-item help, and help buttons.
Nested Class Summary | |
static class |
CSH.DisplayHelpAfterTracking
An ActionListener that displays help on a selected object after tracking context-sensitive events. |
static class |
CSH.DisplayHelpFromFocus
An ActionListener that displays the help of the object that currently has focus. |
static class |
CSH.DisplayHelpFromSource
An ActionListener that gets the helpID for the action source and displays the helpID in the help viewer. |
static interface |
CSH.Manager
CSH Manager Interface to support dynamic HelpSet and ID
for object. |
Constructor Summary | |
CSH()
|
Method Summary | |
static void |
addManager(CSH.Manager m)
Registers the specified manager to maintain dynamic CSH. |
static void |
addManager(int i,
CSH.Manager m)
Registers the specified manager to maintain dynamic CSH at the specified position in list of managers. |
static java.lang.String |
getHelpIDString(java.awt.Component comp)
Returns the static helpID for a component. |
static java.lang.String |
getHelpIDString(java.awt.MenuItem comp)
Returns the static helpID for a MenuItem. |
static java.lang.String |
getHelpIDString(java.lang.Object comp,
java.awt.AWTEvent evt)
Returns the dynamic HelpID for a object. |
static HelpSet |
getHelpSet(java.awt.Component comp)
Returns the static HelpSet for a Component. |
static HelpSet |
getHelpSet(java.awt.MenuItem comp)
Returns the static HelpSet for a MenuItem. |
static HelpSet |
getHelpSet(java.lang.Object comp,
java.awt.AWTEvent evt)
Returns the dynamic HelpSet for an object. |
static CSH.Manager |
getManager(int i)
Returns the manager at the specified position in manager list. |
static int |
getManagerCount()
Returns the number of managers registered to maintain dynamic CSH. |
static CSH.Manager[] |
getManagers()
Returns array of managers registered to maintain dynamic CSH. |
static void |
removeAllManagers()
Removes all managers from manager list. |
static boolean |
removeManager(CSH.Manager m)
Removes the first occurrence of the specified manager in manager list. |
static void |
removeManager(int i)
Removes the manager at the specified position in manager list. |
static void |
setHelpIDString(java.awt.Component comp,
java.lang.String helpID)
Sets the helpID for a Component. |
static void |
setHelpIDString(java.awt.MenuItem comp,
java.lang.String helpID)
Sets the helpID for a MenuItem. |
static void |
setHelpSet(java.awt.Component comp,
HelpSet hs)
Sets the static HelpSet for a Component. |
static void |
setHelpSet(java.awt.MenuItem comp,
HelpSet hs)
Sets the static HelpSet for a MenuItem. |
static java.lang.Object |
trackCSEvents()
Context Sensitive Event Tracking Creates a new EventDispatchThread from which to dispatch events. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CSH()
Method Detail |
public static void addManager(CSH.Manager m)
m
- the CSH managerpublic static void addManager(int i, CSH.Manager m)
i
- index at which specified manager is to be inserted.m
- the CSH manager
java.lang.ArrayIndexOutOfBoundsException
- index out of range
(i < 0 || i >= CSH.getManagerCount()).public static boolean removeManager(CSH.Manager m)
m
- manager to be removed from the list, if present.
true
if the list contained the specified manager.public static void removeManager(int i)
i
- the index of the manager to removed.
java.lang.ArrayIndexOutOfBoundsException
- index out of range
(i < 0 || i >= CHS.getManagerCount()).public static void removeAllManagers()
public static CSH.Manager getManager(int i)
i
- index of manager to return.
java.lang.ArrayIndexOutOfBoundsException
- index is out of range
(i < 0 || i >= CSH.getManagerCount()).public static CSH.Manager[] getManagers()
java.lang.ArrayStoreException
- the runtime type of a manager is not a
CSH.Manager
public static int getManagerCount()
public static void setHelpIDString(java.awt.Component comp, java.lang.String helpID)
java.lang.IllegalArgumentException
- comp is neither Component
norpublic static void setHelpIDString(java.awt.MenuItem comp, java.lang.String helpID)
java.lang.IllegalArgumentException
- comp is neither Component
norpublic static java.lang.String getHelpIDString(java.lang.Object comp, java.awt.AWTEvent evt)
java.lang.IllegalArgumentException
- comp is neither Component
nor
MenuItem
.public static java.lang.String getHelpIDString(java.awt.Component comp)
This method calls CSH.getHelpIDString(comp, null)
.
setHelpIDString(Component, String)
public static java.lang.String getHelpIDString(java.awt.MenuItem comp)
This method calls CSH.getHelpIDString(comp, null)
.
setHelpIDString(MenuItem, String)
public static void setHelpSet(java.awt.Component comp, HelpSet hs)
public static void setHelpSet(java.awt.MenuItem comp, HelpSet hs)
public static HelpSet getHelpSet(java.lang.Object comp, java.awt.AWTEvent evt)
java.lang.IllegalArgumentException
- comp is neither Component
nor
MenuItem
.getHelpID
public static HelpSet getHelpSet(java.awt.Component comp)
This method calls CSH.getHelpSet(comp, null)
.
java.lang.IllegalArgumentException
- comp is not Component
See Also:getHelpID
public static HelpSet getHelpSet(java.awt.MenuItem comp)
CSH.getHelpIDString(comp, null)
.
java.lang.IllegalArgumentException
- comp is not MenuItem
getHelpID
public static java.lang.Object trackCSEvents()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |