/** * This method asynchronously loads the user's profile picture and banner in the view. */ private void asyncLoadImages() { final User user = targetUserProp.getValue(); asyncIO.loadImage(user.getOriginalProfileImageURLHttps()) .thenAcceptAsync(userProfilePictureImageView::setImage, Platform::runLater); final String bannerUrl = user.getProfileBannerURL(); if (bannerUrl == null) { LOG.debug("No profile banner. Keep background color pixel instead."); } else { asyncIO.loadImage(bannerUrl) .thenAcceptAsync(userBanner::setImage, Platform::runLater); } }
/** * @param statusToDisplay The status to fill user readable information from. */ private void setStatusDisplay(final Status statusToDisplay) { author.setText(statusToDisplay.getUser().getName()); authorId.setText("@" + statusToDisplay.getUser().getScreenName()); time.setText(PRETTY_TIME.format(statusToDisplay.getCreatedAt())); loadTextIntoTextFlow(statusToDisplay); final String ppUrl = statusToDisplay.getUser().getOriginalProfileImageURLHttps(); asyncIO.loadImageMiniature(ppUrl, 96.0, 96.0) .thenAcceptAsync(authorProfilePicture::setImage, Platform::runLater); authorProfilePicture.setOnMouseClicked(e -> userDetailsService.openUserDetails(statusToDisplay.getUser())); readMedias(currentStatus.getValue()); }
.put("BiggerProfileImageURLHttps", user.getBiggerProfileImageURLHttps()) .put("MiniProfileImageURLHttps", user.getMiniProfileImageURLHttps()) .put("OriginalProfileImageURLHttps", user.getOriginalProfileImageURLHttps()) .put("DefaultProfileImage", user.isDefaultProfileImage()) .put("URL", user.getURL())