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, and the popover that
explains the AI fill and offers a revert control. 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:
-
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 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.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
-