|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The HelpSystem is used to integrate a set of HelpContexts. HelpSystem manages accessing the help resource bundle and launching help content in a browser. Each HelpContext is usually associated with a java.awt.Window (although it only requires a java.awt.Container). The HelpContext allows the association of each of the Window's Components with a topic identifier. The combination of the HelpSystem id (name) with the context id,
The help resource bundle contains a set of key value pairs. The keys are hierarchical keys which which are used to either identify a display string or a URL. The display strings are used directly on the frame to show things such as tool tips. URL's are used to launch a context sensitive help browser.
The following is an example of a help resource bundle:
public class HelpResources extends ListResourceBundle {
public Object[][] getContents() {
return contents;
}
static final Object[][] contents = {
// LOCALIZE THIS
{"Contents/HelpDesk", "HelpDeskContents.html"}, // Contents URL for appl HelpDesk
{"Help/HelpDesk", "HelpDeskHelp.html"}, // Help URL for HelpDesk
{"Desc/HelpDesk", "Press F1 for help." }, // Description URL.
{"Help/HelpDesk/Login", "Login/help.html"}, // Help URL for login.
{"Desc/HelpDesk/Login", "Press F1 for help."}, // Description for login.
{"Help/HelpDesk/Login/OKButton", "Login/OKButton/help.html"},// URL Help for login OK button.
{"Tip/HelpDesk/Login/OKButton", "Press OK to login." }, // Tool tip for login OK button.
{"Desc/HelpDesk/Login/OKButton", "This is Description11" } // Descriptoin for login OK button.
// END OF MATERIAL TO LOCALIZE
}; // Object[][] contents
} // class HelpURLMap
Supported API: true
Extendable: false
Field Summary | |
static String |
APPLET_CONTEXT
Property name for HelpSystem attribute name. |
static String |
CONTENTS_KEY
Prefix for identifying contents urls. |
static String |
CONTENTS_URL
Property name for HelpSystem attribute name. |
static String |
DESCRIPTION_KEY
Prefix for identifying description text. |
static String |
DOCUMENT_BASE
Property name for HelpSystem attribute name. |
static String |
HELP_KEY
Prefix for identifying help urls. |
static String |
HELP_URL
Property name for HelpSystem attribute name. |
static String |
KEY_DELIMITER
Delimiter for resource keys. |
static String |
MISSING_RESOURCE
String displayed when a resource is not found. |
static String |
NAME
Property name for HelpSystem attribute name. |
static String |
RESOURCES
Property name for HelpSystem attribute name. |
static String |
SHOW_IN_CURRENT_FRAME
Final value which indicates that help should be shown in the current frame. |
static String |
SHOW_IN_PARENT_FRAME
Final value which indicates that help should be shown in the parent frame. |
static String |
SHOW_IN_SEPARATE_FRAME
Final value which indicates that help should be shown in a separate unnamed frame. |
static String |
SHOW_IN_TOP_FRAME
Final value which indicates that help should be shown in the top frame. |
static String |
TIP_KEY
Prefix for identifying tool tip text. |
static String |
WHERE_TO_SHOW_DOCUMENT
Property name for HelpSystem attribute name. |
Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add property change listener. |
AppletContext |
getAppletContext()
Get the applet context for this HelpSystem. |
String |
getContentsURL()
The current help contents help URL. |
URL |
getDocumentBase()
Get the base url used to show help urls. |
String |
getHelpURL()
The current help url. |
String |
getName()
Get the HelpSystem name. |
ResourceBundle |
getResources()
Get the resource bundle for help. |
String |
getToolDescription(String contextId,
String toolId)
The tool description for the component over which the mouse is positioned. |
String |
getToolTipText(String contextId,
String toolId)
The tool tip for the component over which the mouse is positioned. |
String |
getWhereToShowDocument()
Get String used to indicate whether help URLs should be displayed in the current frame, the parent frame, top frame or a separate frame. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove property change listener. |
void |
setAppletContext(AppletContext newValue)
Set the applet context for this HelpSystem. |
void |
setDocumentBase(URL documentBase)
Set the base url used to show help urls. |
void |
setName(String newValue)
Set the HelpSystem name. |
void |
setResources(ResourceBundle resourceBundle)
Set the resource bundle for help. |
void |
setWhereToShowDocument(String where)
Set String used to indicate which frame help should be displayed in. |
void |
showContents(String contextId)
Show help contents for the context id. |
void |
showFind(String contextId)
|
void |
showFind(String contextId,
String keyword)
|
void |
showHelp(String contextId)
Show help for the context id. |
void |
showHelp(String contextId,
String topicId)
Show help contents for the context id and topic id. |
Field Detail |
public static final String NAME
public static final String APPLET_CONTEXT
public static final String DOCUMENT_BASE
public static final String WHERE_TO_SHOW_DOCUMENT
public static final String RESOURCES
public static final String CONTENTS_URL
public static final String HELP_URL
public static final String MISSING_RESOURCE
public static final String KEY_DELIMITER
public static final String CONTENTS_KEY
public static final String HELP_KEY
public static final String TIP_KEY
public static final String DESCRIPTION_KEY
public static final String SHOW_IN_CURRENT_FRAME
public static final String SHOW_IN_PARENT_FRAME
public static final String SHOW_IN_TOP_FRAME
public static final String SHOW_IN_SEPARATE_FRAME
Method Detail |
public String getName()
public void setName(String newValue) throws PropertyVetoException
newValue
- the new name.
PropertyVetoException
- if the new value is invalid.public AppletContext getAppletContext()
public void setAppletContext(AppletContext newValue) throws PropertyVetoException
newValue
- the new AppletContext.
PropertyVetoException
- if the new value is invalid.public URL getDocumentBase()
public void setDocumentBase(URL documentBase) throws PropertyVetoException
documentBase
- the new value of the document.
PropertyVetoException
- if the new value is invalid.public String getWhereToShowDocument()
AppletContext
public void setWhereToShowDocument(String where) throws PropertyVetoException
where
- The frame for displaying help, e.g. HelpSystem.SHOW_IN_CURRENT_FRAME.
PropertyVetoException
- if the where value is invalid.AppletContext
public ResourceBundle getResources()
public void setResources(ResourceBundle resourceBundle) throws PropertyVetoException
resourceBundle
- the localized help ResourceBundle.
PropertyVetoException
- if the resourceBundle is invalid.public String getContentsURL()
public String getHelpURL()
public String getToolTipText(String contextId, String toolId)
contextId
- the sub-key for the context.toolId
- the sub-key for the tool.
public String getToolDescription(String contextId, String toolId)
contextId
- the sub-key for the context.toolId
- the sub-key for the tool.
public void showContents(String contextId)
contextId
- the context help sub-key.public void showHelp(String contextId)
contextId
- the context help sub-key.public void showHelp(String contextId, String topicId)
contextId
- the context help sub-key.topicId
- the topic help sub-key.public void showFind(String contextId)
public void showFind(String contextId, String keyword)
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- the new listener.public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- the listener to be removed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |