modules/javafx.controls/src/main/java/javafx/scene/control/skin/TreeCellSkin.java

Print this page




 283 
 284         double pref = super.computeMinHeight(width, topInset, rightInset, bottomInset, leftInset);
 285         Node d = getSkinnable().getDisclosureNode();
 286         return (d == null) ? pref : Math.max(d.minHeight(-1), pref);
 287     }
 288 
 289     /** {@inheritDoc} */
 290     @Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
 291         if (fixedCellSizeEnabled) {
 292             return fixedCellSize;
 293         }
 294 
 295         final TreeCell<T> cell = getSkinnable();
 296 
 297         final double pref = super.computePrefHeight(width, topInset, rightInset, bottomInset, leftInset);
 298         final Node d = cell.getDisclosureNode();
 299         final double prefHeight = (d == null) ? pref : Math.max(d.prefHeight(-1), pref);
 300 
 301         // RT-30212: TreeCell does not honor minSize of cells.
 302         // snapSize for RT-36460
 303         return snapSize(Math.max(cell.getMinHeight(), prefHeight));
 304     }
 305 
 306     /** {@inheritDoc} */
 307     @Override protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
 308         if (fixedCellSizeEnabled) {
 309             return fixedCellSize;
 310         }
 311 
 312         return super.computeMaxHeight(width, topInset, rightInset, bottomInset, leftInset);
 313     }
 314 
 315     /** {@inheritDoc} */
 316     @Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
 317         double labelWidth = super.computePrefWidth(height, topInset, rightInset, bottomInset, leftInset);
 318 
 319         double pw = snappedLeftInset() + snappedRightInset();
 320 
 321         TreeView<T> tree = getSkinnable().getTreeView();
 322         if (tree == null) return pw;
 323 




 283 
 284         double pref = super.computeMinHeight(width, topInset, rightInset, bottomInset, leftInset);
 285         Node d = getSkinnable().getDisclosureNode();
 286         return (d == null) ? pref : Math.max(d.minHeight(-1), pref);
 287     }
 288 
 289     /** {@inheritDoc} */
 290     @Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
 291         if (fixedCellSizeEnabled) {
 292             return fixedCellSize;
 293         }
 294 
 295         final TreeCell<T> cell = getSkinnable();
 296 
 297         final double pref = super.computePrefHeight(width, topInset, rightInset, bottomInset, leftInset);
 298         final Node d = cell.getDisclosureNode();
 299         final double prefHeight = (d == null) ? pref : Math.max(d.prefHeight(-1), pref);
 300 
 301         // RT-30212: TreeCell does not honor minSize of cells.
 302         // snapSize for RT-36460
 303         return snapSizeY(Math.max(cell.getMinHeight(), prefHeight));
 304     }
 305 
 306     /** {@inheritDoc} */
 307     @Override protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
 308         if (fixedCellSizeEnabled) {
 309             return fixedCellSize;
 310         }
 311 
 312         return super.computeMaxHeight(width, topInset, rightInset, bottomInset, leftInset);
 313     }
 314 
 315     /** {@inheritDoc} */
 316     @Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
 317         double labelWidth = super.computePrefWidth(height, topInset, rightInset, bottomInset, leftInset);
 318 
 319         double pw = snappedLeftInset() + snappedRightInset();
 320 
 321         TreeView<T> tree = getSkinnable().getTreeView();
 322         if (tree == null) return pw;
 323