Class HelpSupporterUtils


  • public class HelpSupporterUtils
    extends Object
    Utility functions for dealing with HelpSupporter objects.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • HelpSupporterUtils

        public HelpSupporterUtils()
    • Method Detail

      • locate

        protected static HelpSupporter locate​(Object obj)
        Locates the first help supporter in the property tree.
        Parameters:
        obj - the object to traverse
        Returns:
        the helper supporter, if any
      • clearHelp

        public static void clearHelp​(Object obj)
        Clears any help information.
        Parameters:
        obj - traverses the
      • hasHelp

        public static boolean hasHelp​(Object obj)
        Returns whether any help information is available.
        Returns:
        true if help available
      • setHelp

        public static void setHelp​(Object obj,
                                   String help,
                                   boolean isHtml)
        Sets the help information to offer.
        Parameters:
        help - the help
        isHtml - whether html or plain text
      • getHelp

        public static String getHelp​(Object obj)
        Returns the help information if any.
        Returns:
        the help information
      • isHelpHtml

        public static boolean isHelpHtml​(Object obj)
        Returns whether the help is html or plain text.
        Returns:
        true if supporter available and help is html
      • showHelp

        public static void showHelp​(Object obj)
        Displays the help.