Class HelpBrowser

    • Constructor Detail

      • HelpBrowser

        public HelpBrowser()
        Constructs a new HelpBrowser.
    • Method Detail

      • getInstance

        public static HelpBrowser getInstance()
        Replies the unique instance of the help browser
        Returns:
        the unique instance of the help browser
      • setUrlForHelpTopic

        public static void setUrlForHelpTopic​(String helpTopic)
        Show the help page for help topic helpTopic.
        Parameters:
        helpTopic - the help topic
      • buildStyleSheet

        protected StyleSheet buildStyleSheet()
        Builds the style sheet used in the internal help browser
        Returns:
        the style sheet
      • build

        protected final void build()
        Builds GUI.
      • loadTopic

        protected void loadTopic​(String content)
        Load help topic.
        Parameters:
        content - topic contents
      • handleMissingHelpContent

        protected void handleMissingHelpContent​(String relativeHelpTopic)
        Displays a warning page when a help topic doesn't exist yet.
        Parameters:
        relativeHelpTopic - the help topic
      • loadRelativeHelpTopic

        protected void loadRelativeHelpTopic​(String relativeHelpTopic)
        Loads a help topic given by a relative help topic name (i.e. "/Action/New") First tries to load the language specific help topic. If it is missing, tries to load the topic in English.
        Parameters:
        relativeHelpTopic - the relative help topic
      • loadAbsoluteHelpTopic

        protected void loadAbsoluteHelpTopic​(String absoluteHelpTopic)
        Loads a help topic given by an absolute help topic name, i.e. "/De:Help/Action/New"
        Parameters:
        absoluteHelpTopic - the absolute help topic name
      • openUrl

        public void openUrl​(String url)
        Description copied from interface: IHelpBrowser
        Opens an URL and displays the content. If the URL is the locator of an absolute help topic, help content is loaded from the JOSM wiki. Otherwise, the help browser loads the page from the given URL.
        Specified by:
        openUrl in interface IHelpBrowser
        Parameters:
        url - the url
      • openHelpTopic

        public void openHelpTopic​(String relativeHelpTopic)
        Description copied from interface: IHelpBrowser
        Loads and displays the help information for a help topic given by a relative help topic name, i.e. "/Action/New".
        Specified by:
        openHelpTopic in interface IHelpBrowser
        Parameters:
        relativeHelpTopic - the relative help topic