Module is.codion.swing.common.ui
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.
-
Field Summary
Fields inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
TRANSFER_FOCUS_ON_ENTER
-
Method Summary
Modifier and TypeMethodDescriptionbuttonBuilder
(Consumer<ButtonBuilder<?, ?, ?>> buttonBuilder) Provides a way to configure theButtonBuilder
used by thisControlPanelBuilder
.buttonsFocusable
(boolean buttonsFocusable) checkBoxBuilder
(Consumer<CheckBoxBuilder> checkBoxBuilder) Provides a way to configure theCheckBoxBuilder
used by thisControlPanelBuilder
.Adds all actions from the givenControls
instanceincludeButtonText
(boolean includeButtonText) orientation
(int orientation) preferredButtonSize
(Dimension preferredButtonSize) radioButtonBuilder
(Consumer<RadioButtonBuilder> radioButtonBuilder) Provides a way to configure theRadioButtonBuilder
used by thisControlPanelBuilder
.Adds a separatortoggleButtonBuilder
(Consumer<ToggleButtonBuilder<?, ?>> toggleButtonBuilder) Provides a way to configure theToggleButtonBuilder
used by thisControlPanelBuilder
.toggleButtonType
(ToggleButtonType toggleButtonType) Specifies how toggle controls are presented on this control panel.Methods inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
background, border, build, build, buildValue, clear, clientProperty, componentListener, componentOrientation, enabled, enabled, focusable, focusCycleRoot, focusListener, font, foreground, initialValue, keyEvent, keyListener, label, linkedValue, linkedValue, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, onBuild, onSetVisible, opaque, popupMenu, popupMenuControl, popupMenuControls, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, toolTipText, transferFocusOnEnter, transferHandler, validator, visible
-
Method Details
-
orientation
- Parameters:
orientation
- the panel orientation, defaultSwingConstants.HORIZONTAL
- Returns:
- this builder instance
-
action
- Parameters:
action
- the action to add- Returns:
- this builder instance
-
controls
Adds all actions from the givenControls
instance- Parameters:
controls
- the Controls instance- Returns:
- this builder instance
-
separator
B separator()Adds a separator- Returns:
- this builder instance
-
includeButtonText
- Parameters:
includeButtonText
- true if buttons should include text- Returns:
- this builder instance
-
preferredButtonSize
- Parameters:
preferredButtonSize
- the preferred button size- Returns:
- this builder instance
-
buttonsFocusable
- Parameters:
buttonsFocusable
- whether the buttons should be focusable, default istrue
- Returns:
- this builder instance
-
toggleButtonType
Specifies how toggle controls are presented on this control panel. The default isToggleButtonType.BUTTON
.- Parameters:
toggleButtonType
- the toggle button type- Returns:
- this builder instance
-
buttonBuilder
Provides a way to configure theButtonBuilder
used by thisControlPanelBuilder
.- Parameters:
buttonBuilder
- provides the button builder used to create buttons- Returns:
- this builder instance
-
toggleButtonBuilder
Provides a way to configure theToggleButtonBuilder
used by thisControlPanelBuilder
.- Parameters:
toggleButtonBuilder
- provides the toggle button builder used to create toggle buttons- Returns:
- this builder instance
-
checkBoxBuilder
Provides a way to configure theCheckBoxBuilder
used by thisControlPanelBuilder
.- Parameters:
checkBoxBuilder
- provides the toggle button builder used to create check boxes- Returns:
- this builder instance
-
radioButtonBuilder
Provides a way to configure theRadioButtonBuilder
used by thisControlPanelBuilder
.- Parameters:
radioButtonBuilder
- provides the toggle button builder used to create radio buttons- Returns:
- this builder instance
-