本文整理了Java中javafx.scene.Node.prefHeight()
方法的一些代码示例,展示了Node.prefHeight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.prefHeight()
方法的具体详情如下:
包路径:javafx.scene.Node
类名称:Node
方法名:prefHeight
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
@Override
protected double computePrefHeight(double width) {
return control.prefHeight(width);
}
};
代码示例来源:origin: jfoenixadmin/JFoenix
@Override
protected double computePrefHeight(double width) {
double height = 0.0F;
for (Node child : getChildren()) {
if (child instanceof TabHeaderContainer) {
height = Math.max(height, child.prefHeight(width));
}
}
return snapSize(height) + snappedTopInset() + snappedBottomInset();
}
代码示例来源:origin: jfoenixadmin/JFoenix
@Override
protected double computePrefHeight(double width) {
if (!getChildren().isEmpty()) {
return getChildren().get(0).prefHeight(width);
}
return super.computePrefHeight(width);
}
代码示例来源:origin: jfoenixadmin/JFoenix
double newAnimatedHeight = newNode.prefHeight(-1) * (expandedProperty.get() ? 1 : -1);
double newHeight = expandedProperty.get() ? this.getHeight() + newAnimatedHeight : this.prefHeight(
-1);
((Region) cellContent).setMaxHeight(cellContent.prefHeight(-1));
setGraphic(cellContent);
代码示例来源:origin: org.controlsfx/controlsfx
@Override
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
return content == null ? 0 : content.prefHeight(width);
};
代码示例来源:origin: org.controlsfx/controlsfx
@Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
double insets = topInset + bottomInset;
return insets + (content == null ? 0 : content.prefHeight(width));
}
代码示例来源:origin: org.fxmisc.flowless/flowless
@Override
protected double computePrefHeight(double width) {
return content.prefHeight(width);
}
代码示例来源:origin: org.fxmisc.flowless/flowless
@Override
public double prefBreadth(Node node) {
return node.prefHeight(-1);
}
代码示例来源:origin: org.fxmisc.flowless/flowless
@Override
public double prefLength(Node node, double breadth) {
return node.prefHeight(breadth);
}
代码示例来源:origin: com.jfoenix/jfoenix
@Override
protected double computePrefHeight(double width) {
return control.prefHeight(width);
}
};
代码示例来源:origin: org.jfxtras/jfxtras-common
private double calculateNodeHeight(Node n, MinPrefMax size) {
if (size == MinPrefMax.MIN) {
return n.minHeight(-1);
}
if (size == MinPrefMax.MAX) {
return n.maxHeight(-1);
}
return n.prefHeight(-1);
}
代码示例来源:origin: no.tornado/tornadofx-controls
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
double prefHeight;
if (getSkinnable().getOrientation() == Orientation.VERTICAL)
prefHeight = acc(n -> n.prefHeight(width)) + topInset + bottomInset;
else
prefHeight = biggest(n -> n.prefHeight(width)) + topInset + bottomInset;
return Math.max(prefHeight, getSkinnable().getPrefHeight());
}
代码示例来源:origin: no.tornado/tornadofx-controls
private double getPrefRowHeight() {
double editorHeight = getSkinnable().getEditor().prefHeight(-1);
if (getChildren().isEmpty())
return editorHeight;
else
return Math.max(editorHeight, getChildren().get(0).prefHeight(-1));
}
代码示例来源:origin: com.jfoenix/jfoenix
@Override
protected double computePrefHeight(double width) {
double height = 0.0F;
for (Node child : getChildren()) {
if (child instanceof TabHeaderContainer) {
height = Math.max(height, child.prefHeight(width));
}
}
return snapSize(height) + snappedTopInset() + snappedBottomInset();
}
代码示例来源:origin: no.tornado/tornadofx-controls
/**
* Add the preferred height of the expanded Node whenever the expanded flag is true.
*
* @return The preferred height of the TableRow, appended with the preferred height of the expanded node
* if this row is currently expanded.
*/
@Override
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
tableRowPrefHeight = super.computePrefHeight(width, topInset, rightInset, bottomInset, leftInset);
return isExpanded() ? tableRowPrefHeight + getContent().prefHeight(width) : tableRowPrefHeight;
}
代码示例来源:origin: org.controlsfx/controlsfx
/**
* Add the preferred height of the expanded Node whenever the expanded flag is true.
*
* @return The preferred height of the TableRow, appended with the preferred height of the expanded node
* if this row is currently expanded.
*/
@Override
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
tableRowPrefHeight = super.computePrefHeight(width, topInset, rightInset, bottomInset, leftInset);
return isExpanded() ? tableRowPrefHeight + getContent().prefHeight(width) : tableRowPrefHeight;
}
代码示例来源:origin: org.controlsfx/controlsfx
@Override
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
if (getSkinnable().getOrientation().equals(Orientation.HORIZONTAL)) {
OptionalDouble maxHeight = getChildren().stream().mapToDouble(node -> node.prefHeight(-1)).max();
if (maxHeight.isPresent()) {
return maxHeight.getAsDouble();
}
}
return getSkinnable().getPrefHeight();
}
代码示例来源:origin: com.jfoenix/jfoenix
@Override
protected double computePrefHeight(double width) {
if (!getChildren().isEmpty()) {
return getChildren().get(0).prefHeight(width);
}
return super.computePrefHeight(width);
}
代码示例来源: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: org.eclipse.fx/org.eclipse.fx.ui.panes
private static Size computeSize(@NonNull Node control, boolean flushCache) {
int wHint = FX_DEFAULT, hHint = FX_DEFAULT;
RowData data = getConstraint(control);
if (data != null) {
wHint = data.getWidth();
hHint = data.getHeight();
}
return new Size(control.prefWidth(wHint), control.prefHeight(hHint));
}
内容来源于网络,如有侵权,请联系作者删除!