Module is.codion.swing.common.ui
Interface MaskedTextFieldBuilder
- All Superinterfaces:
ComponentBuilder<String,
JFormattedTextField, MaskedTextFieldBuilder>
public interface MaskedTextFieldBuilder
extends ComponentBuilder<String,JFormattedTextField,MaskedTextFieldBuilder>
Builds a formatted text field.
-
Field Summary
Fields inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
COMPONENT_VALUE, TRANSFER_FOCUS_ON_ENTER
-
Method Summary
Modifier and TypeMethodDescriptionallowsInvalid
(boolean allowsInvalid) static MaskedTextFieldBuilder
builder()
static MaskedTextFieldBuilder
columns
(int columns) commitsOnValidEdit
(boolean commitsOnValidEdit) emptyStringToNullValue
(boolean emptyStringToNullValue) focusLostBehaviour
(int focusLostBehaviour) invalidCharacters
(String invalidCharacters) invalidStringToNullValue
(boolean invalidStringToNullValue) overwriteMode
(boolean overwriteMode) placeholder
(String placeholder) placeholderCharacter
(char placeholderCharacter) validCharacters
(String validCharacters) valueContainsLiteralCharacters
(boolean valueContainsLiteralCharacters) 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, mouseListener, mouseMotionListener, mouseWheelListener, onBuild, onBuildValue, onSetVisible, opaque, popupMenu, popupMenuControl, popupMenuControls, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, toolTipText, transferFocusOnEnter, transferHandler, validator, value, visible
-
Method Details
-
mask
- Parameters:
mask
- the format mask string- Returns:
- this builder instance
- See Also:
-
valueContainsLiteralCharacters
- Parameters:
valueContainsLiteralCharacters
- true if the value should contain literal characters- Returns:
- this builder instance
- See Also:
-
placeholder
- Parameters:
placeholder
- the placeholder- Returns:
- this builder instance
- See Also:
-
placeholderCharacter
- Parameters:
placeholderCharacter
- the placeholder character- Returns:
- this builder instance
- See Also:
-
allowsInvalid
- Parameters:
allowsInvalid
- true if this field should allow invalid values- Returns:
- this builder instance
- See Also:
-
commitsOnValidEdit
- Parameters:
commitsOnValidEdit
- true if value should be committed on valid edit- Returns:
- this builder instance
- See Also:
-
validCharacters
- Parameters:
validCharacters
- the valid characters- Returns:
- this builder instance
- See Also:
-
invalidCharacters
- Parameters:
invalidCharacters
- the invalid characters- Returns:
- this builder instance
- See Also:
-
overwriteMode
- Parameters:
overwriteMode
- true if new characters should overwrite existing characters- Returns:
- this builder instance
- See Also:
-
emptyStringToNullValue
- Parameters:
emptyStringToNullValue
- if true then an empty string translates to a null value- Returns:
- this builder instance
-
invalidStringToNullValue
- Parameters:
invalidStringToNullValue
- if true then an unparsable string translates to a null value- Returns:
- this builder instance
-
columns
- Parameters:
columns
- the number of colums in the text field- Returns:
- this builder instance
- See Also:
-
focusLostBehaviour
- Parameters:
focusLostBehaviour
- the focus lost behaviour,JFormattedTextField.COMMIT
by default- Returns:
- this builder instance
- See Also:
-
builder
- Returns:
- a builder for a component
-
builder
- Parameters:
linkedValue
- the value to link to the component- Returns:
- a builder for a component
-