changeset 292:fbb1b38c01d3

RT-19062: text fill was missing from LabeledImpl
author David Grieve<david.grieve@oracle.com>
date Fri, 20 Jan 2012 15:45:57 -0500
parents e54287f1dcdc
children 0d061c4a6c44
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/LabeledImpl.java
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/LabeledImpl.java	Fri Jan 20 10:51:52 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/LabeledImpl.java	Fri Jan 20 15:45:57 2012 -0500
@@ -48,6 +48,7 @@
         // method below
         setFont(labeled.getFont()); // set font or rely on skin's css?
         setText(labeled.getText());
+        setTextFill(labeled.getTextFill());
         setGraphic(labeled.getGraphic());
         setAlignment(labeled.getAlignment());
         setContentDisplay(labeled.getContentDisplay());
@@ -61,8 +62,7 @@
                 if (valueModel == labeled.textProperty()) {
                     setText(labeled.getText());
                                         
-                } else if (valueModel == labeled.alignmentProperty()) {
-                    //setAlignment(labeled.getAlignment());
+                } else if (valueModel == labeled.textFillProperty()) {
                     
                     //
                     // Fix for RT-10554. Since this Label's properties are set by the
@@ -70,6 +70,12 @@
                     // set by the user and CSS won't override the value.
                     //
                     StyleableProperty styleable = 
+                        StyleableProperty.getStyleableProperty(labeled.textFillProperty());
+                    styleable.set(LabeledImpl.this, labeled.getTextFill());
+                                        
+                } else if (valueModel == labeled.alignmentProperty()) {
+                    //setAlignment(labeled.getAlignment());
+                    StyleableProperty styleable = 
                         StyleableProperty.getStyleableProperty(labeled.alignmentProperty());
                     styleable.set(LabeledImpl.this, labeled.getAlignment());
                     
@@ -125,6 +131,7 @@
             }
         };
         labeled.textProperty().addListener(shuttler);
+        labeled.textFillProperty().addListener(shuttler);
         labeled.alignmentProperty().addListener(shuttler);
         labeled.textAlignmentProperty().addListener(shuttler);
         labeled.textOverrunProperty().addListener(shuttler);