use of com.vaadin.shared.ui.MarginInfo in project cuba by cuba-platform.
the class WebScrollBoxLayout method setMargin.
@Override
public void setMargin(com.haulmont.cuba.gui.components.MarginInfo marginInfo) {
MarginInfo vMargin = new MarginInfo(marginInfo.hasTop(), marginInfo.hasRight(), marginInfo.hasBottom(), marginInfo.hasLeft());
component.setMargin(vMargin);
}
use of com.vaadin.shared.ui.MarginInfo in project cuba by cuba-platform.
the class CubaFoldersPane method addFoldersLabel.
protected Component addFoldersLabel(AbstractLayout layout, Label label) {
HorizontalLayout l = new HorizontalLayout();
l.setMargin(new MarginInfo(false, true, false, true));
l.addComponent(label);
l.setWidth("100%");
layout.addComponent(l);
return l;
}
use of com.vaadin.shared.ui.MarginInfo in project cuba by cuba-platform.
the class CubaCssActionsLayoutConnector method onStateChanged.
@Override
public void onStateChanged(StateChangeEvent stateChangeEvent) {
super.onStateChanged(stateChangeEvent);
getWidget().setMargin(new MarginInfo(getState().marginsBitmask));
getWidget().setSpacing(getState().spacing);
}
use of com.vaadin.shared.ui.MarginInfo in project cuba by cuba-platform.
the class CubaGroupBoxConnector method onStateChanged.
@Override
public void onStateChanged(StateChangeEvent stateChangeEvent) {
super.onStateChanged(stateChangeEvent);
CubaGroupBoxWidget widget = getWidget();
if (!widgetInitialized) {
widget.init();
if (!getState().showAsPanel) {
LayoutManager layoutManager = getLayoutManager();
layoutManager.registerDependency(this, widget.captionStartDeco);
layoutManager.registerDependency(this, widget.captionEndDeco);
layoutManager.registerDependency(this, widget.captionTextNode);
}
widgetInitialized = true;
}
widget.setCollapsable(getState().collapsable);
widget.setExpanded(getState().expanded);
widget.setShowAsPanel(getState().showAsPanel);
if (!getState().showAsPanel) {
widget.setOuterMargin(new MarginInfo(getState().outerMarginsBitmask));
}
if (stateChangeEvent.hasPropertyChanged("caption")) {
widget.captionNode.getStyle().clearWidth();
getLayoutManager().setNeedsMeasure(this);
}
}
use of com.vaadin.shared.ui.MarginInfo in project cuba by cuba-platform.
the class WebFlowBoxLayout method setMargin.
@Override
public void setMargin(com.haulmont.cuba.gui.components.MarginInfo marginInfo) {
MarginInfo vMargin = new MarginInfo(marginInfo.hasTop(), marginInfo.hasRight(), marginInfo.hasBottom(), marginInfo.hasLeft());
component.setMargin(vMargin);
}
Aggregations