Package com.vaadin.shared.ui

Examples of com.vaadin.shared.ui.MarginInfo


        Label selected = new Label();

        public SelectionExample() {
            addComponent(table);
            addComponent(button);
            setMargin(new MarginInfo(true, false, false, false));

            // Label to indicate current selection
            selected.setValue("No selection");
            addComponent(selected);
View Full Code Here


        Panel editor = new Panel("Text Editor");
        editor.setWidth("580px");

        VerticalLayout panelContent = new VerticalLayout();
        panelContent.setSpacing(true);
        panelContent.setMargin(new MarginInfo(true, false, false, false));
        editor.setContent(panelContent);

        // Create the toolbar
        HorizontalLayout toolbar = new HorizontalLayout();
        toolbar.setSpacing(true);
        toolbar.setMargin(new MarginInfo(false, false, false, true));

        // Create the font family selector
        toolbar.addComponent(createFontSelect());

        // Create the font size selector
View Full Code Here

        // Add both to a panel
        VerticalLayout fields = new VerticalLayout(user, password, loginButton);
        fields.setCaption("Please login to access the application. (test@test.com/passw0rd)");
        fields.setSpacing(true);
        fields.setMargin(new MarginInfo(true, true, true, false));
        fields.setSizeUndefined();

        // The view root layout
        VerticalLayout viewLayout = new VerticalLayout(fields);
        viewLayout.setSizeFull();
View Full Code Here

    }

    private void createMarginsSelect(String category) {
        LinkedHashMap<String, MarginInfo> options = new LinkedHashMap<String, MarginInfo>();
        options.put("off", new MarginInfo(false));
        options.put("all", new MarginInfo(true));
        options.put("left", new MarginInfo(false, false, false, true));
        options.put("right", new MarginInfo(false, true, false, false));
        options.put("top", new MarginInfo(true, false, false, false));
        options.put("bottom", new MarginInfo(false, false, true, false));
        options.put("left-right", new MarginInfo(false, true, false, true));
        options.put("top-bottom", new MarginInfo(true, false, true, false));

        createSelectAction("Margins", category, options, "off", marginCommand);
    }
View Full Code Here

    }

    protected void buildRootLayout() {
        rootLayout.setSpacing(true);
        rootLayout.setSizeFull();
        rootLayout.setMargin(new MarginInfo(false, true, true, true));
        rootLayout.addComponent(buildRootUpperBar());
        rootLayout.addComponent(buildRootSeparator());
        rebuildLowerPanel();
    }
View Full Code Here

    ByteArrayOutputStream baos = new ByteArrayOutputStream();

    @Override
    protected void setup() {
        getLayout().setMargin(new MarginInfo(true, false, false, false));
        getLayout().setSpacing(true);

        Upload u = new Upload("Upload", new Upload.Receiver() {

            @Override
View Full Code Here

        initAddNewEventButton();

        HorizontalLayout hl = new HorizontalLayout();
        hl.setWidth("100%");
        hl.setSpacing(true);
        hl.setMargin(new MarginInfo(false, false, true, false));
        hl.addComponent(prevButton);
        hl.addComponent(captionLabel);
        hl.addComponent(monthButton);
        hl.addComponent(weekButton);
        hl.addComponent(nextButton);
        hl.setComponentAlignment(prevButton, Alignment.MIDDLE_LEFT);
        hl.setComponentAlignment(captionLabel, Alignment.MIDDLE_CENTER);
        hl.setComponentAlignment(monthButton, Alignment.MIDDLE_CENTER);
        hl.setComponentAlignment(weekButton, Alignment.MIDDLE_CENTER);
        hl.setComponentAlignment(nextButton, Alignment.MIDDLE_RIGHT);

        monthButton.setVisible(viewMode == Mode.WEEK);
        weekButton.setVisible(viewMode == Mode.DAY);

        HorizontalLayout controlPanel = new HorizontalLayout();
        controlPanel.setSpacing(true);
        controlPanel.setMargin(new MarginInfo(false, false, true, false));
        controlPanel.setWidth("100%");
        controlPanel.addComponent(localeSelect);
        controlPanel.addComponent(timeZoneSelect);
        controlPanel.addComponent(formatSelect);
        controlPanel.addComponent(hideWeekendsButton);
View Full Code Here

            }
        }

        private void updateMarginsAndSpacing() {
            if (testedLayout instanceof Layout.MarginHandler) {
                ((Layout.MarginHandler) testedLayout).setMargin(new MarginInfo(
                        marginTop.getValue().booleanValue(), marginRight
                                .getValue().booleanValue(), marginBottom
                                .getValue().booleanValue(), marginLeft
                                .getValue().booleanValue()));
            }
View Full Code Here

    @Override
    protected void setup(VaadinRequest request) {
        setLocale(new Locale("en", "US"));
        getLayout().setWidth(100, Unit.PERCENTAGE);
        getLayout().setHeight(null);
        getLayout().setMargin(new MarginInfo(true, false, false, false));
        getLayout().setSpacing(true);

        initializeControlFields();

        GridLayout gl = new GridLayout(2, 2);
View Full Code Here

                createHalfTableAndFixedTableOnFixed(), createHalfTableOnFull());
        level1.setSpacing(true);
        level1.setWidth(100, Unit.PERCENTAGE);
        level1.setExpandRatio(
                level1.getComponent(level1.getComponentCount() - 1), 1);
        level1.setMargin(new MarginInfo(true, false, false, false));

        HorizontalLayout level2 = new HorizontalLayout(createFullOnFixed(),
                createFullOnFull());
        level2.setSpacing(true);
        level2.setWidth(100, Unit.PERCENTAGE);
        level2.setExpandRatio(
                level2.getComponent(level2.getComponentCount() - 1), 1);
        level2.setMargin(new MarginInfo(true, false, false, false));

        addComponent(level1);
        addComponent(level2);
    }
View Full Code Here

TOP

Related Classes of com.vaadin.shared.ui.MarginInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.