Interface Controls

All Superinterfaces:
Action, ActionListener, Control, EventListener

public interface Controls extends Control
A collection of controls and separators, note that these can be nested controls.
  • Field Details

  • Method Details

    • actions

      List<Action> actions()
      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
    • empty

      boolean empty()
      Returns:
      true if this controls instance contains no controls (ignoring separators)
    • notEmpty

      boolean notEmpty()
      Returns:
      true if this controls instance contains controls (ignoring separators)
    • 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
    • controls

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

      static Controls controls(Action... actions)
      Constructs a new Controls instance.
      Parameters:
      actions - the actions
      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