All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.imunity.console.components.TooltipFactory Maven / Gradle / Ivy

There is a newer version: 4.0.3
Show newest version
/*
 * Copyright (c) 2021 Bixbit - Krzysztof Benedyczak. All rights reserved.
 * See LICENCE.txt file for licensing information.
 */

package io.imunity.console.components;

import static io.imunity.vaadin.elements.CssClassNames.FIELD_ICON_GAP;

import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.Html;
import com.vaadin.flow.component.icon.Icon;
import com.vaadin.flow.component.icon.VaadinIcon;

import io.imunity.vaadin.endpoint.common.api.HtmlTooltipFactory;


@org.springframework.stereotype.Component
public class TooltipFactory implements HtmlTooltipFactory
{
	public static Component getWithHtmlContent(String tooltipText)
	{
		Icon icon = VaadinIcon.QUESTION_CIRCLE_O.create();
		HtmlTooltipAttacher.to(icon, new Html("
" + tooltipText + "
")); icon.setClassName(FIELD_ICON_GAP.getName()); return icon; } @Override public Component get(String tooltipText) { return getWithHtmlContent(tooltipText); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy