Examples of DateField


Examples of com.vaadin.ui.DateField

            table.addContainerProperty("datefield", TextField.class, null);
            table.addGeneratedColumn("datefield", new ColumnGenerator() {
                @Override
                public Object generateCell(Table source, Object itemId,
                        Object columnId) {
                    DateField tf = new DateField();
                    tf.addStyleName("compact");
                    if ((Integer) itemId % 2 == 0) {
                        tf.addStyleName("borderless");
                    }
                    return tf;
                }
            });

            table.addContainerProperty("combobox", TextField.class, null);
            table.addGeneratedColumn("combobox", new ColumnGenerator() {
                @Override
                public Object generateCell(Table source, Object itemId,
                        Object columnId) {
                    ComboBox tf = new ComboBox();
                    tf.setInputPrompt("Select");
                    tf.addStyleName("compact");
                    if ((Integer) itemId % 2 == 0) {
                        tf.addStyleName("borderless");
                    }
                    return tf;
                }
            });
View Full Code Here

Examples of com.vaadin.ui.DateField

        f.setNullRepresentation("");
        return f;
    }

    private DateField createDateField(String caption) {
        DateField f = new DateField(caption);
        if (useSecondResolution) {
            f.setResolution(Resolution.SECOND);
        } else {
            f.setResolution(Resolution.MINUTE);
        }
        return f;
    }
View Full Code Here

Examples of com.vaadin.ui.DateField

            TextField tf = new TextField("TextField " + i);
            tf.setDescription("DESC SDKJSDF");
            tf.setComponentError(new UserError("dsfjklsdf"));
            testContainer.addComponent(tf);

            testContainer.addComponent(new DateField("DateField" + i));

            testContainer.addComponent(new Button("Button" + i));

            TabSheet ts = new TabSheet();
View Full Code Here

Examples of com.vaadin.ui.DateField

                                    + "this layout may be switched on the fly."));
            ((Panel) result).setWidth("250px");
            break;
        case 6:
            // Datefield
            result = new DateField();
            ((DateField) result).setStyleName("calendar");
            ((DateField) result).setValue(new java.util.Date());
            result.setCaption("Calendar component " + caption);
            break;
        case 7:
            // Datefield
            result = new DateField();
            ((DateField) result).setValue(new java.util.Date());
            result.setCaption("Calendar component " + caption);
            break;
        }
View Full Code Here

Examples of com.vaadin.ui.DateField

        controls.setMargin(true);
        controls.addComponent(new Label("Report tab"));
        controls.addComponent(click);
        controls.addComponent(click2);
        reportLayout.addComponent(controls);
        final DateField cal = new DateField();
        cal.setResolution(DateField.RESOLUTION_DAY);
        cal.setLocale(new Locale("en", "US"));
        reportLayout.addComponent(cal);
        reportLayout.setExpandRatio(controls, 1);
        report.addStyleName(Reindeer.PANEL_LIGHT);
        report.setHeight(100, Sizeable.UNITS_PERCENTAGE);
View Full Code Here

Examples of com.vaadin.ui.DateField

    Component getSelect() {
        return new Select(getCaption("select"), getSelectOptions());
    }

    Component getDateField() {
        return new DateField(getCaption("datefield"));
    }
View Full Code Here

Examples of com.vaadin.ui.DateField

        TextField f1 = new TextField("1");
        f1.setTabIndex(index++);
        TextField f2 = new TextField("2");
        f2.setTabIndex(index++);

        DateField f3 = new DateField("3");
        f3.setTabIndex(index++);
        ComboBox cb = new ComboBox("4");
        cb.setTabIndex(index++);

        ListSelect lss = new ListSelect("5");
        lss.addItem("foo");
View Full Code Here

Examples of com.vaadin.ui.DateField

                }
            }
        };

        form.addField("Field", new TextField("Text"));
        form.addField("Date", new DateField("Date"));
        // not good for automated testing with screenshots when null
        // form.addField("Inline Date", new InlineDateField("Date"));
        // same as basic DateField
        // form.addField("Popup Date", new PopupDateField("Date"));
        Button setDateButton = new Button("Set date");
View Full Code Here

Examples of com.vaadin.ui.DateField

    public void createNewView() {
        main.removeAllComponents();
        main.addComponent(new Label("DateField"));

        df = new DateField();
        main.addComponent(df);

        final ErrorMessage errorMsg = new UserError("User error " + df);
        df.setCaption("DateField caption " + df);
        df.setDescription("DateField description " + df);
        df.setComponentError(errorMsg);
        df.setImmediate(true);
        // FIXME: bug #1138 this makes datefield to render with unknown
        // component (UIDL tree debug)
        df.addStyleName("thisShouldBeHarmless");

        // Another test: locale
        final DateField df1 = new DateField("US locale");
        main.addComponent(df1);
        df1.setLocale(new Locale("en", "US"));

        final DateField df2 = new DateField("DE locale");
        main.addComponent(df2);
        df2.setLocale(new Locale("de", "DE"));

        final DateField df3 = new DateField("RU locale");
        main.addComponent(df3);
        df3.setLocale(new Locale("ru", "RU"));

        final DateField df4 = new DateField("FI locale");
        main.addComponent(df4);
        df4.setLocale(new Locale("fi", "FI"));
    }
View Full Code Here

Examples of com.vaadin.ui.DateField

    private DateField datefield;

    @Override
    public void setUp() {
        date = new ObjectProperty<Long>(0L);
        datefield = new DateField();
        datefield.setBuffered(false);
        datefield.setConverter(new Converter<Date, Long>() {

            @Override
            public Long convertToModel(Date value,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.