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(), "");
}
}
}
});
}