changeset 1381:d17e7e409769

RT-22875: CheckBoxTreeItem: indeterminate state does not affect rendering
author jgiles
date Fri, 29 Jun 2012 09:40:52 +1200
parents 0d6d4249cce9
children 480b6f9324a7
files javafx-ui-controls/src/javafx/scene/control/cell/CheckBoxTreeCell.java
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/javafx/scene/control/cell/CheckBoxTreeCell.java	Fri Jun 29 09:40:29 2012 +1200
+++ b/javafx-ui-controls/src/javafx/scene/control/cell/CheckBoxTreeCell.java	Fri Jun 29 09:40:52 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) {