本文整理了Java中javafx.scene.image.ImageView.setOnMouseClicked()
方法的一些代码示例,展示了ImageView.setOnMouseClicked()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.setOnMouseClicked()
方法的具体详情如下:
包路径:javafx.scene.image.ImageView
类名称:ImageView
方法名:setOnMouseClicked
暂无
代码示例来源:origin: com.cedarsoft.commons/javafx
@Nonnull
public static ImageView createInfoBox(@Nonnull String message) {
ImageView imageView = new ImageView(InfoPopup.class.getResource("info_16.png").toExternalForm());
imageView.setCursor(Cursor.HAND);
imageView.setOnMouseClicked(event -> showInfoPopup(imageView, message));
return imageView;
}
}
代码示例来源:origin: stackoverflow.com
EventHandler mouseHandler = new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent t) {
ImageView imageView = (ImageView) t.getSource();
System.out.println("You clicked " + imageView.getImage());
}
};
for (int i = 0; i < 8; i++) {
ImageView imageView = new ImageView(im[i]);
imageView.setOnMouseClicked(mouseHandler);
flowpane.getChildren().add(imageView);
}
代码示例来源:origin: Tristan971/Lyrebird
private void ppSetupSender(final ImageView ppView, final User user) {
ppView.setVisible(true);
ppView.setManaged(true);
ppView.setOnMouseClicked(e -> userDetailsService.openUserDetails(user));
asyncIO.loadImageMiniature(user.getProfileImageURLHttps(), 128.0, 128.0)
.thenAcceptAsync(ppView::setImage, Platform::runLater);
}
代码示例来源:origin: Tristan971/Lyrebird
@Override
public void initialize() {
userProfilePictureBorder.visibleProperty().bind(sessionManager.isLoggedInProperty());
userProfilePicture.setClip(Clipping.getCircleClip(32.0));
userProfilePicture.setImage(CONTROLBAR_ADD_USER.getImage());
userProfilePicture.setOnMouseClicked(e -> handleClickOnProfile());
bindUsername();
bindProfilePicture();
}
代码示例来源:origin: Tristan971/Lyrebird
/**
* @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());
}
内容来源于网络,如有侵权,请联系作者删除!