Interface HasInputColumns

All Superinterfaces:
Serializable
All Known Subinterfaces:
FAbstractTextField
All Known Implementing Classes:
FPasswordField, FTextArea, FTextField

public interface HasInputColumns extends Serializable
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 Type
    Method
    Description
    default int
    Gets the currently stored number of columns for the field.
    Returns the controller that provides logic for input column handling.
    default void
    setColumns(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 InputColumnController instance
    • 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 to null, allowing automatic sizing.
      Parameters:
      columns - the number of columns to set, negative values are treated as 0