changeset 1146:e25824ec5126

RT-21186: ComboBox doesn't show tooltip over its TextField
author jgiles
date Fri, 25 May 2012 11:54:37 +1200
parents 86c489f267b3
children da1ccf14f0ec
files javafx-ui-controls/src/javafx/scene/control/ComboBox.java
diffstat 1 files changed, 3 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/javafx/scene/control/ComboBox.java	Fri May 25 11:51:39 2012 +1200
+++ b/javafx-ui-controls/src/javafx/scene/control/ComboBox.java	Fri May 25 11:54:37 2012 +1200
@@ -236,12 +236,6 @@
                 updateEditor();
             }
         });
-        
-        converterProperty().addListener(new InvalidationListener() {
-            @Override public void invalidated(Observable o) {
-                updateBindings();
-            }
-        });
     }
     
  
@@ -401,25 +395,16 @@
         
         if (isEditable()) {
             textField = new FocusableTextField();
-            updateBindings();
+            textField.promptTextProperty().bindBidirectional(promptTextProperty());
+            textField.tooltipProperty().bind(tooltipProperty());
             editor.set(textField);
         } else {
             textField = null;
             editor.set(null);
         }
     }
+
     
-    private void updateBindings() {
-        if (textField == null) return;
-        
-        // remove bindings if any exist
-        textField.promptTextProperty().unbindBidirectional(promptTextProperty());
-//        textField.textProperty().unbindBidirectional(valueProperty());
-        
-        // update bindings with new converter
-        textField.promptTextProperty().bindBidirectional(promptTextProperty());
-//        textField.textProperty().bindBidirectional(valueProperty(), getConverter());
-    }
     
     /***************************************************************************
      *                                                                         *