javafx.scene.image.ImageView.addEventHandler()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(220)

本文整理了Java中javafx.scene.image.ImageView.addEventHandler()方法的一些代码示例,展示了ImageView.addEventHandler()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.addEventHandler()方法的具体详情如下:
包路径:javafx.scene.image.ImageView
类名称:ImageView
方法名:addEventHandler

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(),

相关文章