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));
}
}
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);
}
}
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));
}
}
}
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);
}
}
Aggregations