Package com.vaadin.ui

Examples of com.vaadin.ui.CssLayout.removeComponent()


        final TextField tf = new TextField("Caption");
        Button b = new Button("Remove field and add new", new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                layout.removeComponent(tf);
                addComponent(new TextField("new field"));

            }

        });
View Full Code Here


                            }
                            next = componentIterator.next();
                        }

                        if (sourceComponent instanceof WrappedLabel) {
                            cssLayout.removeComponent(sourceComponent);
                            wrappedLabel = (WrappedLabel) sourceComponent;
                        }
                        if (dropEvent.getTargetDetails()
                                .getData("verticalLocation").equals("TOP")) {
                            // before reference if dropped on topmost part
View Full Code Here

        pl.addComponent(foo());
        addMore = new Button("Add");
        addMore.addListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                pl.removeComponent(addMore);
                pl.addComponent(foo());
                pl.addComponent(addMore);
            }
        });
        pl.addComponent(addMore);
View Full Code Here

        final TextField tf = new TextField("Caption1");
        Button b = new Button("Remove field ", new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                layout.removeComponent(tf);
            }

        });
        layout.addComponent(tf);
        layout.addComponent(b);
View Full Code Here

          buildMainView();

        } else {
          if (loginPanel.getComponentCount() > 2) {
            // Remove the previous error message
            loginPanel.removeComponent(loginPanel.getComponent(2));
          }
          // Add new error message
          Label error = new Label(
              "Wrong username or password. <span>Hint: try empty values</span>",
              ContentMode.HTML);
View Full Code Here

                save.addClickListener(new ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        if (save.getCaption().equals("Save")) {
                            l.removeStyleName("edit");
                            l.removeComponent(rta);
                            l.addComponent(text, 0);
                            text.setValue(rta.getValue());
                            save.setCaption("");
                            save.removeStyleName("default");
                            save.addStyleName("icon-edit");
View Full Code Here

                            save.removeStyleName("default");
                            save.addStyleName("icon-edit");
                            save.setDescription("Edit");
                        } else {
                            l.addStyleName("edit");
                            l.removeComponent(text);
                            l.addComponent(rta, 0);
                            rta.focus();
                            rta.selectAll();
                            save.setCaption("Save");
                            save.addStyleName("default");
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.