Java Code Examples for javafx.scene.layout.Region#prefHeight()
The following examples show how to use
javafx.scene.layout.Region#prefHeight() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JFXMasonryPane.java From JFoenix with Apache License 2.0 | 6 votes |
protected boolean validHeight(BoundingBox box, Region region, double cellH, double gutterX, double gutterY) { boolean valid = false; if (region.getMinHeight() != -1 && box.getHeight() * cellH + (box.getHeight() - 1) * 2 * gutterY < region.getMinHeight()) { return false; } if (region.getPrefHeight() == USE_COMPUTED_SIZE && box.getHeight() * cellH + (box.getHeight() - 1) * 2 * gutterY >= region .prefHeight(region.prefWidth(-1))) { valid = true; } if (region.getPrefHeight() != USE_COMPUTED_SIZE && box.getHeight() * cellH + (box.getHeight() - 1) * 2 * gutterY >= region .getPrefHeight()) { valid = true; } return valid; }
Example 2
Source File: JFXMasonryPane.java From JFoenix with Apache License 2.0 | 5 votes |
protected double getBLockHeight(Region region) { if (region.getMinHeight() != -1) { return region.getMinHeight(); } if (region.getPrefHeight() != USE_COMPUTED_SIZE) { return region.getPrefHeight(); } else { return region.prefHeight(getBLockWidth(region)); } }