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

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

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

ImageView.setLayoutY介绍

暂无

代码示例

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

private void setImage() {
  final InputStream is = getClass().getResourceAsStream("InputPlank.jpg");
  Image img1 = new Image(is,width.doubleValue(), height.doubleValue(), false, true);
  imgView.setImage(img1);
  imgView.setLayoutY(0);
}

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

ornamentView.setLayoutY(MainGameScene.MINMIMAL_DISPLAY_HEIGHT);
int decoHeight = (int) Math.floor(height-MainGameScene.MINMIMAL_DISPLAY_HEIGHT);
String ornamentName;

代码示例来源:origin: stackoverflow.com

title.setImage(img);
title.setLayoutX(569);
title.setLayoutY(146);
title.fitHeightProperty().add(100);
title.fitWidthProperty().add(100);

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

/**
 * Set the image view at the right position.
 * @param width of the parent control
 * @param height of the parent control
 * @param imgView ImageView to be added.
 */
void setImageView(double width, double height, ImageView imgView, ImageScaleState state) {
  getChildren().clear();
  double x = Math.max((width - imgView.getBoundsInLocal().getWidth())/2,0);
  double y = Math.max((height - imgView.getBoundsInLocal().getHeight())/2,0);
  if (x > 0) {
    state.border();
    state.setBorderDirection(EScaleDirection.HORIZONTAL);
    state.setBordered((int) x);
  } else if (y > 0) {
    state.border();
    state.setBorderDirection(EScaleDirection.VERTICAL);
    state.setBordered((int) y);
  }
  imgView.setLayoutX(x);
  imgView.setLayoutY(y);
  getChildren().add(imgView);
}

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

shipCanvas.setLayoutX(x);
imgView.setLayoutY(y);
shipCanvas.setLayoutY(y);

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

ImageView barrel = new BarrelIconView();
barrel.setLayoutX(200 - 26);
barrel.setLayoutY(-12);

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

ImageView barrel = new BarrelIconView();
barrel.setLayoutX(200 - 26);
barrel.setLayoutY(-12);

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

barrel.setLayoutY(-12);

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

double width = tl.getWidth() * scale;
imgView.setLayoutX(offsetX);
imgView.setLayoutY(offsetY);
g.getChildren().addAll(imgView);
offsetX += width - INSET_CORNER_AFTER * scale;
  width = top.getWidth() * scale;
  imgView.setLayoutX(offsetX);
  imgView.setLayoutY(offsetY);
  g.getChildren().addAll(imgView);
  offsetX += width - INSET * scale;
width = tr.getWidth() * scale;
imgView.setLayoutX(offsetX);
imgView.setLayoutY(offsetY);
g.getChildren().addAll(imgView);
offsetX = 0;
  height = left.getHeight() * scale;
  imgView.setLayoutX(0);
  imgView.setLayoutY(offsetY);
  g.getChildren().addAll(imgView);
  imgView = createScaledView(right, scale);
  imgView.setLayoutX(offsetRightBorder);
  imgView.setLayoutY(offsetY);
  g.getChildren().addAll(imgView);
  offsetY += height - INSET * scale;
width = bl.getWidth() * scale;

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

ImageView barrel = new BarrelIconView();
barrel.setLayoutX(200 - 26);
barrel.setLayoutY(-12);

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

imgView.setLayoutY(slot.getY() + offset.getY());
  pane.getChildren().add(imgView);
} else {
  BasicSlot slot = getSlotModel(id);
  placeHolder.setLayoutX(slot.getX());
  placeHolder.setLayoutY(slot.getY());
  pane.getChildren().add(placeHolder);

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

sideView.setLayoutY(70);
sideView.setLayoutX(30);
final EventHandler<? super MouseEvent> historyDisplayHandler = createHistoryDisplayHandler();
ImageView frontView = new ImageView();
frontView.imageProperty().bind(shipFrontImageBinding());
frontView.setLayoutY(70);
frontView.setLayoutX(289);
frontView.setOnMouseReleased(historyDisplayHandler);

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

});
cashPile.setLayoutY(-14);
cashTxt.setLayoutX(cashPile.getLayoutX() + 38 + spacing);
cashTxt.setTextOrigin(VPos.BASELINE);

代码示例来源:origin: com.github.almasb/fxgl-effects

imageView.setScaleY(radius.y * 2 / image.getHeight());
imageView.setLayoutX(x);
imageView.setLayoutY(y);
imageView.setOpacity(alpha);
imageView.setBlendMode(blendMode);

代码示例来源:origin: com.github.almasb/fxgl-base

imageView.setScaleY(radius.y * 2 / image.getHeight());
imageView.setLayoutX(x);
imageView.setLayoutY(y);
imageView.setOpacity(alpha);
imageView.setBlendMode(blendMode);

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

ImageView titleBackground = new ImageView(titleImg);
titleBackground.setLayoutX((frame.getWidth() - titleWidth)/2);
titleBackground.setLayoutY(35);
title.setLayoutY(47);

相关文章