Module is.codion.swing.common.ui
Interface ButtonPanelBuilder
- All Superinterfaces:
ComponentBuilder<JPanel,,ButtonPanelBuilder> ControlPanelBuilder<JPanel,,ButtonPanelBuilder> Supplier<JPanel>
Builds a JPanel with buttons, in a row or a column.
The buttons are stretched across the panel, and share any extra space along it.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumSpecifies how separators are presented in a button panel. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyValue<ButtonPanelBuilder.Separator> Specifies how separators are presented in button panels by default. -
Method Summary
Modifier and TypeMethodDescriptionstatic ButtonPanelBuilderbuilder()buttonGap(int buttonGap) Default isLayouts.GAP.buttonGroup(@Nullable ButtonGroup buttonGroup) Note that components added viaControlPanelBuilder.add(javax.swing.JComponent)are not added to the button group.fixedButtonSize(boolean fixedButtonSize) Specifies whether the buttons are all sized like the largest one, or each by its own preferred size.separators(ButtonPanelBuilder.Separator separators) Specifies how separators are presented, the space on each side of them beingLayouts.GAP, in addition to the button gap.Methods inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
ancestorListener, background, border, build, build, clientProperty, componentListener, componentOrientation, enabled, enabled, focusable, focusable, focusCycleRoot, focusListener, font, font, foreground, get, hierarchyListener, keyEvent, keyListener, label, label, label, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, name, onBuild, onSetVisible, opaque, popupControl, popupControls, popupControls, popupMenu, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, toolTipText, toolTipText, transferFocusOnEnter, transferFocusOnEnter, transferHandler, visible, visibleMethods inherited from interface is.codion.swing.common.ui.component.button.ControlPanelBuilder
action, add, add, buttons, buttonsFocusable, checkBoxes, control, control, controls, controls, includeButtonText, orientation, preferredButtonSize, radioButtons, separator, toggleButtons, toggleButtonType
-
Field Details
-
SEPARATORS
Specifies how separators are presented in button panels by default.- Value type:
ButtonPanelBuilder.Separator - Default value:
ButtonPanelBuilder.Separator.LINE
- See Also:
- Value type:
-
-
Method Details
-
buttonGap
Default isLayouts.GAP.- Parameters:
buttonGap- the gap between buttons in pixels- Returns:
- this builder instance
-
fixedButtonSize
Specifies whether the buttons are all sized like the largest one, or each by its own preferred size. Separators and nested controls keep their own size either way. Default true.- Parameters:
fixedButtonSize- true if the buttons should all be sized like the largest one- Returns:
- this builder instance
-
separators
Specifies how separators are presented, the space on each side of them beingLayouts.GAP, in addition to the button gap. DefaultSEPARATORS.- Parameters:
separators- the separator presentation- Returns:
- this builder instance
-
buttonGroup
Note that components added viaControlPanelBuilder.add(javax.swing.JComponent)are not added to the button group.- Parameters:
buttonGroup- the button group to add the buttons based on the controls to- Returns:
- this builder instance
-
builder
- Returns:
- a new button panel builder
-