Package com.vaadin.ui

Examples of com.vaadin.ui.CheckBox


            table.addContainerProperty("checkbox", TextField.class, null);
            table.addGeneratedColumn("checkbox", new ColumnGenerator() {
                @Override
                public Object generateCell(Table source, Object itemId,
                        Object columnId) {
                    CheckBox cb = new CheckBox(null, true);
                    return cb;
                }
            });

            table.addContainerProperty("optiongroup", TextField.class, null);
View Full Code Here


            }
        });
    }

    private void initHideWeekEndButton() {
        hideWeekendsButton = new CheckBox("Hide weekends");
        hideWeekendsButton.setImmediate(true);
        hideWeekendsButton
                .addValueChangeListener(new Property.ValueChangeListener() {

                    private static final long serialVersionUID = 1L;
View Full Code Here

        }

    }

    private void initReadOnlyButton() {
        readOnlyButton = new CheckBox("Read-only mode");
        readOnlyButton.setImmediate(true);
        readOnlyButton
                .addValueChangeListener(new Property.ValueChangeListener() {

                    private static final long serialVersionUID = 1L;
View Full Code Here

                    }
                });
    }

    private void initDisabledButton() {
        disabledButton = new CheckBox("Disabled");
        disabledButton.setImmediate(true);
        disabledButton
                .addValueChangeListener(new Property.ValueChangeListener() {

                    private static final long serialVersionUID = 1L;
View Full Code Here

            Class<? extends CalendarEvent> eventClass) {

        startDateField = createDateField("Start date");
        endDateField = createDateField("End date");

        final CheckBox allDayField = createCheckBox("All-day");
        allDayField.addValueChangeListener(new Property.ValueChangeListener() {

            private static final long serialVersionUID = -7104996493482558021L;

            @Override
            public void valueChange(ValueChangeEvent event) {
View Full Code Here

        scheduleEventFieldGroup.bind(styleNameField, "styleName");
        scheduleEventFieldGroup.bind(allDayField, "allDay");
    }

    private CheckBox createCheckBox(String caption) {
        CheckBox cb = new CheckBox(caption);
        cb.setImmediate(true);
        return cb;
    }
View Full Code Here

        createUI((AbstractOrderedLayout) w.getContent());
    }

    private void createUI(AbstractOrderedLayout layout) {
        Button b = new Button("This is a button");
        CheckBox cb = new CheckBox("This is a checkbox");
        cb.setImmediate(true);
        setTheme("tests-tickets");
        layout.setStyleName("mylayout");
        status = new Label("Result:");
        layout.addComponent(status);
        layout.setSpacing(true);
View Full Code Here

    }

    private void checkCheckBox(Class<? extends CheckBox> class1) {
        boolean ok = false;
        CheckBox b;
        try {
            b = class1.newInstance();
        } catch (Exception e1) {
            e1.printStackTrace();
            return;
        }

        b.setCaption("Button of type " + class1.getSimpleName());
        status.setValue(status.getValue() + " "
                + class1.getClass().getSimpleName() + ": OK");

    }
View Full Code Here

    private CheckBox editMode;

    @Override
    protected void setup() {
        editMode = new CheckBox("Edit mode");
        editMode.setImmediate(true);
        editMode.addListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                table.setEditable(editMode.getValue());

            }
        });

        useCustomConverters = new CheckBox("Use custom converters");
        useCustomConverters.setImmediate(true);
        useCustomConverters.addListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
View Full Code Here

                }
            }
        });
        w.addComponent(tf);

        final CheckBox b = new CheckBox(
                "Field should use error message. (!) should be shown when empty.",
                false);
        w.addComponent(b);
        b.setImmediate(true);
        b.addListener(new Property.ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                tf.setRequiredError(b.getValue() ? "Field must not be empty"
                        : null);
            }
        });
    }
View Full Code Here

TOP

Related Classes of com.vaadin.ui.CheckBox

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.