Examples of addClickListener()


Examples of com.vaadin.ui.Button.addClickListener()

                });

        Button buttonRemoveAllAddOne = new Button(
                "Remove all items and add only one new item");
        buttonRemoveAllAddOne.setId("buttonRemoveAllAddOne");
        buttonRemoveAllAddOne.addClickListener(new ClickListener() {

            @Override
            public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
                cont.removeAllItems();
                TableItem ti = new TableItem();
View Full Code Here

Examples of com.vaadin.ui.Button.addClickListener()

        // This should be the last test as it changes the table datasource
        Button buttonReplaceByNewDatasource = new Button(
                "Remove all items and add new datasource");
        buttonReplaceByNewDatasource.setId("buttonReplaceByNewDatasource");
        buttonReplaceByNewDatasource.addClickListener(new ClickListener() {

            @Override
            public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
                cont.removeAllItems();
                BeanItemContainer<TableItem> newContainer = new BeanItemContainer<TableItem>(
View Full Code Here

Examples of com.vaadin.ui.Button.addClickListener()

    public void setup(VaadinRequest request) {
        table.setWidth("100%");
        table.setContainerDataSource(container);

        Button button = new Button("START");
        button.addClickListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                ++clickCount;
View Full Code Here

Examples of com.vaadin.ui.Button.addClickListener()

        final Label label1 = new Label("1");
        final Label label2 = new Label("2");

        Button button = new Button("Replace label");
        button.addClickListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                if (verticalLayout.getComponentIndex(label1) > -1) {
                    verticalLayout.replaceComponent(label1, label2);
View Full Code Here

Examples of com.vaadin.ui.Button.addClickListener()

        table.setContainerDataSource(cont);
        table.setSelectable(true);

        Button buttonRestore = new Button("Restore table rows");
        buttonRestore.setId("buttonRestore");
        buttonRestore.addClickListener(new ClickListener() {

            @Override
            public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
                cont.removeAllItems();
                cont.addAll(restoringItemList);
View Full Code Here

Examples of com.vaadin.ui.Button.addClickListener()

            }
        });

        Button buttonReAddAllViaAddAll = new Button("Re-add rows all at once");
        buttonReAddAllViaAddAll.setId("buttonReAddAllViaAddAll");
        buttonReAddAllViaAddAll.addClickListener(new ClickListener() {

            @Override
            public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
                List<TableItem> originalItemIds = new ArrayList<TableItem>(cont
                        .getItemIds());
View Full Code Here

Examples of com.vaadin.ui.Button.addClickListener()

        Button buttonReplaceByAnotherCollectionViaAddAll = new Button(
                "Replace by another items (via addAll())");
        buttonReplaceByAnotherCollectionViaAddAll
                .setId("buttonReplaceByAnotherCollectionViaAddAll");
        buttonReplaceByAnotherCollectionViaAddAll
                .addClickListener(new ClickListener() {

                    @Override
                    public void buttonClick(
                            com.vaadin.ui.Button.ClickEvent event) {
View Full Code Here

Examples of com.vaadin.ui.Button.addClickListener()

        Button buttonReplaceByAnotherCollectionViaAdd = new Button(
                "Replace by another items (via add(), add()..)");
        buttonReplaceByAnotherCollectionViaAdd
                .setId("buttonReplaceByAnotherCollectionViaAdd");
        buttonReplaceByAnotherCollectionViaAdd
                .addClickListener(new ClickListener() {

                    @Override
                    public void buttonClick(
                            com.vaadin.ui.Button.ClickEvent event) {
View Full Code Here

Examples of com.vaadin.ui.Button.addClickListener()

        final VerticalLayout statusLayout = new VerticalLayout();
        statusLayout.setMargin(true);
        final Panel status = new Panel("Events", statusLayout);
        final Button clear = new Button("c");
        clear.addClickListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                statusLayout.removeAllComponents();
                statusLayout.addComponent(clear);
            }
View Full Code Here

Examples of com.vaadin.ui.Button.addClickListener()

        final Label label = new Label();
        label.setId(COUNT_OF_SELECTED_ROWS_LABEL);
        label.setCaption("Selected count:");
        addComponent(label);

        button.addClickListener(new Button.ClickListener() {

            @Override
            public void buttonClick(Button.ClickEvent event) {
                Set selected = (Set) table.getValue();
                label.setValue(String.valueOf(selected.size()));
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.