Class WidgetMenuOption


  • public final class WidgetMenuOption
    extends Object
    • Constructor Detail

      • WidgetMenuOption

        @Deprecated
        public WidgetMenuOption​(String menuOption,
                                String menuTarget,
                                WidgetInfo widget)
        Deprecated.
        Creates a menu to be added to right click menus. The menu will only be added if match is found within the menu options
        Parameters:
        menuOption - Option text of this right click option
        menuTarget - Target text of this right click option
        widget - The widget to attach this option to
      • WidgetMenuOption

        public WidgetMenuOption​(String menuOption,
                                String menuTarget,
                                int widgetId)
        Creates a menu to be added to right click menus. The menu will only be added if match is found within the menu options
        Parameters:
        menuOption - Option text of this right click option
        menuTarget - Target text of this right click option
        widgetId - The widget to attach this option to
    • Method Detail

      • setMenuTarget

        public void setMenuTarget​(String target)
        Sets the target of the menu option. Color code will be added on to target
        Parameters:
        target - The target text without color code.
      • getMenuOption

        public String getMenuOption()
        The left hand text to be displayed on the menu option. (ex. the menuOption of "Drop Bones" is "Drop")
      • setMenuOption

        public void setMenuOption​(String menuOption)
        The left hand text to be displayed on the menu option. (ex. the menuOption of "Drop Bones" is "Drop")
      • getMenuTarget

        public String getMenuTarget()
        The right hand text to be displayed on the menu option. (ex. the menuTarget of "Drop Bones" is "Bones")
      • getColor

        public Color getColor()
        The color that the menuTarget should be. Defaults to the brownish color that most menu options have.
      • setColor

        public void setColor​(Color color)
        The color that the menuTarget should be. Defaults to the brownish color that most menu options have.
      • getWidget

        @Nullable
        public WidgetInfo getWidget()
        The widgetinfo to add the option to, if available
      • getWidgetId

        public int getWidgetId()
        The widget to add the option to