Package com.vaadin.flow.component.shared
Interface HasTooltip
- All Superinterfaces:
HasElement,Serializable
- All Known Subinterfaces:
InputField<E,V>
- All Known Implementing Classes:
AbstractIcon,AbstractNumberField,AccordionPanel,BigDecimalField,Button,Checkbox,CheckboxGroup,CollaborationMessageInput,ComboBox,ComboBoxBase,CustomField,DatePicker,DateTimePicker,Details,DrawerToggle,EmailField,FontIcon,Icon,IntegerField,ListBox,ListBoxBase,MessageInput,MultiSelectComboBox,MultiSelectListBox,NumberField,PasswordField,RadioButtonGroup,Select,SideNavItem,SvgIcon,Tab,TextArea,TextField,TextFieldBase,TimePicker
Mixin interface for components that have special handling for tooltips on the
Web Component level.
Components that implement this interface get a
<vaadin-tooltip slot="tooltip"> element added inside the
component's light DOM and are expected to handle it appropriately on the
client-side.
Use this interface only if you are implementing a new component that also has
a Web Component counterpart with a custom tooltip support. Otherwise, use
Tooltip.forComponent(Component) instead.
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptiondefault TooltipGets the tooltip handle of the component.default TooltipsetTooltipMarkdown(String markdown) Sets a tooltip text for the component in Markdown format.default TooltipsetTooltipText(String text) Sets a tooltip text for the component as plain text.Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Method Details
-
setTooltipText
Sets a tooltip text for the component as plain text.- Parameters:
text- The tooltip text- Returns:
- the tooltip handle
-
setTooltipMarkdown
Sets a tooltip text for the component in Markdown format.- Parameters:
markdown- The tooltip text in Markdown format- Returns:
- the tooltip handle
-
getTooltip
Gets the tooltip handle of the component.- Returns:
- the tooltip handle
-