Search in sources :

Example 1 with MarginInfo

use of com.vaadin.shared.ui.MarginInfo in project VaadinUtils by rlsutton1.

the class BaseCrudView method buildActionLayout.

private void buildActionLayout() {
    actionLayout = new HorizontalLayout();
    actionLayout.setWidth("100%");
    actionLayout.setMargin(new MarginInfo(false, true, false, false));
    actionLabel = new Label(" Action");
    actionLabel.setContentMode(ContentMode.HTML);
    actionLabel.setWidth("50");
    actionGroupLayout.addStyleName("v-component-group");
    actionLayout.addComponent(actionGroupLayout);
    actionGroupLayout.addComponent(actionLabel);
    actionCombo = new ComboBox(null);
    actionCombo.setWidth("160");
    actionCombo.setNullSelectionAllowed(false);
    actionCombo.setTextInputAllowed(false);
    actionGroupLayout.addComponent(actionCombo);
    addCrudActions();
    actionGroupLayout.addComponent(actionApplyButton);
    actionApplyButton.setId("applyButton");
    actionMessage = new Label("", ContentMode.HTML);
    actionGroupLayout.addComponent(actionMessage);
    String newButtonLabel = getNewButtonLabel();
    if (newButtonLabel == null) {
        newButtonLabel = "";
    }
    actionNewButton.setCaption(newButtonLabel);
    actionNewButton.setId("CrudNewButton-" + newButtonLabel.replace(" ", ""));
    actionLayout.addComponent(actionNewButton);
    actionLayout.setComponentAlignment(actionGroupLayout, Alignment.MIDDLE_LEFT);
    actionLayout.setComponentAlignment(actionNewButton, Alignment.MIDDLE_RIGHT);
    actionLayout.setExpandRatio(actionGroupLayout, 1.0f);
    actionLayout.setHeight("35");
}
Also used : MarginInfo(com.vaadin.shared.ui.MarginInfo) ComboBox(com.vaadin.ui.ComboBox) Label(com.vaadin.ui.Label) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Example 2 with MarginInfo

use of com.vaadin.shared.ui.MarginInfo in project cuba by cuba-platform.

the class CubaColorPickerPopup method createSelectTab.

@Override
protected Component createSelectTab() {
    VerticalLayout selLayout = new VerticalLayout();
    selLayout.setMargin(new MarginInfo(false, false, true, false));
    selLayout.addComponent(selPreview);
    selLayout.addStyleName("seltab");
    colorSelect = new CubaColorPickerSelect();
    colorSelect.addColorChangeListener(this);
    selLayout.addComponent(colorSelect);
    return selLayout;
}
Also used : MarginInfo(com.vaadin.shared.ui.MarginInfo) VerticalLayout(com.vaadin.ui.VerticalLayout)

Example 3 with MarginInfo

use of com.vaadin.shared.ui.MarginInfo in project cuba by cuba-platform.

the class WebWindow method setMargin.

@Override
public void setMargin(com.haulmont.cuba.gui.components.MarginInfo marginInfo) {
    if (getContainer() instanceof Layout.MarginHandler) {
        MarginInfo vMargin = new MarginInfo(marginInfo.hasTop(), marginInfo.hasRight(), marginInfo.hasBottom(), marginInfo.hasLeft());
        ((Layout.MarginHandler) getContainer()).setMargin(vMargin);
    }
}
Also used : MarginInfo(com.vaadin.shared.ui.MarginInfo)

Example 4 with MarginInfo

use of com.vaadin.shared.ui.MarginInfo in project cuba by cuba-platform.

the class WebAbstractBox 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 5 with MarginInfo

use of com.vaadin.shared.ui.MarginInfo in project cuba by cuba-platform.

the class WebFilter 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