Package com.vaadin.ui

Examples of com.vaadin.ui.Link


                    }
                };
            }
        }, filename);

        Link link = new Link("The link", resource);

        addComponent(link);
    }
View Full Code Here


        table.addGeneratedColumn("link", new Table.ColumnGenerator() {
            @Override
            public Component generateCell(Table source, Object itemId,
                    Object columnId) {
                return new Link("Link", null);
            }
        });

        table.addGeneratedColumn("button", new Table.ColumnGenerator() {
            @Override
View Full Code Here

        return c;
    }

    /** Create new Link and add it to current component container. */
    public Link link() {
        Link c = new Link();
        c.setImmediate(true);
        add(c);
        return c;
    }
View Full Code Here

    /**
     * Create new Link with given caption and add it to current component
     * container.
     */
    public Link link(String caption) {
        Link c = link();
        c.setCaption(caption);
        return c;
    }
View Full Code Here

     * @param linkUrl
     * @param targetName
     * @return
     */
    public Link link(String linkText, String linkUrl, String targetName) {
        Link c = link(linkText);
        c.setResource(new ExternalResource(linkUrl));
        c.setTargetName(targetName);
        return c;
    }
View Full Code Here

        row = new HorizontalLayout();
        row.addStyleName("wrapping");
        row.setSpacing(true);
        addComponent(row);

        Link link = new Link("vaadin.com", new ExternalResource(
                "https://vaadin.com"));
        row.addComponent(link);

        link = new Link("Link with icon", new ExternalResource(
                "https://vaadin.com"));
        link.addStyleName("color3");
        link.setIcon(testIcon.get());
        row.addComponent(link);

        link = new Link("Small", new ExternalResource("https://vaadin.com"));
        link.addStyleName("small");
        row.addComponent(link);

        link = new Link("Large", new ExternalResource("https://vaadin.com"));
        link.addStyleName("large");
        row.addComponent(link);

        link = new Link(null, new ExternalResource("https://vaadin.com"));
        link.setIcon(testIcon.get());
        link.addStyleName("large");
        row.addComponent(link);
    }
View Full Code Here

        final User currentUser = userService.getCurrentUser();

        final List<Link> links = new ArrayList<Link>( 1 );
        final Label email = new Label( currentUser.getNickname() );

        links.add( new Link( Messages.get( "app.logout" ), new ExternalResource( userService.createLogoutURL( requestURI ) ) ) );

        email.setStyleName( "email" );
        authInfo.addComponent( email );

        for( Link link : links ) {
View Full Code Here

        final Label email = new Label( Messages.get( "user.anonymous" ) );

        for( OpenIdProviders provider : OpenIdProviders.values() ) {
            final String providerUrl = provider.getUri();
            final String loginUrl = UserServiceFactory.getUserService().createLoginURL( requestURI, null, providerUrl, Collections.<String> emptySet() );
            links.add( new Link( provider.getName(), new ExternalResource( loginUrl ) ) ); // NOPMD
        }

        email.setStyleName( "email" );
        authInfo.addComponent( email );
View Full Code Here

    edit.addItem("Copy", menuCommand);
    edit.addItem("Paste", menuCommand);
    edit.addSeparator();

    final MenuBar.MenuItem find = edit.addItem("Find/Replace", menuCommand);
    Link sample = new Link("Google search", new ExternalResource(
        "http://www.google.com"));
    sample.setDescription("Visit google.com");
    // Actions can be added inline as well, of course
    find.addItem("Google Search", new Command() {
      /**
       *
       */
 
View Full Code Here

          .getThrowable();

      Label label = new Label(exception.getMessage());
      label.setWidth(-1, Unit.PERCENTAGE);

      Link goToMain = new Link("Go to main", new ExternalResource("/"));

      VerticalLayout layout = new VerticalLayout();
      layout.addComponent(label);
      layout.addComponent(goToMain);
      layout.setComponentAlignment(label, Alignment.MIDDLE_CENTER);
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.