Examples of StyledTooltipImage


Examples of org.onesocialweb.gwt.client.ui.widget.StyledTooltipImage

  }

  private void addPictureAttachment(ActivityObject object) {

    StyledFlowPanel attachment = new StyledFlowPanel("wrapper");
    StyledTooltipImage attachmentIcon = new StyledTooltipImage(OswClient
        .getInstance().getPreference("theme_folder")
        + "assets/i-attachment.png", "icon", "");
    StyledFlowPanel attachmentFlow = new StyledFlowPanel("image");
    StyledFlowPanel wrapper = new StyledFlowPanel("metadata");
    StyledLabel title = new StyledLabel("title", "");
    StyledLabel description = new StyledLabel("description", "");
    attachment.add(attachmentIcon);
    attachment.add(attachmentFlow);
    attachment.add(wrapper);
    wrapper.add(title);
    attachmentswrapper.add(attachment);

    // show the link elements
    for (int i = 0; i < object.getLinks().size(); i++) {
      // get the url to the picture
      if (object.hasLinks() && object.getLinks().get(0).hasRel()
          && object.getLinks().get(i).getRel().equals("alternate")) {

        // get the link to the image
        final StyledTooltipImage image = new StyledTooltipImage(object
            .getLinks().get(i).getHref(), "attachment",
            uiText.ShowPreview());

        image.addStyleName("link");

        // if the activity has a title
        if (activity.hasTitle() && activity.getTitle().length() > 0) {

          // and the link has a title as well
          if (object.getLinks().get(i).hasTitle()
              && object.getLinks().get(i).getTitle().length() > 0) {

            // check if they are the same and skip it on the link if
            // so
            // TODO this needs to be refactored to the
            // object.getTitle()
            if (!activity.getTitle().trim().equals(
                object.getLinks().get(i).getTitle().trim())) {
              title.setText(object.getLinks().get(i).getTitle());
            }

          }

          // otherwise we can show it
          // TODO this needs to be refactored to the object.getTitle()
        } else {
          title.setText(object.getLinks().get(i).getTitle());
        }

        attachmentFlow.add(image);

        image.addClickHandler(new ClickHandler() {
          public void onClick(ClickEvent event) {
            PicturePreviewDialog.getInstance().showDialog(
                image.getUrl(), uiText.ImagePreview());
          }
        });
      }
    }
View Full Code Here

Examples of org.onesocialweb.gwt.client.ui.widget.StyledTooltipImage

  }

  private void addVideoAttachment(String url) {

    StyledFlowPanel attachment = new StyledFlowPanel("wrapper");
    StyledTooltipImage attachmentIcon = new StyledTooltipImage(OswClient
        .getInstance().getPreference("theme_folder")
        + "assets/i-attachment.png", "icon", "");
    FlowPanel attachmentFlow = new FlowPanel();
    HTML movie = new HTML();
    movie
View Full Code Here

Examples of org.onesocialweb.gwt.client.ui.widget.StyledTooltipImage

    // check the links
    for (int i = 0; i < object.getLinks().size(); i++) {
      if (object.getLinks().get(i).getRel().equals("alternate")) {
        StyledFlowPanel attachment = new StyledFlowPanel("wrapper");
        StyledTooltipImage attachmentIcon = new StyledTooltipImage(
            OswClient.getInstance().getPreference("theme_folder")
                + "assets/i-attachment.png", "icon", "");
        FlowPanel attachmentFlow = new FlowPanel();

        attachment.add(attachmentIcon);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.