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