Package com.vaadin.ui

Examples of com.vaadin.ui.InlineDateField


        testDate = cal.getTime();
    }

    @Override
    protected void setup(VaadinRequest request) {
        DateField df = new InlineDateField("Disabled");
        df.setValue(testDate);
        df.setEnabled(false);
        addComponent(df);

        df = new InlineDateField("Read-only");
        df.setValue(testDate);
        df.setReadOnly(true);
        addComponent(df);
    }
View Full Code Here


    protected void setup() {
        final DateField df = new DateField();
        df.setPrimaryStyleName("my-datefield");
        addComponent(df);

        final InlineDateField idf = new InlineDateField();
        idf.setPrimaryStyleName("my-inline-datefield");
        addComponent(idf);

        addComponent(new Button("Set primary stylename",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        df.setPrimaryStyleName("my-second-datefield");
                        idf.setPrimaryStyleName("my-second-inline-datefield");
                    }
                }));

    }
View Full Code Here

        DateField df = new DateField();
        df.setValue(DATE);
        df.setResolution(DateField.RESOLUTION_MIN);
        hl.addComponent(df);

        df = new InlineDateField();
        df.setLocale(new Locale("fi", "FI"));
        df.setShowISOWeekNumbers(true);
        df.setValue(DATE);
        df.setResolution(DateField.RESOLUTION_DAY);
        hl.addComponent(df);

        df = new InlineDateField();
        df.setValue(DATE);
        df.setResolution(DateField.RESOLUTION_YEAR);
        hl.addComponent(df);

        return l;
View Full Code Here

        final PopupDateField df = new PopupDateField();
        df.setValue(new Date(2012 - 1900, 5 - 1, 12));
        setRange(df, 5);
        layout.addComponent(df);

        final InlineDateField df2 = new InlineDateField();
        df2.setValue(new Date(2012 - 1900, 11 - 1, 16));

        setRange(df2, 5);
        // layout.addComponent(df2);

        Button button1 = new Button("Set Range Now+/-5d");
View Full Code Here

            }
        });
        dateField3.setImmediate(true);
        getLayout().addComponent(dateField3);

        final InlineDateField dateField2 = new InlineDateField();
        dateField2.setValue(new java.util.Date());
        dateField2.setResolution(PopupDateField.RESOLUTION_MONTH);
        dateField2.addListener(new PopupDateField.ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                getMainWindow().showNotification(
                        "Date now" + event.getProperty());
            }
        });
        dateField2.setImmediate(true);
        getLayout().addComponent(dateField2);

        CheckBox immediate = new CheckBox(
                "Immediate (use sync button to change fields) ");
        immediate.setValue(true);
        immediate.addListener(new CheckBox.ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                boolean immediate = !dateField.isImmediate();
                dateField.setImmediate(immediate);
                dateField2.setImmediate(immediate);
                dateField3.setImmediate(immediate);
            }
        });

        getLayout().addComponent(immediate);
View Full Code Here

        DateField df = new PopupDateField("Popup date field");
        df.setId("datefield" + debugIdCounter++);
        df.setValue(cal.getTime());
        addComponent(df);

        df = new InlineDateField("Inline date field");
        df.setId("datefield" + debugIdCounter++);
        df.setValue(cal.getTime());
        addComponent(df);

        createDateFieldWith(null, null, "130px");
View Full Code Here

        addComponent(df);

        final Label lbl = new Label(dformat.format(cal.getTime()));
        lbl.setCaption("Selected date");

        InlineDateField idf = new InlineDateField("bar");
        idf.setResolution(DateField.RESOLUTION_MIN);
        idf.setDateFormat(dformat.toPattern());
        idf.setValue(cal.getTime());
        idf.setImmediate(true);

        idf.addListener(new Property.ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                lbl.setValue(dformat.format(event.getProperty().getValue()));
            }
        });
View Full Code Here

public class DateFieldFastForward extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        addComponent(new InlineDateField());
    }
View Full Code Here

        return c;
    }

    /** Create new InlineDateField and add it to current component container. */
    public InlineDateField inlinedatefield() {
        InlineDateField c = new InlineDateField();
        c.setImmediate(true);
        add(c);
        return c;
    }
View Full Code Here

    /**
     * Create new InlineDateField with given caption and add it to current
     * component container.
     */
    public InlineDateField inlinedatefield(String caption) {
        InlineDateField c = inlinedatefield();
        c.setCaption(caption);
        return c;
    }
View Full Code Here

TOP

Related Classes of com.vaadin.ui.InlineDateField

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.