contentItem.getContent(),
Window.getClientWidth() - WINDOW_PADDING,
Window.getClientHeight() - WINDOW_PADDING) {
@Override
public void onImageLoad(boolean failed) {
PopupImageLoadedEvent event;
if (failed) {
Label brokenLink = new Label(BROKEN_LINK_TEXT);
brokenLink.setStylePrimaryName(Resources.INSTANCE.css().error());
image.setWidget(brokenLink);
image.setSize("250px", "150px");
event = new PopupImageLoadedEvent(250, 150);
} else {
image.setWidget(this);
event = new PopupImageLoadedEvent(this.getDisplayWidth(), this.getDisplayHeight());
}
caption.setText(contentItem.getCaption());
if (!contentItem.getContributorIds().isEmpty()) {
byline.setWidget(new BylineWidget(contentItem, false));
}