Module is.codion.swing.common.ui
Interface TextFieldBuilder<T,C extends JTextField,B extends TextFieldBuilder<T,C,B>>
- Type Parameters:
T
- the type the text field representsC
- the text field typeB
- the builder type
- All Superinterfaces:
ComponentBuilder<T,
,C, B> TextComponentBuilder<T,
C, B>
- All Known Subinterfaces:
NumberField.Builder<T>
,PasswordFieldBuilder
,TemporalField.Builder<T>
public interface TextFieldBuilder<T,C extends JTextField,B extends TextFieldBuilder<T,C,B>>
extends TextComponentBuilder<T,C,B>
Builds a JTextField.
-
Field Summary
Fields inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
TRANSFER_FOCUS_ON_ENTER
-
Method Summary
Modifier and TypeMethodDescriptionNote that this disablesComponentBuilder.transferFocusOnEnter(boolean)
.actionListener
(ActionListener actionListener) Note that this disablesComponentBuilder.transferFocusOnEnter(boolean)
.static <T,
C extends JTextField, B extends TextFieldBuilder<T, C, B>>
TextFieldBuilder<T,C, B> static <T,
C extends JTextField, B extends TextFieldBuilder<T, C, B>>
TextFieldBuilder<T,C, B> columns
(int columns) Associates the given format with the text field.horizontalAlignment
(int horizontalAlignment) selector
(SelectionDialogBuilder.SingleSelector<T> selector) Adds a CTRL-SPACE action the given text field allowing the user to select a value to display in the fieldMethods 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
Methods inherited from interface is.codion.swing.common.ui.component.text.TextComponentBuilder
caretListener, controlDeleteWord, disabledTextColor, dragEnabled, editable, focusAccelerator, lowerCase, margin, maximumLength, moveCaretToEndOnFocusGained, moveCaretToStartOnFocusGained, onTextChanged, selectAllOnFocusGained, selectedTextColor, selectionColor, updateOn, upperCase
-
Method Details
-
columns
- Parameters:
columns
- the number of colums in the text component- Returns:
- this builder instance
- See Also:
-
action
Note that this disablesComponentBuilder.transferFocusOnEnter(boolean)
.- Parameters:
action
- the action to associate with the text field- Returns:
- this builder instance
- See Also:
-
actionListener
Note that this disablesComponentBuilder.transferFocusOnEnter(boolean)
.- Parameters:
actionListener
- the action listener- Returns:
- this builder instance
- See Also:
-
selector
Adds a CTRL-SPACE action the given text field allowing the user to select a value to display in the field- Parameters:
selector
- the selector providing the values to select from- Returns:
- this builder instance
-
format
Associates the given format with the text field. Note that the format instance is cloned on build, so format instances can be reused when calling this method.- Parameters:
format
- the format- Returns:
- this builder instance
-
horizontalAlignment
- Parameters:
horizontalAlignment
- the horizontal text alignment- Returns:
- this builder instance
- See Also:
-
hintText
- Parameters:
hintText
- the hint text to display when the field is empty and unfocused- Returns:
- this builder instance
-
builder
static <T,C extends JTextField, TextFieldBuilder<T,B extends TextFieldBuilder<T, C, B>> C, builderB> (Class<T> valueClass) - Type Parameters:
T
- the value typeC
- the text field typeB
- the builder type- Parameters:
valueClass
- the value class- Returns:
- a builder for a component
-
builder
static <T,C extends JTextField, TextFieldBuilder<T,B extends TextFieldBuilder<T, C, B>> C, builderB> (Class<T> valueClass, Value<T> linkedValue) - Type Parameters:
T
- the value typeC
- the text field typeB
- the builder type- Parameters:
valueClass
- the value classlinkedValue
- the value to link to the component- Returns:
- a builder for a component
-