use of com.vaadin.flow.component.icon.Icon in project psip-automation by bssw-psip.
the class UIUtils method createDisabledIcon.
public static Icon createDisabledIcon(VaadinIcon icon) {
Icon i = new Icon(icon);
setTextColor(TextColor.DISABLED, i);
return i;
}
use of com.vaadin.flow.component.icon.Icon in project psip-automation by bssw-psip.
the class UIUtils method createSuccessIcon.
public static Icon createSuccessIcon(VaadinIcon icon) {
Icon i = new Icon(icon);
setTextColor(TextColor.SUCCESS, i);
return i;
}
use of com.vaadin.flow.component.icon.Icon in project psip-automation by bssw-psip.
the class UIUtils method createButton.
// Text and icon
public static Button createButton(String text, VaadinIcon icon, ButtonVariant... variants) {
Icon i = new Icon(icon);
i.getElement().setAttribute("slot", "prefix");
Button button = new Button(text, i);
button.addThemeVariants(variants);
return button;
}
use of com.vaadin.flow.component.icon.Icon in project SODevelopment by syampillai.
the class ELabel method convert.
private static Object convert(Object object) {
if (object == null) {
return "";
}
if (object instanceof Icon) {
HTMLText h = new HTMLText();
h.appendHTML("<iron-icon icon=\"" + ((Icon) object).getElement().getAttribute("icon") + "\"></iron-icon>");
return h;
}
if (object instanceof ELabel) {
return ((ELabel) object).label;
}
Application a = Application.get();
if (a != null) {
return a.getEnvironment().toDisplay(object);
}
return object;
}
use of com.vaadin.flow.component.icon.Icon in project linkki by linkki-framework.
the class TestScenarioView method createCaptionComponent.
private Anchor createCaptionComponent(String id, VaadinIcon icon) {
Icon iconComp = icon.create();
iconComp.addClassName("p-xs");
return new Anchor(getLocation(id, null), iconComp);
}
Aggregations