Package com.vaadin.ui

Examples of com.vaadin.ui.Link


        layout.setSpacing(true);
        layout.setSizeFull();

        // Add some components to the layout
        layout.addComponent(new TextField(null, "Click here"));
        layout.addComponent(new Link("Click here", null));

        Select select = new Select(null, Arrays.asList("Click here"));
        select.select("Click here");
        layout.addComponent(select);

        // Tab content
        VerticalLayout l1 = new VerticalLayout();
        l1.setMargin(true);
        l1.addComponent(new Label("This is a label."));
        l1.addComponent(new TextField(null, "Click here"));
        l1.addComponent(new Link("Click here", null));

        TabSheet t = new TabSheet();
        t.setHeight("200px");
        t.addTab(l1, "Tab", null);
        layout.addComponent(t);

        VerticalLayout nestedLayout = new VerticalLayout();
        nestedLayout.addComponent(new Label("This is a label."));
        nestedLayout.addComponent(new TextField(null, "Click here"));
        nestedLayout.addComponent(new Link("Click here", null));

        HorizontalLayout nestedLayout2 = new HorizontalLayout();
        nestedLayout2.addComponent(new Label("Deeply nested label"));
        nestedLayout.addComponent(nestedLayout2);
View Full Code Here


                VerticalLayout lo = new VerticalLayout();
                lo.addComponent(new Label(
                        "Cannot create application / custom component: "
                                + e1.toString()));

                Link l = new Link("Try opening via app runner",
                        new ExternalResource("../run/" + c.getName()));
                lo.addComponent(l);

                return lo;
            }
View Full Code Here

        w.setContent(layout);
        createUI(layout);
    }

    private void createUI(GridLayout layout) {
        Link l = new Link("Vaadin home (new 200x200 window, no decor, icon)",
                new ExternalResource("http://www.vaadin.com"), "_blank", 200,
                200, BorderStyle.NONE);

        layout.addComponent(l);
    }
View Full Code Here

        // Add links to some proxied urls to tests
        String linkBase = "http://" + request.getLocalName() + ":"
                + connector.getLocalPort() + "/proxypath/";

        linkHolder.removeAllComponents();
        linkHolder.addComponent(new Link("Open embed1 in proxy",
                new ExternalResource(linkBase + "embed1")));
        linkHolder.addComponent(new Link("Open embed1/ in proxy",
                new ExternalResource(linkBase + "embed1/")));
        linkHolder.addComponent(new Link("Open Buttons in proxy",
                new ExternalResource(linkBase
                        + "run/com.vaadin.tests.components.button.Buttons")));

    }
View Full Code Here

                    setContent(layout);

                    layout.addComponent(getRequestInfo("NormalUI", request));

                    String location = getPage().getLocation().toString();
                    Link lazyCreateLink = new Link("Open lazyCreate UI",
                            new ExternalResource(location.replaceFirst(
                                    "(\\?|#|$).*", "?lazyCreate#lazyCreate")));
                    lazyCreateLink.setTargetName("_blank");
                    layout.addComponent(lazyCreateLink);

                    Link lazyInitLink = new Link("Open eagerInit UI",
                            new ExternalResource(location.replaceFirst(
                                    "(\\?|#|$).*", "?eagerInit#eagerInit")));
                    lazyInitLink.setTargetName("_blank");
                    layout.addComponent(lazyInitLink);
                }
            };

            return uI;
View Full Code Here

        }

        if (someAction == null) {
            url = getSession().generateActionURL("someAction");
            try {
                someAction = new Link("An action", new ExternalResource(
                        url.toString()));
                main.addComponent(someAction);
            } catch (Exception e) {
                // Oops
                System.err.println("Could not create someAction: " + e);
View Full Code Here

        MyDynamicResource res = new MyDynamicResource();

        VaadinSession.getCurrent().addRequestHandler(res);

        w.addComponent(new Link(
                "Test (without Content-Disposition, should suggest generatedFile.png when saving, browser default for actual disposition)",
                new ExternalResource("myresource")));

        w.addComponent(new Link(
                "Test (with Content-Disposition, should popup download dialog that suggests  filename downloadedPNG.png)",
                new ExternalResource("myresource_download")));
    }
View Full Code Here

        CheckBox checkBox = new CheckBox();
        main.addComponent(checkBox);
        checkBox.setIcon(icon);

        Link l = new Link("l", icon);
        main.addComponent(l);

        VaadinSession.getCurrent().addRequestHandler(this);
    }
View Full Code Here

        return null;
    }

    @Override
    protected void setup() {
        Link l = new Link("www.google.com", new ExternalResource(
                "http://www.vaadin.com/"));
        l.setIcon(new ThemeResource("../runo/icons/32/calendar.png"));

        addComponent(l);
    }
View Full Code Here

        return 2524;
    }

    @Override
    protected void setup() {
        Link l = new Link("Try it!", new ExternalResource(
                "http://www.google.com/m"));
        l.setTargetName("_blank");
        l.setTargetWidth(300);
        l.setTargetHeight(300);
        l.setTargetBorder(BorderStyle.NONE);
        addComponent(l);
    }
View Full Code Here

TOP

Related Classes of com.vaadin.ui.Link

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.