Class FieldMarkerI18n
java.lang.Object
com.vaadin.flow.component.ai.form.FieldMarkerI18n
- All Implemented Interfaces:
Serializable
The texts shown by the marker the
FormAIController applies to the
fields the AI filled: the "AI" badge, its tooltip, the popover that explains
the AI fill and offers a revert control, and the confidence indicator. Use to
localize the marker; any text left null falls back to the built-in
English default.- Since:
- 25.3
- Author:
- Vaadin Ltd
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe texts of the confidence indicator, one perconfidence level. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the accessible label of the badge button and the popover dialog.Gets the tooltip text of the badge button.Gets the texts of the confidence indicator.Gets the message shown in the popover explaining the AI fill.Gets the label of the revert control in the popover.setBadgeLabel(String badgeLabel) Sets the accessible label of the badge button and the popover dialog.setBadgeTooltip(String badgeTooltip) Sets the tooltip text of the badge button.setConfidence(FieldMarkerI18n.Confidence confidence) Sets the texts of the confidence indicator shown for a value whose source reports a confidence level.setMessage(String message) Sets the message shown in the popover explaining the AI fill.Sets the label of the revert control in the popover.
-
Constructor Details
-
FieldMarkerI18n
public FieldMarkerI18n()
-
-
Method Details
-
getMessage
Gets the message shown in the popover explaining the AI fill.- Returns:
- the popover message, or
nullwhen the built-in default is used
-
setMessage
Sets the message shown in the popover explaining the AI fill. The message is also announced to screen readers when a field is marked.- Parameters:
message- the popover message, ornullto use the built-in default- Returns:
- this instance, for chaining
-
getRevert
Gets the label of the revert control in the popover.- Returns:
- the revert control label, or
nullwhen the built-in default is used
-
setRevert
Sets the label of the revert control in the popover.- Parameters:
revert- the revert control label, ornullto use the built-in default- Returns:
- this instance, for chaining
-
getBadgeLabel
Gets the accessible label of the badge button and the popover dialog.- Returns:
- the badge label, or
nullwhen the built-in default is used
-
setBadgeLabel
Sets the accessible label of the badge button and the popover dialog.- Parameters:
badgeLabel- the badge label, ornullto use the built-in default- Returns:
- this instance, for chaining
-
getBadgeTooltip
Gets the tooltip text of the badge button.- Returns:
- the badge tooltip text, or
nullwhen the built-in default is used
-
setBadgeTooltip
Sets the tooltip text of the badge button.- Parameters:
badgeTooltip- the badge tooltip text, ornullto use the built-in default- Returns:
- this instance, for chaining
-
getConfidence
Gets the texts of the confidence indicator.- Returns:
- the confidence indicator texts, or
nullwhen the built-in defaults are used
-
setConfidence
Sets the texts of the confidence indicator shown for a value whose source reports a confidence level.- Parameters:
confidence- the confidence indicator texts, ornullto use the built-in defaults- Returns:
- this instance, for chaining
-