本文整理了Java中javafx.scene.image.ImageView.addEventHandler()
方法的一些代码示例,展示了ImageView.addEventHandler()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.addEventHandler()
方法的具体详情如下:
包路径:javafx.scene.image.ImageView
类名称:ImageView
方法名:addEventHandler
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
huesCircleView.addEventHandler(MouseEvent.MOUSE_DRAGGED, (event) -> {
if (colorsTransition != null) {
colorsTransition.stop();
colorSelector.setTranslateY(y - colorSelector.getPrefHeight() / 2);
});
huesCircleView.addEventHandler(MouseEvent.MOUSE_PRESSED, (event) -> {
double dx = event.getX() - centerX;
double dy = event.getY() - centerY;
slCircleView.addEventHandler(MouseEvent.MOUSE_DRAGGED, (event) -> {
if (selectorTransition != null) {
selectorTransition.stop();
slCircleView.addEventHandler(MouseEvent.MOUSE_PRESSED, (event) -> {
selectorTransition = new CachedTransition(selector, new Timeline(new KeyFrame(Duration.millis(1000),
new KeyValue(selector.translateXProperty(),
代码示例来源:origin: it.unibo.alchemist/alchemist-projectview
private void setDeleteIcon(final GridPane grid, final Label label, final ImageView imgView, final boolean isYaml) {
final Tooltip tooltip = new Tooltip();
tooltip.setText(RESOURCES.getString("delete"));
Tooltip.install(imgView, tooltip);
grid.getChildren().remove(imgView);
grid.add(imgView, 0, 2);
imgView.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
@Override
public void handle(final MouseEvent event) {
label.setText("");
grid.getChildren().remove(imgView);
if (isYaml) {
setSwitchBatchSelected(false);
}
}
});
}
代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay
imgView.addEventHandler(MouseEvent.MOUSE_RELEASED, this::handleMouseClick);
代码示例来源:origin: com.jfoenix/jfoenix
huesCircleView.addEventHandler(MouseEvent.MOUSE_DRAGGED, (event) -> {
if (colorsTransition != null) {
colorsTransition.stop();
colorSelector.setTranslateY(y - colorSelector.getPrefHeight() / 2);
});
huesCircleView.addEventHandler(MouseEvent.MOUSE_PRESSED, (event) -> {
double dx = event.getX() - centerX;
double dy = event.getY() - centerY;
slCircleView.addEventHandler(MouseEvent.MOUSE_DRAGGED, (event) -> {
if (selectorTransition != null) {
selectorTransition.stop();
slCircleView.addEventHandler(MouseEvent.MOUSE_PRESSED, (event) -> {
selectorTransition = new CachedTransition(selector, new Timeline(new KeyFrame(Duration.millis(1000),
new KeyValue(selector.translateXProperty(),
内容来源于网络,如有侵权,请联系作者删除!