Examples of Checkbox


Examples of com.vaadin.ui.CheckBox

    @Override
    protected void setup(VaadinRequest request) {
        final Table table = createTable();
        table.setId("table");
        componentDescription = new CheckBox("Tooltip on components");
        componentDescription.addValueChangeListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                table.setContainerDataSource(createContainer(componentDescription
                        .getValue()));
            }
        });
        componentDescription.setImmediate(true);
        componentDescription.setValue(true);
        tableCellItemDescription = new CheckBox("Tooltip on table cells");
        tableCellItemDescription
                .addValueChangeListener(new ValueChangeListener() {

                    @Override
                    public void valueChange(ValueChangeEvent event) {
                        table.refreshRowCache();
                    }
                });
        tableCellItemDescription.setImmediate(true);
        tableCellItemDescription.setValue(true);

        tableRowItemDescription = new CheckBox("Tooltip on table Rows");
        tableRowItemDescription
                .addValueChangeListener(new ValueChangeListener() {

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

Examples of com.vaadin.ui.CheckBox

        table.setSizeFull();
        table.setMultiSelect(true);
        table.setNullSelectionAllowed(true);
        table.setSelectable(true);

        CheckBox selectAllCheckbox = new CheckBox("Select All");
        selectAllCheckbox.addValueChangeListener(new ValueChangeListener() {
            @Override
            public void valueChange(
                    com.vaadin.data.Property.ValueChangeEvent event) {
                Object checked = event.getProperty().getValue();
                if (checked instanceof Boolean) {
View Full Code Here

Examples of com.vaadin.ui.CheckBox

                log.log("Page length: " + pageLength);
            }
        });
        controls.addComponent(pageLength);

        CheckBox cb = new CheckBox("Column 1");
        cb.setValue(true);
        cb.addListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                Boolean value = (Boolean) event.getProperty().getValue();
                tbl.setColumnCollapsed("Column 1", !value);
                if (value) {
                    log.log("Column 1 visible");
                } else {
                    log.log("Column 1 hidden");
                }
            }
        });
        cb.setImmediate(true);
        visibilities.addComponent(cb);

        cb = new CheckBox("Column 2");
        cb.setValue(true);
        cb.addListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                Boolean value = (Boolean) event.getProperty().getValue();
                tbl.setColumnCollapsed("Column 2", !value);

                if (value) {
                    log.log("Column 2 visible");
                } else {
                    log.log("Column 2 hidden");
                }
            }
        });
        cb.setImmediate(true);
        visibilities.addComponent(cb);

        cb = new CheckBox("Column 3");
        cb.setValue(true);
        cb.addListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                Boolean value = (Boolean) event.getProperty().getValue();

                tbl.setColumnCollapsed("Column 3", !value);

                if (value) {
                    log.log("Column 3 visible");
                } else {
                    log.log("Column 3 hidden");
                }
            }
        });
        cb.setImmediate(true);
        visibilities.addComponent(cb);

        addComponent(log);
        addComponent(tbl);
View Full Code Here

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

Examples of com.vaadin.ui.CheckBox

            }
        });
    }

    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

Examples of com.vaadin.ui.CheckBox

        }

    }

    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

Examples of com.vaadin.ui.CheckBox

                    }
                });
    }

    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

Examples of com.vaadin.ui.CheckBox

            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

Examples of com.vaadin.ui.CheckBox

        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

Examples of com.vaadin.ui.CheckBox

        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
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.