changeset 3448:e86efcabcb1f

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/8.0/scrum/controls/jfx/rt
author jgiles
date Tue, 30 Apr 2013 14:49:33 +1200
parents 3bb6f06dc699 2d98a575a794
children da3ded519b2e
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/modena/modena.css
diffstat 4 files changed, 19 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableHeaderRow.java	Mon Apr 29 16:55:45 2013 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableHeaderRow.java	Tue Apr 30 14:49:33 2013 +1200
@@ -45,6 +45,7 @@
 import javafx.geometry.VPos;
 import javafx.scene.control.CheckMenuItem;
 import javafx.scene.control.ContextMenu;
+import javafx.scene.control.Control;
 import javafx.scene.control.Label;
 import javafx.scene.control.TableColumn;
 import javafx.scene.control.TableColumnBase;
@@ -94,7 +95,10 @@
     private void updateTableWidth() {
         // snapping added for RT-19428
         double padding = snapSize(getTablePadding().getLeft()) + snapSize(getTablePadding().getRight());
-        this.tableWidth = snapSize(tableSkin.getSkinnable().getWidth()) - padding;
+        
+        Control c = tableSkin.getSkinnable();
+        this.tableWidth = c == null ? 0 : snapSize(c.getWidth()) - padding;
+        
         clip.setWidth(tableWidth);
     }
 
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableViewSkinBase.java	Mon Apr 29 16:55:45 2013 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableViewSkinBase.java	Tue Apr 30 14:49:33 2013 +1200
@@ -149,7 +149,8 @@
         tableHeaderRow.setFocusTraversable(false);
         control.paddingProperty().addListener(new InvalidationListener() {
             @Override public void invalidated(Observable valueModel) {
-                tableHeaderRow.setTablePadding(getSkinnable().getInsets());
+                C c = getSkinnable();
+                tableHeaderRow.setTablePadding(c == null ? Insets.EMPTY : c.getInsets());
             }
         });
 
@@ -675,7 +676,10 @@
 
     private void refreshView() {
         rowCountDirty = true;
-        getSkinnable().requestLayout();
+        Control c = getSkinnable();
+        if (c != null) {
+            c.requestLayout();
+        }
     }
 
     private int itemCount = -1;
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/VirtualFlow.java	Mon Apr 29 16:55:45 2013 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/VirtualFlow.java	Tue Apr 30 14:49:33 2013 +1200
@@ -1669,10 +1669,13 @@
 
     private void resizeCellSize(T cell) {
         if (cell == null) return;
-        if (isVertical())
-            cell.resize(cell.getWidth(), cell.prefHeight(-1));
-        else
-            cell.resize(cell.prefWidth(-1), cell.getHeight());
+        if (isVertical()) {
+            double width = cell.getWidth();
+            cell.resize(width, cell.prefHeight(width));
+        } else {
+            double height = cell.getHeight();
+            cell.resize(cell.prefWidth(height), cell.getHeight());
+        }
     }
 
     private void setCellIndex(T cell, int index) {
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/modena/modena.css	Mon Apr 29 16:55:45 2013 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/modena/modena.css	Tue Apr 30 14:49:33 2013 +1200
@@ -347,6 +347,7 @@
     -fx-selection-bar-text: -fx-text-background-color;
 
     /* These are needed for Popup */
+    -fx-background-color: inherit;
     -fx-background-radius: inherit;
     -fx-background-insets: inherit;
     -fx-padding: inherit;