Search in sources :

Example 1 with IconResolver

use of io.jmix.ui.icon.IconResolver in project jmix by jmix-framework.

the class DialogWindowImpl method setIcon.

@Override
public void setIcon(@Nullable String icon) {
    super.setIcon(icon);
    if (icon == null) {
        dialogWindow.setIcon(null);
    } else {
        IconResolver iconResolver = applicationContext.getBean(IconResolver.class);
        dialogWindow.setIcon(iconResolver.getIconResource(icon));
    }
}
Also used : IconResolver(io.jmix.ui.icon.IconResolver)

Example 2 with IconResolver

use of io.jmix.ui.icon.IconResolver in project jmix by jmix-framework.

the class AbstractSingleFileUploadField method setClearButtonIcon.

@Override
public void setClearButtonIcon(@Nullable String icon) {
    if (icon != null) {
        IconResolver iconResolver = applicationContext.getBean(IconResolver.class);
        Resource iconResource = iconResolver.getIconResource(icon);
        component.setClearButtonIcon(iconResource);
    } else {
        component.setClearButtonIcon(null);
    }
}
Also used : IconResolver(io.jmix.ui.icon.IconResolver) Resource(com.vaadin.server.Resource)

Example 3 with IconResolver

use of io.jmix.ui.icon.IconResolver in project jmix by jmix-framework.

the class TabWindowImpl method setIcon.

@Override
public void setIcon(@Nullable String icon) {
    super.setIcon(icon);
    if (component.isAttached()) {
        TabSheet.Tab tabWindow = findTab();
        if (tabWindow != null) {
            IconResolver iconResolver = applicationContext.getBean(IconResolver.class);
            tabWindow.setIcon(iconResolver.getIconResource(icon));
        }
    }
}
Also used : IconResolver(io.jmix.ui.icon.IconResolver) TabSheet(com.vaadin.ui.TabSheet)

Example 4 with IconResolver

use of io.jmix.ui.icon.IconResolver in project jmix by jmix-framework.

the class AbstractSingleFileUploadField method setUploadButtonIcon.

@Override
public void setUploadButtonIcon(@Nullable String icon) {
    if (!StringUtils.isEmpty(icon)) {
        IconResolver iconResolver = applicationContext.getBean(IconResolver.class);
        component.setUploadButtonIcon(iconResolver.getIconResource(icon));
    } else {
        component.setUploadButtonIcon(null);
    }
}
Also used : IconResolver(io.jmix.ui.icon.IconResolver)

Aggregations

IconResolver (io.jmix.ui.icon.IconResolver)4 Resource (com.vaadin.server.Resource)1 TabSheet (com.vaadin.ui.TabSheet)1