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

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

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

Image.widthProperty介绍

暂无

代码示例

代码示例来源:origin: com.github.freeseawind/NinePatch

@Override
public int getImageWidth(Image img)
{
  return img.widthProperty().intValue();
}

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

/**
 * Create an element that will layout the <code>childNode</code>
 * horizontally centered within a Dialog.
 * @param childNode that should be centered
 * @return wrapping Pane
 */
public Pane center(ImageView childNode) {
  final int width = IDialog.WRAPPING_WIDTH - 24;
  Pane g = new Pane(childNode);
  double in = (width - childNode.getImage().getWidth())/2;
  g.setLayoutX(in);
  childNode.getImage().widthProperty().addListener((observable, oldValue, newValue) -> {
    double inset = (width - childNode.getImage().getWidth())/2;
    g.setLayoutX(inset);
  });
  return g;
}
/**

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

.textProperty()
    .bind(value
        .widthProperty()
        .asString("%.0f").concat(" x ").concat(value.heightProperty().asString("%.0f"))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
this.fileProperties.getChildren().addAll(

代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls

.textProperty()
    .bind(value
        .widthProperty()
        .asString("%.0f").concat(" x ").concat(value.heightProperty().asString("%.0f"))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
this.fileProperties.getChildren().addAll(

相关文章