use of com.haulmont.cuba.web.widgets.CubaButton in project cuba by cuba-platform.
the class WindowBreadCrumbs method setBeanLocator.
public void setBeanLocator(BeanLocator beanLocator) {
setWidth(100, Unit.PERCENTAGE);
setHeightUndefined();
setPrimaryStyleName(C_HEADLINE_CONTAINER);
if (workAreaMode == Mode.TABBED) {
super.setVisible(false);
}
Layout logoLayout = createLogoLayout();
linksLayout = createLinksLayout();
linksLayout.setSizeUndefined();
if (workAreaMode == Mode.SINGLE) {
Messages messages = beanLocator.get(Messages.NAME);
CubaButton closeBtn = new CubaButton("");
closeBtn.setDescription(messages.getMainMessage("windowBreadCrumbs.closeButton.description"));
closeBtn.setClickHandler(this::onCloseWindowButtonClick);
closeBtn.setIcon(resolveIcon(beanLocator, CubaIcon.CLOSE));
closeBtn.setStyleName("c-closetab-button");
this.closeBtn = closeBtn;
}
Layout enclosingLayout = createEnclosingLayout();
enclosingLayout.addComponent(linksLayout);
addComponent(logoLayout);
addComponent(enclosingLayout);
boolean controlsVisible = beanLocator.get(Configuration.class).getConfig(WebConfig.class).getShowBreadCrumbs();
enclosingLayout.setVisible(controlsVisible);
if (closeBtn != null) {
addComponent(closeBtn);
}
}
Aggregations