Package com.jbstrap.ui.components.form
Interface SupportHelpIcon<T extends FormItem<?,?>>
- All Known Implementing Classes:
CheckboxItem
,ColorPicker
,ComboboxItem
,DatePicker
,DateRangePicker
,DualListBox
,IntegerItem
,NumberItem
,PasswordItem
,RadioButtonItem
,SelectorItem
,StaticTextItem
,SwitchItem
,TextItem
public interface SupportHelpIcon<T extends FormItem<?,?>>
You can use this interface to add a help icon and text to the FormItem component
- Since:
- 4.0
- Author:
- JBStrap
-
Method Summary
Modifier and TypeMethodDescriptiondefault Icon
Gets the form item’s help icon.default String
Gets the help text for the form item.default T
setHelpIcon
(Icon icon) Sets the form item help icon.default T
setHelpText
(String helpText) Sets a help text for the form item.
-
Method Details
-
setHelpText
Sets a help text for the form item. By default, the form item does not have a help text. If a help text is set for the form item, a question mark appears after the input field. If the user hovers with the mouse over this question mark, the specified help text is displayed.- Parameters:
helpText
- Help text for the form item Ifnull
is set, the help text and the question mark disappear.- Returns:
- Form item component
-
getHelpText
Gets the help text for the form item.- Returns:
- The form item’s help text or
null
if there is no help text defined for the form item
-
setHelpIcon
Sets the form item help icon. The default help icon is theIcon.QUESTION
. The icon set here is displayed when you set a help text for the form item.- Parameters:
icon
- Help icon Available icon are listed in the enumIcon
.- Returns:
- Form item component
-
getHelpIcon
Gets the form item’s help icon.- Returns:
- Form item help icon or
null
if not set
-