changeset 4946:f3dcad659452

Backed out changeset: 7ca7328377bc (RT-29824: The promptText for non-editable ComboBox should be gray color) Prompt text is now displayed in ComboBox as it was previously, after being removed for a few months. Further discussion can be found in RT-29824.
author jgiles
date Tue, 10 Sep 2013 09:06:52 +1200
parents 4690ab589dbe
children cc0cbc9a12e1
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Thu Sep 05 17:25:50 2013 +1200
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Tue Sep 10 09:06:52 2013 +1200
@@ -476,12 +476,8 @@
         } else {
             // run item through StringConverter if it isn't null
             StringConverter<T> c = comboBox.getConverter();
-            
-            // prompt text used to be displayed in the display text of a 
-            // non-editable node, but was removed as per RT-29284
-            String s = item == null ? /*comboBox.getPromptText()*/"" : (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);
             return s == null || s.isEmpty();
         }