Search in sources :

Example 26 with Icon

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;
}
Also used : Icon(com.vaadin.flow.component.icon.Icon) VaadinIcon(com.vaadin.flow.component.icon.VaadinIcon)

Example 27 with Icon

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;
}
Also used : Icon(com.vaadin.flow.component.icon.Icon) VaadinIcon(com.vaadin.flow.component.icon.VaadinIcon)

Example 28 with Icon

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;
}
Also used : Button(com.vaadin.flow.component.button.Button) Icon(com.vaadin.flow.component.icon.Icon) VaadinIcon(com.vaadin.flow.component.icon.VaadinIcon)

Example 29 with Icon

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;
}
Also used : HTMLText(com.storedobject.common.HTMLText) Icon(com.vaadin.flow.component.icon.Icon)

Example 30 with Icon

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);
}
Also used : Anchor(com.vaadin.flow.component.html.Anchor) Icon(com.vaadin.flow.component.icon.Icon) VaadinIcon(com.vaadin.flow.component.icon.VaadinIcon)

Aggregations

Icon (com.vaadin.flow.component.icon.Icon)110 VaadinIcon (com.vaadin.flow.component.icon.VaadinIcon)94 HorizontalLayout (com.vaadin.flow.component.orderedlayout.HorizontalLayout)46 Button (com.vaadin.flow.component.button.Button)39 Span (com.vaadin.flow.component.html.Span)21 Div (com.vaadin.flow.component.html.Div)19 ComponentRenderer (com.vaadin.flow.data.renderer.ComponentRenderer)18 Tab (com.vaadin.flow.component.tabs.Tab)16 Text (com.vaadin.flow.component.Text)15 Test (org.junit.Test)12 EnhancedButton (org.komunumo.ui.component.EnhancedButton)12 Grid (com.vaadin.flow.component.grid.Grid)10 RouterLink (com.vaadin.flow.router.RouterLink)9 Notification (com.vaadin.flow.component.notification.Notification)8 Component (com.vaadin.flow.component.Component)7 ColumnTextAlign (com.vaadin.flow.component.grid.ColumnTextAlign)7 Anchor (com.vaadin.flow.component.html.Anchor)7 TextField (com.vaadin.flow.component.textfield.TextField)7 UI (com.vaadin.flow.component.UI)6 StreamResource (com.vaadin.flow.server.StreamResource)6