Package org.linkki.core.vaadin.component
Class ComponentFactory
- java.lang.Object
-
- org.linkki.core.vaadin.component.ComponentFactory
-
public class ComponentFactory extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringNO_BREAK_SPACE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.vaadin.flow.component.button.ButtonnewButton()static com.vaadin.flow.component.button.ButtonnewButton(com.vaadin.flow.component.icon.Icon icon, Collection<String> styleNames)static LinkkiCheckBoxnewCheckbox()static <T> com.vaadin.flow.component.combobox.ComboBox<T>newComboBox()static com.vaadin.flow.component.datepicker.DatePickernewDateField()Creates a new defaultDatePickerwithDatePicker.setAutoOpen(boolean)set tofalseand autoselect feature totruestatic com.vaadin.flow.component.datepicker.DatePickernewDateField(boolean autoOpen, boolean autoselect)Creates aDatePickerwith the given optionsstatic com.vaadin.flow.component.datetimepicker.DateTimePickernewDateTimeField(long step)Creates a new defaultDateTimePickerwith the given step,DateTimePicker.setAutoOpen(boolean)set tofalseand the autoselect feature totruestatic com.vaadin.flow.component.datetimepicker.DateTimePickernewDateTimeField(long step, boolean autoOpen, boolean autoselect)Creates aDateTimePickerwith the given optionsstatic com.vaadin.flow.component.ComponentnewHorizontalLine()Creates a new horizontal line.static LinkkiAnchornewLink(String caption)Creates a newAnchorwith undefined width.static <T> com.vaadin.flow.component.combobox.MultiSelectComboBox<T>newMultiSelect()static com.vaadin.flow.component.textfield.TextFieldnewNumberField(int maxLength, String width, String pattern)Creates a newTextFieldto display numbers.static com.vaadin.flow.component.textfield.TextFieldnewNumberFieldWithFormattingPattern(int maxLength, String width, String pattern)Creates a newTextFieldto display numbers with the specified formatting pattern.static com.vaadin.flow.component.orderedlayout.VerticalLayoutnewPlainVerticalLayout()Creates a plainVerticalLayoutwithout spacing or margin.static com.vaadin.flow.component.textfield.TextAreanewTextArea()static com.vaadin.flow.component.textfield.TextAreanewTextArea(int maxLength, String width, String height)Returns a newTextAreawith the given max length, width and number of rows.static com.vaadin.flow.component.textfield.TextFieldnewTextField()Creates a newTextFieldwith an unlimited maximal character count and an undefined width.static com.vaadin.flow.component.textfield.TextFieldnewTextField(int maxLength, String width)Returns a newTextFieldwith the given max length and width.
-
-
-
Field Detail
-
NO_BREAK_SPACE
public static final String NO_BREAK_SPACE
- See Also:
- Non-breaking_space, Constant Field Values
-
-
Method Detail
-
newHorizontalLine
public static com.vaadin.flow.component.Component newHorizontalLine()
Creates a new horizontal line.
-
newLink
public static LinkkiAnchor newLink(String caption)
Creates a newAnchorwith undefined width.
-
newTextField
public static com.vaadin.flow.component.textfield.TextField newTextField()
Creates a newTextFieldwith an unlimited maximal character count and an undefined width.
-
newTextField
public static com.vaadin.flow.component.textfield.TextField newTextField(int maxLength, String width)Returns a newTextFieldwith the given max length and width.If the given maxLength is less than or equal to 0, the maximal character count is unlimited.
If the given width is not specified and maxLength is greater than 0, the width of the field is inferred by maxLength.
-
newNumberField
public static com.vaadin.flow.component.textfield.TextField newNumberField(int maxLength, String width, String pattern)Creates a newTextFieldto display numbers.
-
newNumberFieldWithFormattingPattern
public static com.vaadin.flow.component.textfield.TextField newNumberFieldWithFormattingPattern(int maxLength, String width, String pattern)Creates a newTextFieldto display numbers with the specified formatting pattern. The pattern is converted to a regex by using it to format a test number and checking the result to see which characters are allowed.
-
newTextArea
public static com.vaadin.flow.component.textfield.TextArea newTextArea()
-
newTextArea
public static com.vaadin.flow.component.textfield.TextArea newTextArea(int maxLength, String width, String height)Returns a newTextAreawith the given max length, width and number of rows.If the given maxLength is less than or equal to 0, the maximal character count is unlimited.
If the given width is an empty String and maxLength is greater than 0, the width of the field is inferred by maxLength.
The height is only set if the given String is not
empty.
-
newComboBox
public static <T> com.vaadin.flow.component.combobox.ComboBox<T> newComboBox()
-
newMultiSelect
public static <T> com.vaadin.flow.component.combobox.MultiSelectComboBox<T> newMultiSelect()
-
newCheckbox
public static LinkkiCheckBox newCheckbox()
-
newButton
public static com.vaadin.flow.component.button.Button newButton()
-
newDateField
public static com.vaadin.flow.component.datepicker.DatePicker newDateField()
Creates a new defaultDatePickerwithDatePicker.setAutoOpen(boolean)set tofalseand autoselect feature totrue
-
newDateField
public static com.vaadin.flow.component.datepicker.DatePicker newDateField(boolean autoOpen, boolean autoselect)Creates aDatePickerwith the given options- Parameters:
autoOpen- Iftrue, the dropdown will open when the field is clicked.autoselect- Iftrue, the date value will be selected when the field is focused.
-
newDateTimeField
public static com.vaadin.flow.component.datetimepicker.DateTimePicker newDateTimeField(long step)
Creates a new defaultDateTimePickerwith the given step,DateTimePicker.setAutoOpen(boolean)set tofalseand the autoselect feature totrue- Parameters:
step- the time interval, in minutes, between the items displayed in the time picker overlay
-
newDateTimeField
public static com.vaadin.flow.component.datetimepicker.DateTimePicker newDateTimeField(long step, boolean autoOpen, boolean autoselect)Creates aDateTimePickerwith the given options- Parameters:
step- The time interval, in minutes, between the items displayed in the time picker overlayautoOpen- Iftrue, the dropdown will open when the field is clicked.autoselect- Iftrue, the date value will be selected when the field is focused.
-
newButton
public static com.vaadin.flow.component.button.Button newButton(com.vaadin.flow.component.icon.Icon icon, Collection<String> styleNames)
-
newPlainVerticalLayout
public static com.vaadin.flow.component.orderedlayout.VerticalLayout newPlainVerticalLayout()
Creates a plainVerticalLayoutwithout spacing or margin.
-
-