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.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface is.codion.swing.common.ui.component.text.TextComponentBuilder
TextComponentBuilder.CaretPosition
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyValue
<Boolean> Specifies whether text fields should select all on focus gained by default.Fields inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
COMPONENT_VALUE
-
Method Summary
Modifier and TypeMethodDescriptionNote that this disablesComponentBuilder.transferFocusOnEnter(boolean)
.actionListener
(ActionListener actionListener) Note that this disablesComponentBuilder.transferFocusOnEnter(boolean)
.builder()
columns
(int columns) Associates the given format with the text field.horizontalAlignment
(int horizontalAlignment) Methods inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
background, border, build, build, buildValue, buildValue, clientProperty, componentListener, componentOrientation, consumer, enabled, enabled, focusable, focusCycleRoot, focusListener, font, foreground, keyEvent, keyListener, label, link, link, listener, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, modifiedIndicator, modifiedIndicatorFactory, mouseListener, mouseMotionListener, mouseWheelListener, name, onBuild, onBuildValue, onSetVisible, opaque, popupMenu, popupMenuControl, popupMenuControls, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, toolTipText, toolTipText, transferFocusOnEnter, transferFocusOnEnter, transferHandler, validator, validIndicator, validIndicator, validIndicatorFactory, value, visible
Methods inherited from interface is.codion.swing.common.ui.component.text.TextComponentBuilder
caretListener, caretPosition, caretUpdatePolicy, controlDeleteWord, disabledTextColor, dragEnabled, editable, focusAccelerator, lowerCase, margin, maximumLength, moveCaretToEndOnFocusGained, moveCaretToStartOnFocusGained, onTextChanged, selectAllOnFocusGained, selectedTextColor, selectionColor, updateOn, upperCase
-
Field Details
-
SELECT_ALL_ON_FOCUS_GAINED
Specifies whether text fields should select all on focus gained by default.- Value type:Boolean
- Default value: false
-
-
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:
-
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:
-
hint
- Parameters:
hint
- the hint to display when the field is empty and unfocused- Returns:
- this builder instance
-
builder
- Returns:
- a
TextFieldBuilder.ValueClassBuilder
-