Class MenuButton

  • All Implemented Interfaces:
    ConstrainedVisual, Visual

    @DefaultProperty("menu")
    public class MenuButton
    extends Button
    Component that allows a user to select one of several menu options. The options are hidden until the user pushes the button.

    The repeatable flag is used to trigger "split button" behavior. When true, the button reflects the selected value and allows a user to repeatedly press the left half of the button, firing additional menu selection events for the selected item. Pressing the right half of the button continues to fire button press events and display the menu.

    • Constructor Detail

      • MenuButton

        public MenuButton()
    • Method Detail

      • setSkin

        protected void setSkin​(Skin skin)
        Description copied from class: Component
        Sets the skin, replacing any previous skin.
        Overrides:
        setSkin in class Component
        Parameters:
        skin - The new skin.
      • getListPopup

        public Window getListPopup()
        Returns:
        the popup window associated with this components skin
      • setToggleButton

        @UnsupportedOperation
        public void setToggleButton​(boolean toggleButton)
        Description copied from class: Button
        Sets the button's toggle state.
        Overrides:
        setToggleButton in class Button
        Parameters:
        toggleButton - Whether or not this should be a toggle button.
      • getMenu

        public Menu getMenu()
      • setMenu

        public void setMenu​(Menu menu)