Package com.vaadin.ui

Examples of com.vaadin.ui.Link


        Label desc = new Label(sb.toString());
        desc.addStyleName("demo-desc");
        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);
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

      addProfileInputField(contactLayout, i18nManager.getMessage(Messages.PROFILE_PHONE), phoneField, phone);
    }
   
    // Twitter
    if (!editable && isDefined(twitterName)) {
      Link twitterLink = new Link(twitterName, new ExternalResource("http://www.twitter.com/"+twitterName));
      addProfileEntry(contactLayout, i18nManager.getMessage(Messages.PROFILE_TWITTER), twitterLink);
    } else if (editable) {
      twitterField = new TextField();
      addProfileInputField(contactLayout, i18nManager.getMessage(Messages.PROFILE_TWITTER), twitterField, twitterName);
    }
View Full Code Here

        StreamResource.StreamSource streamSource = new StreamSource() {
          public InputStream getStream() {
            return repositoryService.getResourceAsStream(deployment.getId(), resourceName);
          }
        };
        Link resourceLink = new Link(resourceName, new StreamResource(streamSource, resourceName, ExplorerApp.get()));
        resourceLinksLayout.addComponent(resourceLink);
      }
    }
  }
View Full Code Here

    verticalLayout.setComponentAlignment(LinkLayout, Alignment.MIDDLE_CENTER);
   
    Label fullSizeLabel = new Label(ExplorerApp.get().getI18nManager().getMessage(Messages.RELATED_CONTENT_SHOW_FULL_SIZE));
    LinkLayout.addComponent(fullSizeLabel);
   
    Link link = null;
    if(attachment.getUrl() != null) {
      link = new Link(attachment.getUrl(), new ExternalResource(attachment.getUrl()));
    } else {
      taskService = ProcessEngines.getDefaultProcessEngine().getTaskService();
      Resource res = new StreamResource(new InputStreamStreamSource(taskService.getAttachmentContent(attachment.getId())),
              attachment.getName() + extractExtention(attachment.getType()),ExplorerApp.get());
     
      link = new Link(attachment.getName(), res);
    }
   
    link.setIcon(Images.RELATED_CONTENT_PICTURE);
    link.setTargetName(ExplorerLayout.LINK_TARGET_BLANK);     
    LinkLayout.addComponent(link);
   
    return verticalLayout;
  }
View Full Code Here

   
    // Image
    linkLayout.addComponent(new Embedded(null, getImage(attachment)));
   
    // Link
    Link link = null;
    if(attachment.getUrl() != null) {
      link = new Link(attachment.getUrl(), new ExternalResource(attachment.getUrl()));
    } else {
      TaskService taskService = ProcessEngines.getDefaultProcessEngine().getTaskService();
      Resource res = new StreamResource(new InputStreamStreamSource(taskService.getAttachmentContent(attachment.getId())),
              attachment.getName() + extractExtention(attachment.getType()),ExplorerApp.get());
     
      link = new Link(attachment.getName(), res);
    }
   
    // Set generic image and external window
    link.setTargetName(ExplorerLayout.LINK_TARGET_BLANK);     
    linkLayout.addComponent(link);
   
    return verticalLayout;
  }
View Full Code Here

      addProfileInputField(contactLayout, i18nManager.getMessage(Messages.PROFILE_PHONE), phoneField, phone);
    }
   
    // Twitter
    if (!editable && isDefined(twitterName)) {
      Link twitterLink = new Link(twitterName, new ExternalResource("http://www.twitter.com/"+twitterName));
      addProfileEntry(contactLayout, i18nManager.getMessage(Messages.PROFILE_TWITTER), twitterLink);
    } else if (editable) {
      twitterField = new TextField();
      addProfileInputField(contactLayout, i18nManager.getMessage(Messages.PROFILE_TWITTER), twitterField, twitterName);
    }
View Full Code Here

          parent.showAttachmentDetail(attachment);
        }
      });
      return attachmentLink;
    } else {
      return new Link(attachment.getName(), new ExternalResource(attachment.getUrl()));
    }
  }
View Full Code Here

    verticalLayout.setComponentAlignment(LinkLayout, Alignment.MIDDLE_CENTER);
   
    Label fullSizeLabel = new Label(ExplorerApp.get().getI18nManager().getMessage(Messages.RELATED_CONTENT_SHOW_FULL_SIZE));
    LinkLayout.addComponent(fullSizeLabel);
   
    Link link = null;
    if(attachment.getUrl() != null) {
      link = new Link(attachment.getUrl(), new ExternalResource(attachment.getUrl()));
    } else {
      taskService = ProcessEngines.getDefaultProcessEngine().getTaskService();
      Resource res = new StreamResource(new InputStreamStreamSource(taskService.getAttachmentContent(attachment.getId())),
              attachment.getName() + extractExtention(attachment.getType()),ExplorerApp.get());
     
      link = new Link(attachment.getName(), res);
    }
   
    link.setIcon(Images.RELATED_CONTENT_PICTURE);
    link.setTargetName(ExplorerLayout.LINK_TARGET_BLANK);     
    LinkLayout.addComponent(link);
   
    return verticalLayout;
  }
View Full Code Here

   
    // Icon
    linkLayout.addComponent(new Embedded(null, Images.RELATED_CONTENT_URL));
   
    // Link
    Link link = new Link(attachment.getUrl(), new ExternalResource(attachment.getUrl()));
    link.setTargetName(ExplorerLayout.LINK_TARGET_BLANK);
    linkLayout.addComponent(link);
   
    return verticalLayout;
  }
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.