Package com.vaadin.featurepack.ui
Interface HasInputColumns
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
FAbstractTextField
- All Known Implementing Classes:
FPasswordField,FTextArea,FTextField
Interface providing input column handling capabilities for legacy Vaadin
v7/v8 components adapted to Vaadin Flow, which do not inherently support an
exact columns concept.
Implementations should return an InputColumnController instance that
manages the approximated columns via setting the width in character units.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault intGets the currently stored number of columns for the field.Returns the controller that provides logic for input column handling.default voidsetColumns(int columns) Sets the number of columns in the field and updates its width accordingly.
-
Method Details
-
getInputColumnController
InputColumnController getInputColumnController()Returns the controller that provides logic for input column handling. Implementations should provide their own controller instance.- Returns:
- the
InputColumnControllerinstance
-
getColumns
default int getColumns()Gets the currently stored number of columns for the field. Returns 0 if columns were never set or if the field was reset to a no-column state. This value is a server-side stored state and does not reflect any client-side measurement.- Returns:
- the number of columns, or 0 if not set
-
setColumns
default void setColumns(int columns) Sets the number of columns in the field and updates its width accordingly. A column is conceptually approximated as the width of 1.5 'ch' units. Setting a positive number of columns results in a fixed width in 'ch' units. Setting 0 or a negative number resets the width tonull, allowing automatic sizing.- Parameters:
columns- the number of columns to set, negative values are treated as 0
-