public final class HelpUtil extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
private |
HelpUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
buildAbsoluteHelpTopic(java.lang.String topic,
LanguageInfo.LocaleType type)
Replies the absolute, localized help topic for the given topic.
|
static java.lang.String |
extractAbsoluteHelpTopic(java.lang.String url)
Extracts the absolute help topic from an URL.
|
static java.lang.String |
extractRelativeHelpTopic(java.lang.String url)
Extracts the relative help topic from an URL.
|
static java.lang.String |
getContextSpecificHelpTopic(java.lang.Object context)
Replies the context specific help topic configured for
context. |
private static javax.swing.Action |
getHelpAction()
Replies the global help action, if available.
|
static java.lang.String |
getHelpTopicEditUrl(java.lang.String absoluteHelpTopic)
Replies the URL to the edit page for the absolute help topic.
|
private static java.lang.String |
getHelpTopicPrefix(LanguageInfo.LocaleType type)
Replies the help topic prefix for the given locale.
|
static java.lang.String |
getHelpTopicUrl(java.lang.String absoluteHelpTopic)
Replies the URL on the wiki for an absolute help topic.
|
static java.lang.String |
getWikiBaseHelpUrl()
Replies the base wiki URL for help pages
|
static java.lang.String |
getWikiBaseUrl()
Replies the base wiki URL.
|
static java.lang.String |
ht(java.lang.String helpTopic)
This is a simple marker method for help topic literals.
|
static void |
setHelpContext(javax.swing.JComponent component,
java.lang.String relativeHelpTopic)
Makes a component aware of context sensitive help.
|
private HelpUtil()
public static java.lang.String getWikiBaseUrl()
public static java.lang.String getWikiBaseHelpUrl()
public static java.lang.String getHelpTopicUrl(java.lang.String absoluteHelpTopic)
absoluteHelpTopic - the absolute help topicbuildAbsoluteHelpTopic(java.lang.String, org.openstreetmap.josm.tools.LanguageInfo.LocaleType)public static java.lang.String getHelpTopicEditUrl(java.lang.String absoluteHelpTopic)
absoluteHelpTopic - the absolute help topicpublic static java.lang.String extractRelativeHelpTopic(java.lang.String url)
url - the urlpublic static java.lang.String extractAbsoluteHelpTopic(java.lang.String url)
url - the urlprivate static java.lang.String getHelpTopicPrefix(LanguageInfo.LocaleType type)
type - the type of the locale to usepublic static java.lang.String buildAbsoluteHelpTopic(java.lang.String topic, LanguageInfo.LocaleType type)
topic - the relative help topic. Home help topic assumed, if null.type - the locale. Locale.ENGLISH assumed, if null.public static java.lang.String getContextSpecificHelpTopic(java.lang.Object context)
context.context - The UI object used as contextprivate static javax.swing.Action getHelpAction()
HelpAction.public static void setHelpContext(javax.swing.JComponent component, java.lang.String relativeHelpTopic)
component - the componentrelativeHelpTopic - the help topic. Set to the default help topic if null.public static java.lang.String ht(java.lang.String helpTopic)
String helpTopic = ht("/Dialog/RelationEditor");
or
putValue("help", ht("/Dialog/RelationEditor"));
helpTopic - Help topic to markhelpTopic