@Override public int getWidth() { return thumbnail.getWidth(); }
public Preview(Attachment attachment, Thumbnail thumbnail) { this.downloadPath = attachment.getDownloadPath(); this.height = thumbnail.getHeight(); this.width = thumbnail.getWidth(); }
/** * Returns a string representing the internal values of this <code>Thumbnail</code> object. This string contains the * MIME Media type, width and height of this <code>Thumbnail</code> object. * * @return a string representation of this <code>Thumbnail</code> object */ @Override public String toString() { return getClass().getName() + " [MimeType=" + mimeType + ",width=" + getWidth() + ",height=" + getHeight() + ",filename=" + getFilename() + ",attachmentId=" + getAttachmentId() + "]"; } }
return new Thumbnail(thumbnail.getHeight(), thumbnail.getWidth(), thumbnailFile.getName(), attachment.getId(), thumbnail.getMimeType());
public ThumbnailItem apply(Thumbnail thumbnail) { if (thumbnail.getFilename() == null) { return brokenThumbnailItem(attachment, baseUri); } return new ThumbnailItem( uriProvider.getThumbnailUri(baseUri, thumbnail), uriProvider.getAttachmentUri(baseUri, attachment), scaleToThumbnailSize(thumbnail.getWidth(), thumbnail.getHeight())); } };