Interface ControlPanelBuilder<C extends JComponent,B extends ControlPanelBuilder<C,B>>

All Superinterfaces:
ComponentBuilder<Void,C,B>
All Known Subinterfaces:
ButtonPanelBuilder, ToolBarBuilder

public interface ControlPanelBuilder<C extends JComponent,B extends ControlPanelBuilder<C,B>> extends ComponentBuilder<Void,C,B>
Builds panels with controls.
  • Method Details

    • orientation

      B orientation(int orientation)
      Parameters:
      orientation - the panel orientation, default SwingConstants.HORIZONTAL
      Returns:
      this builder instance
    • action

      B action(Action action)
      Parameters:
      action - the action to add
      Returns:
      this builder instance
    • controls

      B controls(Controls controls)
      Adds all actions from the given Controls instance
      Parameters:
      controls - the Controls instance
      Returns:
      this builder instance
    • separator

      B separator()
      Adds a separator
      Returns:
      this builder instance
    • includeButtonText

      B includeButtonText(boolean includeButtonText)
      Parameters:
      includeButtonText - true if buttons should include text
      Returns:
      this builder instance
    • preferredButtonSize

      B preferredButtonSize(Dimension preferredButtonSize)
      Parameters:
      preferredButtonSize - the preferred button size
      Returns:
      this builder instance
    • buttonsFocusable

      B buttonsFocusable(boolean buttonsFocusable)
      Parameters:
      buttonsFocusable - whether the buttons should be focusable, default is true
      Returns:
      this builder instance
    • toggleButtonType

      B toggleButtonType(ToggleButtonType toggleButtonType)
      Specifies how toggle controls are presented on this control panel. The default is ToggleButtonType.BUTTON.
      Parameters:
      toggleButtonType - the toggle button type
      Returns:
      this builder instance
    • buttonBuilder

      B buttonBuilder(Consumer<ButtonBuilder<?,?,?>> buttonBuilder)
      Provides a way to configure the ButtonBuilder used by this ControlPanelBuilder.
      Parameters:
      buttonBuilder - provides the button builder used to create buttons
      Returns:
      this builder instance
    • toggleButtonBuilder

      B toggleButtonBuilder(Consumer<ToggleButtonBuilder<?,?>> toggleButtonBuilder)
      Provides a way to configure the ToggleButtonBuilder used by this ControlPanelBuilder.
      Parameters:
      toggleButtonBuilder - provides the toggle button builder used to create toggle buttons
      Returns:
      this builder instance
    • checkBoxBuilder

      B checkBoxBuilder(Consumer<CheckBoxBuilder> checkBoxBuilder)
      Provides a way to configure the CheckBoxBuilder used by this ControlPanelBuilder.
      Parameters:
      checkBoxBuilder - provides the toggle button builder used to create check boxes
      Returns:
      this builder instance
    • radioButtonBuilder

      B radioButtonBuilder(Consumer<RadioButtonBuilder> radioButtonBuilder)
      Provides a way to configure the RadioButtonBuilder used by this ControlPanelBuilder.
      Parameters:
      radioButtonBuilder - provides the toggle button builder used to create radio buttons
      Returns:
      this builder instance