use of com.haulmont.cuba.web.toolkit.ui.client.placeholder.CubaPlaceHolderWidget in project cuba by cuba-platform.
the class CubaHorizontalSplitPanelWidget method setDockable.
public void setDockable(boolean dockable) {
if (isDockable() == dockable) {
return;
}
if (dockable) {
dockButton = new CubaPlaceHolderWidget();
dockButton.setStyleName(SP_DOCK_BUTTON);
dockButton.addStyleName(SP_DOCK_BUTTON_LEFT);
dockButton.addDomHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
onDockButtonClick();
}
}, ClickEvent.getType());
dockButtonContainer = new VOverlay();
dockButtonContainer.addStyleName(SP_DOCK_OVERLAY);
dockButtonContainer.getElement().getStyle().setZIndex(9999);
if (dockMode == SplitPanelDockMode.LEFT) {
dockButtonContainer.setStyleName(SP_DOCK_LEFT);
} else if (dockMode == SplitPanelDockMode.RIGHT) {
dockButtonContainer.setStyleName(SP_DOCK_RIGHT);
}
dockButtonContainer.setOwner(this);
dockButtonContainer.setWidget(dockButton);
dockButtonContainer.show();
updateDockButtonPosition();
} else {
if (dockButtonContainer != null) {
dockButtonContainer.hide();
dockButtonContainer.removeFromParent();
dockButtonContainer = null;
dockButton = null;
}
}
}
Aggregations