changeset 1383:a81a3544722e

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/2.2/scrum/controls/jfx/rt
author jgiles
date Fri, 29 Jun 2012 09:43:28 +1200
parents d20976d5d10f 480b6f9324a7
children 29a0e209d81f
files
diffstat 6 files changed, 19 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-charts/src/javafx/scene/chart/PieChart.java	Thu Jun 28 10:34:05 2012 -0700
+++ b/javafx-ui-charts/src/javafx/scene/chart/PieChart.java	Fri Jun 29 09:43:28 2012 +1200
@@ -335,6 +335,7 @@
         // check if symbol has already been created
         if (arcRegion == null) {
             arcRegion = new Region();
+            arcRegion.setPickOnBounds(false); 
             item.setNode(arcRegion);
         }
         // Note: not sure if we want to add or check, ie be more careful and efficient here
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TreeCellBehavior.java	Thu Jun 28 10:34:05 2012 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TreeCellBehavior.java	Fri Jun 29 09:43:28 2012 +1200
@@ -138,11 +138,14 @@
     @Override public void mouseDragged(MouseEvent event) {
         latePress = false;
         
+        TreeView treeView = getControl().getTreeView();
+        if (treeView == null || treeView.getSelectionModel() == null) return;
+        
         // the mouse has now been dragged on a touch device, we should
         // remove the selection if we just added it in the last mouse press
         // event
         if (isEmbedded && ! wasSelected && getControl().isSelected()) {
-            getControl().getTreeView().getSelectionModel().clearSelection(getControl().getIndex());
+            treeView.getSelectionModel().clearSelection(getControl().getIndex());
         }
     }
     
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Thu Jun 28 10:34:05 2012 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Fri Jun 29 09:43:28 2012 +1200
@@ -408,7 +408,7 @@
         } else {
             // run item through StringConverter if it isn't null
             StringConverter c = comboBox.getConverter();
-            String s = item == null ? "" : (c == null ? item.toString() : c.toString(item));
+            String s = item == null ? comboBox.getPromptText() : (c == null ? item.toString() : c.toString(item));
             cell.setText(s);
             cell.setGraphic(null);
         }
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/NestedTableColumnHeader.java	Thu Jun 28 10:34:05 2012 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/NestedTableColumnHeader.java	Fri Jun 29 09:43:28 2012 +1200
@@ -417,7 +417,7 @@
         for (TableColumnHeader n : getColumnHeaders()) {
             if (! n.isVisible()) continue;
             
-            double prefWidth = n.prefWidth(-1);
+            double prefWidth = snapSize(n.prefWidth(-1));
 //            double prefHeight = n.prefHeight(-1);
 
             // position the column header in the default location...
@@ -453,7 +453,7 @@
         if (getColumns() != null) {
             for (TableColumnHeader c : getColumnHeaders()) {
                 if (c.isVisible()) {
-                    width += c.computePrefWidth(height);
+                    width += snapSize(c.computePrefWidth(height));
                 }
             }
         }
--- a/javafx-ui-controls/src/javafx/scene/control/cell/CheckBoxTreeCell.java	Thu Jun 28 10:34:05 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/cell/CheckBoxTreeCell.java	Fri Jun 29 09:43:28 2012 +1200
@@ -305,6 +305,8 @@
     
     private ObservableValue<Boolean> booleanProperty;
     
+    private BooleanProperty indeterminateProperty;
+    
     
     
     /***************************************************************************
@@ -506,9 +508,9 @@
             if (booleanProperty != null) {
                 checkBox.selectedProperty().unbindBidirectional((BooleanProperty)booleanProperty);
             }
-//            if (indeterminateProperty != null) {
-//                checkBox.indeterminateProperty().unbindBidirectional(indeterminateProperty);
-//            }
+            if (indeterminateProperty != null) {
+                checkBox.indeterminateProperty().unbindBidirectional(indeterminateProperty);
+            }
 
             // install new bindings.
             // We special case things when the TreeItem is a CheckBoxTreeItem
@@ -517,8 +519,8 @@
                 booleanProperty = cbti.selectedProperty();
                 checkBox.selectedProperty().bindBidirectional((BooleanProperty)booleanProperty);
                 
-//                indeterminateProperty = cbti.indeterminateProperty();
-//                checkBox.indeterminateProperty().bindBidirectional(indeterminateProperty);
+                indeterminateProperty = cbti.indeterminateProperty();
+                checkBox.indeterminateProperty().bindBidirectional(indeterminateProperty);
             } else {
                 booleanProperty = callback.call(getTreeItem());
                 if (booleanProperty != null) {
--- a/javafx-ui-controls/src/javafx/scene/control/cell/package.html	Thu Jun 28 10:34:05 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/control/cell/package.html	Fri Jun 29 09:43:28 2012 +1200
@@ -12,10 +12,9 @@
     and {@link javafx.scene.control.TableCell TableCell}. At present this package
     is relatively bare, but it is where future cell-related classes will be located.</p>
     
-    <p>At present the only class available in this package is the 
-    {@link javafx.scene.control.cell.PropertyValueFactory PropertyValueFactory}, 
-    which helps to simplify the population of the TableCell
-    {@link javafx.scene.control.TableCell#itemProperty() item} property. Refer
-    to the class documentation for more information and examples of how to use it.
+    <p>It is important to note that whilst most cells in this package are editable,
+        for a cells editing functionality to be enabled it is required that all
+        related classes have editing enabled. For example, in a TableView, both
+        the TableView and the relevant TableColumn must have setEditing(true) called.
 </body>
 </html>