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
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault TAppends a component after the input field.default TDisplays an icon after the input field.default TAppends a text after the input field.default TAppends a component before the input field.default TAppends an icon before the input field.default TAppends a text before the input field.default TremoveAppend(int index) Removes a component instance from after the input field.default TremovePrepend(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 Ifnullor 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 Ifnullis 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 Ifnullor 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 Ifnullor 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 Ifnullor 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 Ifnullor 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
-