Package com.vaadin.ui

Examples of com.vaadin.ui.InlineDateField


        Button button = new Button("Boo");
        button.setWidth("100%");
        Button button2 = new Button("Abc");
        button2.setWidth("100%");
        row.addComponents(button, new InlineDateField(), new CheckBox("Far"));

        p.setContent(row);

        p = new Panel();
        // layout.addComponent(p);
        p.setHeight("400px");

        VerticalLayout col = new VerticalLayout();
        col.setSizeFull();
        col.setSpacing(true);
        // row.setMargin(true);
        col.setDefaultComponentAlignment(Alignment.BOTTOM_CENTER);

        col.addComponents(new Button("Boo"), new InlineDateField(),
                new CheckBox("Far"), new Button("Abc"));

        p.setContent(col);

        TreeTable table = new TreeTable();
View Full Code Here


    private <T extends Field> T createDateField(Class<?> type,
            Class<T> fieldType) {
        AbstractField field;

        if (InlineDateField.class.isAssignableFrom(fieldType)) {
            field = new InlineDateField();
        } else if (DateField.class.isAssignableFrom(fieldType)
                || fieldType == Field.class) {
            field = new PopupDateField();
        } else if (AbstractTextField.class.isAssignableFrom(fieldType)) {
            field = createAbstractTextField((Class<? extends AbstractTextField>) fieldType);
View Full Code Here

        setDate(date);
        date.setResolution(Resolution.DAY);
        date.addStyleName("huge");
        row.addComponent(date);

        date = new InlineDateField("Date picker");
        setDate(date);
        setDateRange(date);
        row.addComponent(date);

        date = new InlineDateField("Date picker with week numbers");
        setDate(date);
        date.setLocale(new Locale("fi", "fi"));
        date.setShowISOWeekNumbers(true);
        row.addComponent(date);
View Full Code Here

        table.addContainerProperty("" + 6, PopupView.class, null);
        table.addContainerProperty("" + 7, PopupView.class, null);
        table.setPageLength(20);
        for (int i = 0; i < 1000; i++) {

            final InlineDateField df = new InlineDateField("", new Date());
            PopupView pp = new PopupView(new PopupView.Content() {
                @Override
                public String getMinimizedValueAsHTML() {
                    return String.valueOf(df.getValue());
                }

                @Override
                public Component getPopupComponent() {
                    return df;
View Full Code Here

        fields.add(new ComboBox());
        fields.add(new NativeSelect());
        fields.add(new ListSelect());
        fields.add(new TextField());
        fields.add(new PopupDateField());
        fields.add(new InlineDateField());
        OptionGroup og = new OptionGroup();
        og.addItem("Item 1");
        og.addItem("Item 2");
        fields.add(og);
        TreeTable tt = new TreeTable();
View Full Code Here

    public SettingsView(final Navigator navigator) {
        this.navigator = navigator;
        Layout layout = new VerticalLayout();

        date = new InlineDateField("Birth date");
        date.setImmediate(true);
        layout.addComponent(date);
        // pretend we have a datasource:
        date.setPropertyDataSource(new ObjectProperty<Date>(new Date()));
        date.setBuffered(true);
View Full Code Here

        return 6718;
    }

    private DateField makeDateField(boolean isPopup, Locale locale,
            String caption) {
        DateField df = isPopup ? new PopupDateField() : new InlineDateField();
        df.setResolution(DateField.RESOLUTION_DAY);
        df.setValue(date.getTime());
        df.setLocale(locale);
        df.setCaption(caption);
        return df;
View Full Code Here

            Date value, Resolution resolution, boolean inline) {

        DateField df = null;

        if (inline) {
            df = new InlineDateField();
        } else {
            df = new DateField();
        }

        final DateField gg = df;
View Full Code Here

    }

    @Override
    protected void initializeComponents() {

        InlineDateField hidden = new InlineDateField();
        hidden.setVisible(false); // Used to break rest of layout #8693
        addComponent(hidden);

        Locale locale = LOCALES[0];

        InlineDateField pd = createInlineDateField("Undefined width", "-1",
                locale);
        pd.setId("Locale-" + locale.toString() + "-undefined-wide");
        addTestComponent(pd);
        pd = createInlineDateField("300px width", "300px", locale);
        pd.setId("Locale-" + locale.toString() + "-300px-wide");
        addTestComponent(pd);
        pd = createInlineDateField("Initially empty", "", locale);
        pd.setValue(null);
        pd.setId("Locale-" + locale.toString() + "-initially-empty");
        addTestComponent(pd);

    }
View Full Code Here

    }

    private InlineDateField createInlineDateField(String caption, String width,
            Locale locale) {
        InlineDateField pd = new InlineDateField(caption + "("
                + locale.toString() + ")");
        pd.setWidth(width);
        pd.setValue(new Date(12312312313L));
        pd.setLocale(locale);
        pd.setResolution(Resolution.YEAR);

        return pd;
    }
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.