Interface Controls

    • Method Detail

      • getActions

        List<Action> getActions()
        Returns:
        an unmodifiable view of the actions in this set
      • add

        Controls add​(Action action)
        Adds the given action to this Controls instance, adding a null action has the same effect as addSeparator()
        Parameters:
        action - the action to add
        Returns:
        this Controls instance
      • addAt

        Controls addAt​(int index,
                       Action action)
        Adds the given action to this Controls instance at the specified index, adding a null action has the same effect as addSeparator()
        Parameters:
        index - the index
        action - the action to add at the specified index
        Returns:
        this Controls instance
      • remove

        Controls remove​(Action action)
        Parameters:
        action - the action to remove
        Returns:
        this Controls instance
      • removeAll

        Controls removeAll()
        Removes all actions from this controls instance
        Returns:
        this Controls instance
      • size

        int size()
        Returns:
        the number of controls in this controls instance
      • isEmpty

        boolean isEmpty()
        Returns:
        true if this controls instance contains no controls
      • get

        Action get​(int index)
        Parameters:
        index - the index
        Returns:
        the action at the given index
      • add

        Controls add​(Controls controls)
        Parameters:
        controls - the controls to add
        Returns:
        this Control instance
      • addAt

        Controls addAt​(int index,
                       Controls controls)
        Parameters:
        index - the index
        controls - the controls to add at the specified index
        Returns:
        this Controls instance
      • addSeparator

        Controls addSeparator()
        Adds a separator to the end of this controls instance
        Returns:
        this Controls instance
      • addSeparatorAt

        Controls addSeparatorAt​(int index)
        Adds a separator at the given index
        Parameters:
        index - the index
        Returns:
        this Controls instance
      • addAll

        Controls addAll​(Controls controls)
        Adds all actions found in controls to this controls instance
        Parameters:
        controls - the source list
        Returns:
        this Controls instance
      • createVerticalButtonPanel

        JPanel createVerticalButtonPanel()
        Creates a vertically laid out panel of buttons from this controls instance
        Returns:
        the button panel
      • createHorizontalButtonPanel

        JPanel createHorizontalButtonPanel()
        Creates a horizontally laid out panel of buttons from this controls instance
        Returns:
        the button panel
      • createVerticalToolBar

        JToolBar createVerticalToolBar()
        Creates a JToolBar populated with these controls.
        Returns:
        a toolbar based on these controls
      • createHorizontalToolBar

        JToolBar createHorizontalToolBar()
        Creates a JToolBar populated with these controls.
        Returns:
        a toolbar based on these controls
      • createPopupMenu

        JPopupMenu createPopupMenu()
        Creates a popup menu from this controls instance
        Returns:
        a popup menu based on this controls instance
      • createMenu

        JMenu createMenu()
        Creates a menu from this controls instance
        Returns:
        a menu based on this controls instance
      • createMenuBar

        JMenuBar createMenuBar()
        Returns:
        a menu bar based on the controls instances contained in this controls instance
      • controls

        static Controls controls()
        Constructs a new Controls instance.
        Returns:
        a new Controls instance.
      • controls

        static Controls controls​(Control... controls)
        Constructs a new Controls instance.
        Parameters:
        controls - the controls
        Returns:
        a new Controls instance.
      • builder

        static Controls.Builder builder()
        Returns:
        a new Controls.Builder instance