Package com.vaadin.ui

Examples of com.vaadin.ui.CheckBox.addListener()


        btn.addListener(focusListener);
        btn.addListener(blurListener);
        nbtn.addListener(focusListener);
        nbtn.addListener(blurListener);
        chkb.addListener(focusListener);
        chkb.addListener(blurListener);
        og.addListener(focusListener);
        og.addListener(blurListener);
        ogm.addListener(focusListener);
        ogm.addListener(blurListener);
View Full Code Here


        final Tree tree = new Tree("Inventory");

        CheckBox checkBox = new CheckBox("Enabled");
        checkBox.setImmediate(true);
        checkBox.setValue(true);
        checkBox.addListener(new ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                tree.setEnabled(!tree.isEnabled());
            }
        });
View Full Code Here

        });
        addComponent(checkBox);
        checkBox = new CheckBox("Drag start");
        checkBox.setImmediate(true);
        checkBox.setValue(true);
        checkBox.addListener(new ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                if (((CheckBox) event.getProperty()).getValue()) {
                    tree.setDragMode(TreeDragMode.NODE);
                } else {
View Full Code Here

    protected Component createBooleanAction(String caption,
            boolean initialState, final Command<T, Boolean> command) {

        CheckBox checkBox = new CheckBox(caption);
        checkBox.addListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                boolean enabled = (Boolean) event.getProperty().getValue();
                doCommand(command, enabled);
View Full Code Here

    @Override
    protected void setup() {
        HorizontalLayout topLayout = new HorizontalLayout();
        addComponent(topLayout);
        CheckBox panelCbox = new CheckBox("Panel");
        panelCbox.addListener(panelListener);
        topLayout.addComponent(panelCbox);
        CheckBox layoutCbox = new CheckBox("Layout");
        layoutCbox.addListener(layoutListener);
        topLayout.addComponent(layoutCbox);
        CheckBox labelCbox = new CheckBox("Label");
View Full Code Here

        addComponent(topLayout);
        CheckBox panelCbox = new CheckBox("Panel");
        panelCbox.addListener(panelListener);
        topLayout.addComponent(panelCbox);
        CheckBox layoutCbox = new CheckBox("Layout");
        layoutCbox.addListener(layoutListener);
        topLayout.addComponent(layoutCbox);
        CheckBox labelCbox = new CheckBox("Label");
        topLayout.addComponent(labelCbox);
        labelCbox.addListener(labelListener);
View Full Code Here

        CheckBox layoutCbox = new CheckBox("Layout");
        layoutCbox.addListener(layoutListener);
        topLayout.addComponent(layoutCbox);
        CheckBox labelCbox = new CheckBox("Label");
        topLayout.addComponent(labelCbox);
        labelCbox.addListener(labelListener);

        panel = new Panel();
        panel.setCaption("Panel caption");
        panel.setId("panel");
        addComponent(panel);
View Full Code Here

        panelLayout.setMargin(true);
        panel.setContent(panelLayout);

        final CheckBox heightSelection = new CheckBox("Undefined height");
        heightSelection.setImmediate(true);
        heightSelection.addListener(new ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                if (heightSelection.getValue() == Boolean.TRUE) {
                    panel.setHeight(null);
                } else {
View Full Code Here

        final Panel panel = new Panel("Test", panelLayout);
        final Button button = new Button("ablebutton");
        panelLayout.addComponent(button);

        CheckBox enable = new CheckBox("Toggle button enabled", true);
        enable.addListener(new Property.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                boolean enabled = (Boolean) event.getProperty().getValue();
                button.setEnabled(enabled);
View Full Code Here

            }
        });
        enable.setImmediate(true);

        CheckBox caption = new CheckBox("Toggle button caption", true);
        caption.addListener(new Property.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                button.setCaption(button.getCaption() + "+");
            }
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.