Package de.xima.fc.form.common
Enum EHelpTextDisplay
- java.lang.Object
-
- java.lang.Enum<EHelpTextDisplay>
-
- de.xima.fc.form.common.EHelpTextDisplay
-
- All Implemented Interfaces:
Serializable,Comparable<EHelpTextDisplay>
public enum EHelpTextDisplay extends Enum<EHelpTextDisplay>
Controls how the help text of a form element is displayed in the form.The display can be set for the entire form via
XFormPropertyEnum.HELP_TEXT_DISPLAY, and overridden for a single form element viaXPropertyEnum.helptextdisplay.- Since:
- 8.6.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABOVEThe help text is always shown above the form element.BELOWThe help text is always shown below the form element.POPOVERA help icon is shown next to the form element, the help text is shown as a popover when the user hovers over or focuses the icon.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EHelpTextDisplayfromValue(String value)Parses the value as stored in the form properties.static EHelpTextDisplayfromValue(String value, EHelpTextDisplay defaultDisplay)Parses the value as stored in the properties of a form element, where an empty value means that the form's default applies.StringgetValue()Gets the value as stored in the form properties or the element properties.booleanisInline()Whether the help text is always shown in the form, i.e. above or below the form element.static EHelpTextDisplayvalueOf(String name)Returns the enum constant of this type with the specified name.static EHelpTextDisplay[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
POPOVER
public static final EHelpTextDisplay POPOVER
A help icon is shown next to the form element, the help text is shown as a popover when the user hovers over or focuses the icon. This is the default and corresponds to the behavior of previous versions.
-
ABOVE
public static final EHelpTextDisplay ABOVE
The help text is always shown above the form element. Note that the exact position depends on the position of the label. For example, when the label is configured to be shown above the form element, the help text will be shown between the label and the form element.
-
BELOW
public static final EHelpTextDisplay BELOW
The help text is always shown below the form element. Note that the exact position depends on the position of the label. For example, when the label is configured to be shown below the form element, the help text will be shown between the form element and the label.
-
-
Method Detail
-
values
public static EHelpTextDisplay[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EHelpTextDisplay c : EHelpTextDisplay.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EHelpTextDisplay valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
public String getValue()
Gets the value as stored in the form properties or the element properties.- Returns:
- The value as stored in the properties, never
null.
-
isInline
public boolean isInline()
Whether the help text is always shown in the form, i.e. above or below the form element.- Returns:
trueif the help text is shown inline,falseif it is shown as a popover.
-
fromValue
public static EHelpTextDisplay fromValue(String value)
Parses the value as stored in the form properties.- Parameters:
value- Value to parse, may benull.- Returns:
- The parsed value, or
POPOVERif the value isnullor unknown. Nevernull.
-
fromValue
public static EHelpTextDisplay fromValue(String value, EHelpTextDisplay defaultDisplay)
Parses the value as stored in the properties of a form element, where an empty value means that the form's default applies.- Parameters:
value- Value to parse, may benull.defaultDisplay- Display to return when the value isnull, empty or unknown, must not benull.- Returns:
- The parsed value, or the given default if the value is
null, empty or unknown. Nevernull.
-
-