Class BaseFlatButtonWithDropDownMenu

    • Constructor Detail

      • BaseFlatButtonWithDropDownMenu

        public BaseFlatButtonWithDropDownMenu()
        Initializes the button. Uses the "arrow-head-down.png" icon.
      • BaseFlatButtonWithDropDownMenu

        public BaseFlatButtonWithDropDownMenu​(Icon icon)
        Initializes the button, using the specified icon.
        Parameters:
        icon - the icon for the button
      • BaseFlatButtonWithDropDownMenu

        public BaseFlatButtonWithDropDownMenu​(String text,
                                              Icon icon)
        Initializes the button, using the specified button text and icon.
        Parameters:
        text - the text for the button
        icon - the icon for the button
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
      • addToMenu

        public void addToMenu​(JMenuItem item)
        Adds the menu item for the dropdown menu.
        Parameters:
        item - the item to add
      • addToMenu

        public void addToMenu​(Action action)
        Adds the action for the dropdown menu.
        Parameters:
        action - the action to add
      • addSeparatorToMenu

        public void addSeparatorToMenu()
        Adds a separator to the dropdown menu.
      • setDropDownMenu

        public void setDropDownMenu​(JPopupMenu menu)
        Sets the menu to display.
        Parameters:
        menu - the menu to use
      • getDropDownMenu

        public JPopupMenu getDropDownMenu()
        Returns the menu to display.
        Returns:
        the menu to use, null if none set
      • showMenu

        protected void showMenu()
        Shows the menu.