public final class HelpCtx extends Object
JComponent
instances.Modifier and Type | Class and Description |
---|---|
static interface |
HelpCtx.Provider
An object implementing this interface is willing to answer
the HelpCtx.findHelp() query itself.
|
Modifier and Type | Field and Description |
---|---|
static HelpCtx |
DEFAULT_HELP
Default help page.
|
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
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() |
public static final HelpCtx DEFAULT_HELP
org.openide.util.HelpCtx.DEFAULT_HELP
.@Deprecated 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 frompublic URL getHelp()
null
if the target was specified by IDpublic String getHelpID()
null
if specified by URLpublic 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 fornull
)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 forHelpCtx.DEFAULT_HELP
if HelpCtx cannot be foundBuilt on September 3 2013. | Portions Copyright 1997-2013 Sun Microsystems, Inc. All rights reserved.