Search in sources :

Example 6 with MarginInfo

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);
}
Also used : MarginInfo(com.vaadin.shared.ui.MarginInfo)

Example 7 with MarginInfo

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;
}
Also used : MarginInfo(com.vaadin.shared.ui.MarginInfo)

Example 8 with MarginInfo

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);
}
Also used : MarginInfo(com.vaadin.shared.ui.MarginInfo)

Example 9 with MarginInfo

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);
    }
}
Also used : MarginInfo(com.vaadin.shared.ui.MarginInfo)

Example 10 with MarginInfo

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);
}
Also used : MarginInfo(com.vaadin.shared.ui.MarginInfo)

Aggregations

MarginInfo (com.vaadin.shared.ui.MarginInfo)15 Label (com.vaadin.ui.Label)3 HorizontalLayout (com.vaadin.ui.HorizontalLayout)2 VerticalLayout (com.vaadin.ui.VerticalLayout)2 ExpanderComponent (au.com.vaadinutils.jasper.filter.ExpanderComponent)1 JSCallWithReturnValue (au.com.vaadinutils.js.JSCallWithReturnValue)1 ExternalResource (com.vaadin.server.ExternalResource)1 BrowserFrame (com.vaadin.ui.BrowserFrame)1 ComboBox (com.vaadin.ui.ComboBox)1 GridLayout (com.vaadin.ui.GridLayout)1 NativeButton (com.vaadin.ui.NativeButton)1 UI (com.vaadin.ui.UI)1