Package com.vaadin.ui

Examples of com.vaadin.ui.PopupView$Content


        return 5059;
    }

    @Override
    protected void setup() {
        PopupView pv = new PopupView(new Content() {

            @Override
            public String getMinimizedValueAsHTML() {
                return "<b>click me</b>";
            }
View Full Code Here


public class DisabledPopupView extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        PopupView popupView = new PopupView("Disabled Popup", new Button("Hi!"));

        popupView.setEnabled(false);

        addComponent(popupView);
    }
View Full Code Here

                "<div style='width: 100%; height: 100%; background: " + bg
                        + "'>" + LoremIpsum.get(2000) + "</div>",
                ContentMode.HTML);
        l.setSizeFull();
        vl.addComponent(l);
        PopupView pv = new PopupView("Click here to popup", p);

        popupViews.add(pv);
        return pv;
    }
View Full Code Here

public class PopupViewAndFragment extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        final PopupView pw = new PopupView("Open", new Label("Oh, hi"));
        addComponent(pw);

        final Button button = new Button("Open and change fragment",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(final ClickEvent event) {
                        pw.setPopupVisible(true);
                        getPage().setUriFragment(
                                String.valueOf(System.currentTimeMillis()));
                    }
                });
        addComponent(button);
View Full Code Here

    private Button b[] = new Button[4];

    @Override
    protected void setup() {
        try {
            pv[0] = new PopupView("Popupview 1 - no component", null);
            addComponent(pv[0]);
            b[0] = new Button("Open popupview 1", new ClickListener() {

                @Override
                public void buttonClick(ClickEvent event) {
                    pv[0].setPopupVisible(true);
                }

            });
        } catch (Exception e) {
            getMainWindow()
                    .showNotification(
                            "Error, 'null content' should not throw an exception at this point",
                            Notification.TYPE_ERROR_MESSAGE);
        }

        try {
            pv[1] = new PopupView(null, new TextField(
                    "Empty html, contains component"));
            addComponent(pv[1]);
            b[1] = new Button("Open popupview 2", new ClickListener() {

                @Override
                public void buttonClick(ClickEvent event) {
                    pv[1].setPopupVisible(true);
                }

            });
        } catch (Exception e) {
            getMainWindow()
                    .showNotification(
                            "Error, 'null html', should not throw an exception at this point",
                            Notification.TYPE_ERROR_MESSAGE);
        }

        try {
            pv[2] = new PopupView(null, null);
            addComponent(pv[2]);
            b[2] = new Button("Open popupview 3", new ClickListener() {

                @Override
                public void buttonClick(ClickEvent event) {
                    pv[2].setPopupVisible(true);
                }

            });
        } catch (Exception e) {
            getMainWindow()
                    .showNotification(
                            "Error, 'null html, null content', should not throw an exception at this point",
                            Notification.TYPE_ERROR_MESSAGE);
        }
        try {
            pv[3] = new PopupView("Popupview 4 - has component", new TextField(
                    "This is the content of popupview 4"));
            addComponent(pv[3]);
            b[3] = new Button("Open popupview 4", new ClickListener() {

                @Override
View Full Code Here

        }
      }
    });
    p.addComponent(hlayout);
   
    PopupView view = new PopupView("Modifier",p);
    view.setDescription("Sélectionnez une ligne de la table");
   
    return view;
  }
View Full Code Here

    @Override
    protected void setup() {
        sub.center();
        getMainWindow().addWindow(sub);
        addComponent(log);
        addComponent(new PopupView("Show popup table", makeTable("Popup",
                KeyCode.P)));
        addComponent(makeTable("Main window", KeyCode.M));
        ((ComponentContainer) sub.getContent()).addComponent(new PopupView(
                "Show popup table", makeTable("Subwindow popup", KeyCode.U)));
    }
View Full Code Here

public class PopupViewWithExtension extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        Label label = new Label("label");
        PopupView view = new PopupView("small", label);

        Responsive.makeResponsive(view);

        addComponent(view);
    }
View Full Code Here

    @Override
    protected void setup() {
        Label popup = new Label("Popup");
        popup.setSizeUndefined();
        addComponent(new PopupView("Click here to open the popup", popup));
    }
View Full Code Here

*/
public class PopupViewResizeWhileOpen extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        PopupView pv = new PopupView(new PopupView.Content() {
            @Override
            public Component getPopupComponent() {
                final VerticalLayout popupComponent = new VerticalLayout();
                popupComponent.setId("content-vl");
                popupComponent.setWidth("640px");
                popupComponent.setHeight("480px");

                Button button = new Button("Change height!",
                        new Button.ClickListener() {
                            @Override
                            public void buttonClick(Button.ClickEvent event) {
                                popupComponent.setHeight("320px");
                            }
                        });

                popupComponent.addComponent(button);
                return popupComponent;
            }

            @Override
            public String getMinimizedValueAsHTML() {
                return "Click me!";
            }
        });
        pv.setHideOnMouseOut(false);
        addComponent(pv);
    }
View Full Code Here

TOP

Related Classes of com.vaadin.ui.PopupView$Content

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.