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

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

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

ImageView.layoutYProperty介绍

暂无

代码示例

代码示例来源:origin: ch.sahits.game/OpenPatricianJavaFX

private DoubleBinding shieldYOffsetBinding() {
  return shipIconView.layoutYProperty().add(shipIcon.getHeight() * ICON_SCALE - 0.5 * shipIcon.getHeight() * ICON_SCALE + SHIELD_Y_OFFSET);
}

代码示例来源:origin: ch.sahits.game/OpenPatricianJavaFX

private ImageView createPirateIndicator() {
  Image shieldImg = imageLoader.getImage("icons/pirateIndicator" );
  ImageView imgView = new ImageView(shieldImg);
  DoubleBinding relYOrigin = shieldYOffsetBinding();
  imgView.layoutYProperty().bind(relYOrigin);
  imgView.layoutXProperty().bind(shipIconView.layoutXProperty());
  return imgView;
}

代码示例来源:origin: ch.sahits.game/OpenPatricianJavaFX

private ImageView createShield(INavigableVessel vessel) {
  Image shieldImg = imageLoader.getImage("icons/Shield_" + getShieldColorName(vessel));
  ImageView imgView = new ImageView(shieldImg);
  imgView.setLayoutX(shipIconView.getLayoutX());
  DoubleBinding relYOrigin = shieldYOffsetBinding();
  imgView.layoutYProperty().bind(relYOrigin);
  imgView.layoutXProperty().bind(shipIconView.layoutXProperty());
  return imgView;
}

代码示例来源:origin: Tristan971/Lyrebird

);
clipRectangle.layoutXProperty().bind(imageView.layoutXProperty());
clipRectangle.layoutYProperty().bind(imageView.layoutYProperty());
imageView.setClip(clipRectangle);
containerPane.getChildren().setAll(imageView);

相关文章