|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.util.HelpCtx
Provides help for any window or other feature in the system.
It is designed to be JavaHelp-compatible and to use the same tactics when
assigning help to JComponent
instances.
Nested Class Summary | |
static interface |
HelpCtx.Provider
An object implementing this interface is willing to answer the HelpCtx.findHelp() query itself. |
Field Summary | |
static HelpCtx |
DEFAULT_HELP
Default help page. |
Constructor Summary | |
HelpCtx(Class clazz)
Create a help context by class. |
|
HelpCtx(String helpID)
Create a help context by tag. |
|
HelpCtx(URL helpCtx)
Deprecated. Does not work nicely with JavaHelp. |
Method Summary | |
boolean |
equals(Object o)
|
static HelpCtx |
findHelp(Component comp)
Find the help ID for a component. |
static HelpCtx |
findHelp(Object instance)
Finds help context for a generic object. |
URL |
getHelp()
Get a URL to the help page, if applicable. |
String |
getHelpID()
Get the ID of the help page, if applicable. |
int |
hashCode()
|
static void |
setHelpIDString(JComponent comp,
String helpID)
Set the help ID for a component. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final HelpCtx DEFAULT_HELP
org.openide.util.HelpCtx.DEFAULT_HELP
.
Constructor Detail |
public HelpCtx(URL helpCtx)
helpCtx
- URL to point help topublic HelpCtx(String helpID)
helpID
- the JavaHelp ID of the helppublic HelpCtx(Class clazz)
clazz
- the class to take the name fromMethod Detail |
public URL getHelp()
null
if the target was specified by IDpublic String getHelpID()
null
if specified by URLpublic int hashCode()
public boolean equals(Object o)
public String toString()
public static void setHelpIDString(JComponent comp, String helpID)
comp
- the visual component to associate help tohelpID
- help ID, or null
if the help ID should be removedpublic static HelpCtx findHelp(Component comp)
HelpCtx.Provider
,
its method HelpCtx.Provider.getHelpCtx()
is called.
If the component has help attached by setHelpIDString(javax.swing.JComponent, java.lang.String)
, it returns that.
Otherwise it checks the parent component recursively.
comp
- the component to find help for
null
)public static HelpCtx findHelp(Object instance)
BeanDescriptor
's are checked for a string-valued attribute
helpID
, as per the JavaHelp specification (but no help sets
will be loaded).
instance
- to search help for
HelpCtx.DEFAULT_HELP
if HelpCtx cannot be found
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |