Package com.vaadin.server

Examples of com.vaadin.server.ExternalResource


        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


        tree.addItem("2. Child 1");
        tree.setParent("2. Child 1", "Root 2");
        tree.addItem("2. Child 2");
        tree.setParent("2. Child 2", "Root 2");
        tree.addContainerProperty("icon", ExternalResource.class,
                new ExternalResource(
                        "http://www.itmill.com/res/images/itmill_logo.gif"));

        tree.addListener(new ItemClickListener() {
            @Override
            public void itemClick(ItemClickEvent event) {
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

        layout.addComponent(desc);
        layout.setExpandRatio(desc, 1.0f);

        Link link = new Link(
                "Source code of this demo application",
                new ExternalResource(
                        "https://github.com/alump/FancyLayouts/blob/master/fancylayouts-demo/src/main/java/org/vaadin/alump/fancylayouts/demo/FancyLayoutsUI.java"));
        layout.addComponent(link);

        Button sourceLink = new Button();
        sourceLink.addStyleName(BaseTheme.BUTTON_LINK);
View Full Code Here

        });
    }

    private List<Resource> getImageResources() {
        List<Resource> list = new ArrayList<Resource>();
        list.add(new ExternalResource("http://misc.siika.fi/fancy-demo1.jpg"));
        list.add(new ExternalResource("http://misc.siika.fi/fancy-demo2.jpg"));
        list.add(new ExternalResource("http://misc.siika.fi/fancy-demo3.jpg"));

        // Image is only added if present in file system. Will not be there
        // unless manually added!
        File fileResImage = new File("/tmp/test.png");
        if (fileResImage.exists()) {
View Full Code Here

        Label label = new Label(LOREM_STR);
        layout.addComponent(label);

        Embedded image = new Embedded();
        image.setSource(new ExternalResource(
                "http://misc.siika.fi/fancy-demo1.jpg"));
        image.setWidth("500px");
        image.setHeight("281px");
        layout.addComponent(image);
View Full Code Here

        Label label = new Label(BECON_STR);
        layout.addComponent(label);

        Embedded image = new Embedded();
        image.setSource(new ExternalResource(
                "http://misc.siika.fi/kaljanhimo.jpg"));
        image.setWidth("300px");
        image.setHeight("187px");
        layout.addComponent(image);
        layout.setComponentAlignment(image, Alignment.MIDDLE_CENTER);
View Full Code Here

  private static final long serialVersionUID = -1307009854319440228L;
  public static final String NAME = "ApplicationView";

  public ApplicationView()
  {
    Link lnk = new Link("Count", new ExternalResource("#!" + CountView.NAME));
    addComponent(lnk);

    lnk = new Link("Message: Hello", new ExternalResource("#!" + MessageView.NAME + "/Hello"));
    addComponent(lnk);

    lnk = new Link("Message: Bye", new ExternalResource("#!" + MessageView.NAME + "/Bye/Goodbye"));
    addComponent(lnk);

    @SuppressWarnings("serial")
    Button logout = new Button("Logout", new Button.ClickListener()
    {
View Full Code Here

    }

    @Override
    public void beforeClientResponse(boolean initial) {
        // Generate magic URL now when UI id and connectorId are known
        iframe.setSource(new ExternalResource(
                ApplicationConstants.APP_PROTOCOL_PREFIX
                        + ApplicationConstants.APP_PATH + '/'
                        + ConnectorResource.CONNECTOR_PATH + '/'
                        + getUI().getUIId() + '/' + getConnectorId() + "/login"));
        super.beforeClientResponse(initial);
View Full Code Here

TOP

Related Classes of com.vaadin.server.ExternalResource

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.