Package com.vaadin.shared.ui

Examples of com.vaadin.shared.ui.MarginInfo


     *
     * @see com.vaadin.ui.Layout.MarginHandler#getMargin()
     */
    @Override
    public MarginInfo getMargin() {
        return new MarginInfo(getState(false).marginsBitmask);
    }
View Full Code Here


    @Test
    public void inflate_singleLayout_layoutWithMarginsInstantiated() {
        Component layout = inflater.inflate(getXml("single-layout.xml"));

        // check margin="true false false true"
        assertEquals(new MarginInfo(true, false, false, true),
                ((VerticalLayout) layout).getMargin());
    }
View Full Code Here

    @Test
    public void inflate_simpleMargin_layoutMarginTrue() {
        Component layout = inflater.inflate(getXml("simple-margin.xml"));

        // check margin="true"
        assertEquals(new MarginInfo(true),
                ((VerticalLayout) layout).getMargin());
    }
View Full Code Here

    public void inflate_simpleMargin_innerLayoutMarginFalse() {
        VerticalLayout layout = (VerticalLayout) inflater
                .inflate(getXml("simple-margin.xml"));

        // check margin="false"
        assertEquals(new MarginInfo(false),
                ((VerticalLayout) layout.getComponent(0)).getMargin());
    }
View Full Code Here

    }

    protected MarginInfo parseMarginInfo(String margin) {
        String[] margins = margin.split(" ");
        if (margins.length == 4) {
            return new MarginInfo(Boolean.valueOf(margins[0]),
                    Boolean.valueOf(margins[1]), Boolean.valueOf(margins[2]),
                    Boolean.valueOf(margins[3]));
        } else {
            return new MarginInfo(Boolean.valueOf(margin));
        }
    }
View Full Code Here

     *
     * @return the component
     */
    private Component createRGBTab(Color color) {
        VerticalLayout rgbLayout = new VerticalLayout();
        rgbLayout.setMargin(new MarginInfo(false, false, true, false));
        rgbLayout.addComponent(rgbPreview);
        rgbLayout.setStyleName("rgbtab");

        // Add the RGB color gradient
        rgbGradient = new ColorPickerGradient("rgb-gradient", RGBConverter);
View Full Code Here

     *
     * @return the component
     */
    private Component createHSVTab(Color color) {
        VerticalLayout hsvLayout = new VerticalLayout();
        hsvLayout.setMargin(new MarginInfo(false, false, true, false));
        hsvLayout.addComponent(hsvPreview);
        hsvLayout.setStyleName("hsvtab");

        // Add the hsv gradient
        hsvGradient = new ColorPickerGradient("hsv-gradient", HSVConverter);
View Full Code Here

     *
     * @return the component
     */
    private Component createSelectTab() {
        VerticalLayout selLayout = new VerticalLayout();
        selLayout.setMargin(new MarginInfo(false, false, true, false));
        selLayout.addComponent(selPreview);
        selLayout.addStyleName("seltab");

        colorSelect = new ColorPickerSelect();
        colorSelect.addColorChangeListener(this);
View Full Code Here

public class FormLayout extends AbstractOrderedLayout {

    public FormLayout() {
        super();
        setSpacing(true);
        setMargin(new MarginInfo(true, false, true, false));
        setWidth(100, UNITS_PERCENTAGE);
    }
View Full Code Here

     *
     * @return the component
     */
    private Component createRGBTab(Color color) {
        VerticalLayout rgbLayout = new VerticalLayout();
        rgbLayout.setMargin(new MarginInfo(false, false, true, false));
        rgbLayout.addComponent(rgbPreview);
        rgbLayout.setStyleName("rgbtab");

        // Add the RGB color gradient
        rgbGradient = new ColorPickerGradient("rgb-gradient", RGBConverter);
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.