Package com.jbstrap.ui.components.form
Interface SupportAppend<T extends FormItem<?,?>>
- Type Parameters:
T
- FormItem component type
- All Known Implementing Classes:
ComboboxItem
,DatePicker
,DateRangePicker
,IntegerItem
,NumberItem
,PasswordItem
,TextItem
public interface SupportAppend<T extends FormItem<?,?>>
You can use this interface to extend the FormItem component with text before or after the input field, or with any component.
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault T
Appends a component after the input field.default T
Displays an icon after the input field.default T
Appends a text after the input field.default T
Appends a component before the input field.default T
Appends an icon before the input field.default T
Appends a text before the input field.default T
removeAppend
(int index) Removes a component instance from after the input field.default T
removePrepend
(int index) Removes an object from before the input field using its index.
-
Field Details
-
LOG
static final org.slf4j.Logger LOG
-
-
Method Details
-
prepend
Appends a text before the input field.- Parameters:
text
- Appended text Ifnull
or an empty string is specified, nothing is displayed before the input field- Returns:
- Form item component
-
prepend
Appends an icon before the input field.- Parameters:
icon
- Icon Ifnull
is specified, nothing is displayed before the input field. Available icons are listed in the enumIcon
.- Returns:
- Form item component
-
prepend
Appends a component before the input field.- Parameters:
component
- Component instance Ifnull
or is specified, nothing is displayed before the input field.- Returns:
- Form item component
-
removePrepend
Removes an object from before the input field using its index. The first item has the index 0.- Parameters:
index
- Index If a nonexistent index is specified, removal is not successful.- Returns:
- Form item component
-
append
Appends a text after the input field.- Parameters:
text
- Text Ifnull
or an empty string is specified, nothing is displayed after the input field.- Returns:
- Form item component
-
append
Displays an icon after the input field.- Parameters:
icon
- Icon Ifnull
or is specified, nothing is displayed after the input field. Available icons are listed in the enumIcon
.- Returns:
- Form item component
-
append
Appends a component after the input field.- Parameters:
component
- Component instance Ifnull
or is specified, nothing is displayed after the input field.- Returns:
- Form item component
-
removeAppend
Removes a component instance from after the input field. The first item’s index is 0.- Parameters:
index
- Index If a nonexistent index is specified, removal is not successful.- Returns:
- Form item component
-