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 theButtonBuilderused by thisControlPanelBuilder.buttonsFocusable(boolean buttonsFocusable) checkBoxBuilder(Consumer<CheckBoxBuilder> checkBoxBuilder) Provides a way to configure theCheckBoxBuilderused by thisControlPanelBuilder.Adds all actions from the givenControlsinstanceincludeButtonText(boolean includeButtonText) orientation(int orientation) preferredButtonSize(Dimension preferredButtonSize) radioButtonBuilder(Consumer<RadioButtonBuilder> radioButtonBuilder) Provides a way to configure theRadioButtonBuilderused by thisControlPanelBuilder.Adds a separatortoggleButtonBuilder(Consumer<ToggleButtonBuilder<?, ?>> toggleButtonBuilder) Provides a way to configure theToggleButtonBuilderused 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, consumer, enabled, enabled, focusable, focusCycleRoot, focusListener, font, foreground, initialValue, keyEvent, keyListener, label, link, link, listener, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, onBuild, onBuildValue, 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 givenControlsinstance- 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 theButtonBuilderused by thisControlPanelBuilder.- Parameters:
buttonBuilder- provides the button builder used to create buttons- Returns:
- this builder instance
-
toggleButtonBuilder
Provides a way to configure theToggleButtonBuilderused by thisControlPanelBuilder.- Parameters:
toggleButtonBuilder- provides the toggle button builder used to create toggle buttons- Returns:
- this builder instance
-
checkBoxBuilder
Provides a way to configure theCheckBoxBuilderused by thisControlPanelBuilder.- Parameters:
checkBoxBuilder- provides the toggle button builder used to create check boxes- Returns:
- this builder instance
-
radioButtonBuilder
Provides a way to configure theRadioButtonBuilderused by thisControlPanelBuilder.- Parameters:
radioButtonBuilder- provides the toggle button builder used to create radio buttons- Returns:
- this builder instance
-