Package org.waveprotocol.wave.client.doodad.attachment.render

Examples of org.waveprotocol.wave.client.doodad.attachment.render.ImageThumbnailWrapper


      public void onRequestSetFullSizeMode(boolean isOn) {
        element.getMutableDoc().setElementAttribute(element,
            ImageThumbnail.STYLE_ATTR, isOn ? ImageThumbnail.STYLE_FULL : null);
      }
      public void onClickImage() {
        ImageThumbnailWrapper thumbnail = ImageThumbnailWrapper.of(element);
        if (!actionHandler.onClick(thumbnail)) {
          String url = thumbnail.getAttachment().getAttachmentUrl();
          if (url != null) {
            // TODO(nigeltao): Is it necessary to open a window here? All attachments are set to
            // content-disposition=attachment which means the browser should download them.
            // The current implementation means we always get a blank tab.
            Window.open(url, thumbnail.getCaptionText(), "");
          }
        }
      }
    });
  }
View Full Code Here


                    // Still no selection.  Oh well, put it at the end.
                    point = doc.locate(doc.size() - 1);
                  }
                }
                XmlStringBuilder content = ImageThumbnail.constructXml(attachmentId, fileName);
                ImageThumbnailWrapper thumbnail = ImageThumbnailWrapper.of(doc.insertXml(point, content));
                thumbnail.setAttachmentId(attachmentId);
              }
            });

            attachmentView.setAttachmentId(attachmentIdGenerator.newAttachmentId());
            attachmentView.setWaveRef(waveRefToken);
View Full Code Here

      public void onRequestSetFullSizeMode(boolean isOn) {
        element.getMutableDoc().setElementAttribute(element,
            ImageThumbnail.STYLE_ATTR, isOn ? ImageThumbnail.STYLE_FULL : null);
      }
      public void onClickImage() {
        ImageThumbnailWrapper thumbnail = ImageThumbnailWrapper.of(element);
        if (!actionHandler.onClick(thumbnail)) {
          String url = thumbnail.getAttachment().getAttachmentUrl();
          if (url != null) {
            // TODO(nigeltao): Is it necessary to open a window here? All attachments are set to
            // content-disposition=attachment which means the browser should download them.
            // The current implementation means we always get a blank tab.
            Window.open(url, "_blank", "");
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.client.doodad.attachment.render.ImageThumbnailWrapper

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.