本文整理了Java中javafx.scene.text.Text.prefHeight()
方法的一些代码示例,展示了Text.prefHeight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.prefHeight()
方法的具体详情如下:
包路径:javafx.scene.text.Text
类名称:Text
方法名:prefHeight
暂无
代码示例来源:origin: no.tornado/tornadofx-controls
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
double h = text.prefHeight(width);
if (getSkinnable().getGraphic() != null && iconPosition().isHorizontal())
h += Math.max(getSkinnable().getGraphic().prefHeight(-1), graphicFixedSize());
return h + topInset + bottomInset;
}
代码示例来源:origin: no.tornado/tornadofx-controls
text.resizeRelocate(centeredX, y, text.prefWidth(-1), text.prefHeight(-1));
break;
text.resizeRelocate(centeredX, y, text.prefWidth(-1), text.prefHeight(-1));
y += text.prefHeight(-1);
double fixedSize = graphicFixedSize();
if (fixedSize > graphic.getLayoutBounds().getHeight())
double centeredY = y + (h / 2) - text.prefHeight(-1) / 2;
text.resizeRelocate(x, centeredY, text.prefWidth(-1), text.prefHeight(-1));
double centeredY = y + (h / 2) - text.prefHeight(-1) / 2;
text.resizeRelocate(x, centeredY, text.prefWidth(-1), text.prefHeight(-1));
break;
代码示例来源:origin: org.jfxtras/jfxtras-common
label.setManaged(false);
label.setLayoutX(3.0);
label.setLayoutY(label.prefHeight(0));
label.setMouseTransparent(true);
getChildren().add(label);
Rectangle lClip = new Rectangle(0,-label.prefHeight(0),0,0);
lClip.widthProperty().bind(this.widthProperty().subtract(label.layoutXProperty()));
lClip.heightProperty().bind(this.heightProperty());
内容来源于网络,如有侵权,请联系作者删除!