本文整理了Java中javafx.scene.image.ImageView.translateYProperty()
方法的一些代码示例,展示了ImageView.translateYProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.translateYProperty()
方法的具体详情如下:
包路径:javafx.scene.image.ImageView
类名称:ImageView
方法名:translateYProperty
暂无
代码示例来源:origin: ch.sahits.game/OpenPatricianJavaFX
private void calculateNewDimenstions(OpenPatricianRadioButton radioButton, String text, Image rbBG) {
InputStream is;
final int remainWidth = 28; // width that is left from the background
final int destHight = 27;
final double xStart = rbBG.getWidth();
final int yStart = 0;
Dimension2D dim = sizing.calculate(text, radioButton.getFont());
double width = dim.getWidth();
double destWidth = width-remainWidth + 10;
String fileName = imageFactory.getFileNameExt(destWidth,destHight,remainWidth);
is = getClass().getResourceAsStream(fileName);
Image slab = new Image(is, destWidth, destHight, false, true);
slabView.setImage(slab);
slabView.translateXProperty().set(xStart);
slabView.translateYProperty().set(yStart);
double posX = destWidth/2+(xStart-remainWidth-10);
label.translateXProperty().set(posX);
}
代码示例来源:origin: net.sf.dcutils/dcutils
public void setCenter(Point2D center) {
this.center = center;
this.sprite.translateXProperty().set(this.center.getX() - this.sprite.getImage().getWidth() / 2d);
this.sprite.translateYProperty().set(this.center.getY() - this.sprite.getImage().getHeight() / 2d);
} // END setCenter
内容来源于网络,如有侵权,请联系作者删除!