public ItemPreview(Item item) { this.item = item; thumbnailUrl = constants.cacheUrl(item.getType(), item.getThumbnail()); buildLayout(); applyStyles(); configureListeners(); }
public void enablePreview() { // if (null != itemDescription) { // itemDescription.activate(); // return; // } itemDescription = new Tooltip( this, new HTML( constants.previewHtml(item.getTitle(), item.getYear(), item.getCreator()), true), this.getAbsoluteLeft(), this.getAbsoluteTop(), dimensions.thumbnailWidth(), dimensions.thumbnailHeight()); itemDescription.setStyleName("tooltip-item"); itemDescription.addStyleName("invisible"); itemDescription.setWidth(dimensions.thumbnailWidth() + "px"); itemDescription.activate(); }
public String getUri() { return item.getUri(); }