changeset 3841:2d44c792b77d

Backed out changeset a2978f7aae56
author psomashe
date Wed, 05 Jun 2013 00:01:55 -0700
parents a2978f7aae56
children a6e13c635c15
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TabPaneSkin.java
diffstat 1 files changed, 4 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TabPaneSkin.java	Tue Jun 04 23:14:24 2013 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TabPaneSkin.java	Wed Jun 05 00:01:55 2013 -0700
@@ -466,26 +466,14 @@
 
     private double maxw = 0.0d;
     @Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
-        // The TabPane can only be as wide as it widest content width.  
-        for (TabContentRegion contentRegion: tabContentRegions) {
-            maxw = Math.max(maxw, snapSize(contentRegion.prefWidth(-1)));
-        }
-        double prefwidth = isHorizontal() ?
-        Math.max(maxw, snapSize(tabHeaderArea.prefWidth(-1))) :
-        maxw + snapSize(tabHeaderArea.prefWidth(-1));
-        return snapSize(prefwidth) + rightInset + leftInset; 
+        //RT-24105 optimization : hard coded value instead of the content of the tab 
+        return DEFAULT_PREF_SIZE;
     }
 
     private double maxh = 0.0d;
     @Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
-         // The TabPane can only be as high as it highest content height.
-        for (TabContentRegion contentRegion: tabContentRegions) {
-        maxh = Math.max(maxh, snapSize(contentRegion.prefHeight(-1)));
-        }
-        double prefheight = isHorizontal()?
-        maxh + snapSize(tabHeaderArea.prefHeight(-1)) :
-        Math.max(maxh, snapSize(tabHeaderArea.prefHeight(-1)));
-        return snapSize(prefheight) + topInset + bottomInset; 
+        // RT-24105 optimization : hard coded value instead of the content of the tab
+        return DEFAULT_PREF_SIZE;
     }
 
     @Override public double computeBaselineOffset(double topInset, double rightInset, double bottomInset, double leftInset) {