protected double getBLockWidth(Region region) { if (region.getMinWidth() != -1) { return region.getMinWidth(); } if (region.getPrefWidth() != USE_COMPUTED_SIZE) { return region.getPrefWidth(); } else { return region.prefWidth(-1); } }
protected boolean validWidth(BoundingBox box, Region region, double cellW, double gutterX, double gutterY) { boolean valid = false; if (region.getMinWidth() != -1 && box.getWidth() * cellW + (box.getWidth() - 1) * 2 * gutterX < region.getMinWidth()) { return false; } if (region.getPrefWidth() == USE_COMPUTED_SIZE && box.getWidth() * cellW + (box.getWidth() - 1) * 2 * gutterX >= region .prefWidth(-1)) { valid = true; } if (region.getPrefWidth() != USE_COMPUTED_SIZE && box.getWidth() * cellW + (box.getWidth() - 1) * 2 * gutterX >= region .getPrefWidth()) { valid = true; } return valid; }
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; }
protected double getBLockWidth(Region region) { if (region.getMinWidth() != -1) { return region.getMinWidth(); } if (region.getPrefWidth() != USE_COMPUTED_SIZE) { return region.getPrefWidth(); } else { return region.prefWidth(-1); } }
@Override protected double computePrefWidth( double height ){ double labelWidth = labelHasContent() ? getFieldSet().getForm().getLabelContainerWidth(height) : 0.0; double inputWidth = getInputContainer().prefWidth(height); if( isVerticalLabelPosition() ){ return Math.max( labelWidth, inputWidth ) + getHorizontalInsets(); } else { return labelWidth + inputWidth + getHorizontalInsets(); } }
protected boolean validWidth(BoundingBox box, Region region, double cellW, double gutterX, double gutterY) { boolean valid = false; if (region.getMinWidth() != -1 && box.getWidth() * cellW + (box.getWidth() - 1) * 2 * gutterX < region.getMinWidth()) { return false; } if (region.getPrefWidth() == USE_COMPUTED_SIZE && box.getWidth() * cellW + (box.getWidth() - 1) * 2 * gutterX >= region .prefWidth(-1)) { valid = true; } if (region.getPrefWidth() != USE_COMPUTED_SIZE && box.getWidth() * cellW + (box.getWidth() - 1) * 2 * gutterX >= region .getPrefWidth()) { valid = true; } return valid; }
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; }