Module is.codion.swing.common.ui
Interface InputPanelBuilder
- All Superinterfaces:
ComponentBuilder<JPanel,,InputPanelBuilder> Supplier<JPanel>
Builds an input panel with a label and input component.
The panel contains its label, so the label() methods below and the inherited
ComponentBuilder.label(String), ComponentBuilder.label(javax.swing.JLabel) and
ComponentBuilder.label(java.util.function.Consumer) all specify the same thing: the label the panel
displays. They differ only in what they accept, the ones here lifting the restriction to a JLabel.
The last call wins, whichever was used, so a label supplied by a factory - the caption based one the entity
components come with, say - is replaced by specifying another.
Note that the panel itself is therefore never the target of JLabel.setLabelFor(java.awt.Component):
a label carrying no association of its own is associated with the input component, which is what it labels.
-
Method Summary
Modifier and TypeMethodDescriptionstatic InputPanelBuilderbuilder()component(Supplier<? extends JComponent> component) component(JComponent component) label(Supplier<? extends JComponent> labelComponent) Specifies the label the panel displays, lifting theJLabelrestriction ofComponentBuilder.label(javax.swing.JLabel).label(JComponent labelComponent) Specifies the label the panel displays, lifting theJLabelrestriction ofComponentBuilder.label(javax.swing.JLabel).layout(InputPanelLayout layout) 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, visible
-
Method Details
-
label
Specifies the label the panel displays, lifting theJLabelrestriction ofComponentBuilder.label(javax.swing.JLabel). Overrides any previously specified label.- Parameters:
labelComponent- the label component- Returns:
- this builder instance
-
label
Specifies the label the panel displays, lifting theJLabelrestriction ofComponentBuilder.label(javax.swing.JLabel). Overrides any previously specified label.- Parameters:
labelComponent- the label component- Returns:
- this builder instance
-
component
- Parameters:
component- the input component- Returns:
- this builder instance
-
component
- Parameters:
component- the input component- Returns:
- this builder instance
-
layout
- Parameters:
layout- the input panel layout- Returns:
- this builder instance
-
builder
- Returns:
- a new
InputPanelBuilder
-