com.jstatcom.component
Class JHelpContextMgr
- java.lang.Object
-
- com.jstatcom.component.JHelpContextMgr
-
public final class JHelpContextMgr extends java.lang.ObjectManages the mapping between IDs for context sensitive help topics and the respective components. The mapping is stored in an XML filehelp_context.xml. Components that should use context sensitive help must register with theJHelpContextMgr. This class is used to maintain all help IDs in a single place that can be edited without changing the code. Components are identified via their classname.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classJHelpContextMgr.ContextIDInner class for storing mappings as XML elements.
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringhelpIDFilestatic XmlFormat<JHelpContextMgr>JHelpContextMgr_XMLXML format field for (de)serialization.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.Iterator<java.lang.String>compNames()Gets an itertor of all available keys.java.lang.StringgetID(java.lang.Object key)Gets the ID according to the component name.static voidregister(java.awt.Component comp)Retrieves the helpID from the stored map forcompaccording to the classname of thatComponentand sets the helpID for context sensitive help.
-
-
-
Field Detail
-
helpIDFile
public static final java.lang.String helpIDFile
- See Also:
- Constant Field Values
-
JHelpContextMgr_XML
public static final XmlFormat<JHelpContextMgr> JHelpContextMgr_XML
XML format field for (de)serialization.
-
-
Method Detail
-
register
public static void register(java.awt.Component comp)
Retrieves the helpID from the stored map forcompaccording to the classname of thatComponentand sets the helpID for context sensitive help.- Parameters:
comp- the component to set the stored helpID for- Throws:
java.lang.IllegalArgumentException-if (comp == null)
-
compNames
public java.util.Iterator<java.lang.String> compNames()
Gets an itertor of all available keys.- Returns:
- the names of the components that are currently mapped
-
getID
public java.lang.String getID(java.lang.Object key)
Gets the ID according to the component name.- Parameters:
key- the name of a component- Returns:
- the mapped helpID
-
-
DMelt 3.0 © DataMelt by jWork.ORG