changeset 359:5fd0bc71c9d6

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/2.1/MASTER/jfx/rt
author David Grieve<david.grieve@oracle.com>
date Wed, 01 Feb 2012 09:34:37 -0500
parents b68ae02f60e5 b3daae3b5265
children 42a04bbebdfe b0401c94eaf9
files
diffstat 7 files changed, 20 insertions(+), 108 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/LabeledSkinBase.java	Tue Jan 31 10:07:21 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/LabeledSkinBase.java	Wed Feb 01 09:34:37 2012 -0500
@@ -124,6 +124,7 @@
         // Configure the Text node with all of the attributes from the
         // Labeled which apply to it.
         text = new Text();
+        text.getStyleClass().add("text");
         //
         // RT-16589: by binding text.fontProperty() to labeled.fontProperty(), 
         // we achieve two things. First, the text's font stays in sync with
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ProgressIndicatorSkin.java	Tue Jan 31 10:07:21 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ProgressIndicatorSkin.java	Wed Feb 01 09:34:37 2012 -0500
@@ -74,6 +74,9 @@
 
     /** doneText is just used to know the size of done as that is the biggest text we need to allow for */
     private static final Text doneText = new Text(DONE);
+    static {
+        doneText.getStyleClass().add("text");
+    }
 
 
     private static final ObservableList<String> paths;
@@ -245,7 +248,7 @@
             text = new Text((control.getProgress() >= 1) ? (DONE) : ("" + intProgress + "%"));
             text.setFill(textFill);
             text.setTextOrigin(VPos.TOP);
-            text.getStyleClass().setAll("percentage");
+            text.getStyleClass().setAll("text", "percentage");
 
             // The circular background for the progress pie piece
             indicator = new StackPane();
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextAreaSkin.java	Tue Jan 31 10:07:21 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextAreaSkin.java	Wed Feb 01 09:34:37 2012 -0500
@@ -496,6 +496,7 @@
         Text paragraphNode = new Text(string);
         paragraphNode.setTextOrigin(VPos.TOP);
         paragraphNode.setManaged(false);
+        paragraphNode.getStyleClass().add("text");
         paragraphNodes.getChildren().add(i, paragraphNode);
 
         paragraphNode.fontProperty().bind(font);
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextFieldSkin.java	Tue Jan 31 10:07:21 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextFieldSkin.java	Wed Feb 01 09:34:37 2012 -0500
@@ -243,6 +243,7 @@
 
         // Add text
         textNode.setManaged(false);
+        textNode.getStyleClass().add("text");
         textNode.fontProperty().bind(font);
         textNode.xProperty().bind(textLeft);
         textNode.layoutXProperty().bind(textTranslateX);
@@ -349,6 +350,7 @@
         promptNode = new Text();
         textGroup.getChildren().add(0, promptNode);
         promptNode.setManaged(false);
+        promptNode.getStyleClass().add("text");
         promptNode.visibleProperty().bind(usePromptText);
         promptNode.fontProperty().bind(font);
         promptNode.xProperty().bind(textLeft);
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/caspian/caspian.css	Tue Jan 31 10:07:21 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/caspian/caspian.css	Wed Feb 01 09:34:37 2012 -0500
@@ -333,6 +333,10 @@
     -fx-stroke: transparent;
 }
 
+.text {
+    -fx-font-smoothing-type: lcd;
+}
+
 
 /*******************************************************************************
  *******************************************************************************
@@ -465,10 +469,6 @@
     -fx-skin: "com.sun.javafx.scene.control.skin.LabelSkin";
 }
 
-.label Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .label:disabled {
     -fx-opacity: -fx-disabled-opacity;
 }
@@ -501,10 +501,6 @@
     -fx-content-display: CENTER;
 }
 
-.button Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .button:focused {
     -fx-color: -fx-focused-base;
     -fx-background-color: -fx-focus-color, -fx-outer-border, -fx-inner-border, -fx-body-color;
@@ -551,10 +547,6 @@
     -fx-content-display: CENTER;
 }
 
-.toggle-button Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .toggle-button:focused {
     -fx-color: -fx-focused-base;
     -fx-background-color: -fx-focus-color, -fx-outer-border, -fx-inner-border, -fx-body-color;
@@ -610,10 +602,6 @@
     -fx-label-padding: 0.0em 0.0em 0.0em 0.416667em; /* 0 0 0 5 */
 }
 
-.radio-button Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .radio-button:focused {
     -fx-color: -fx-focused-base;
 }
@@ -673,10 +661,6 @@
     -fx-label-padding: 0.0em 0.0em 0.0em 0.416667em; /* 0 0 0 5 */
 }
 
-.check-box Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .check-box:focused {
     -fx-color: -fx-focused-base;
 }
@@ -747,10 +731,6 @@
     -fx-content-display: CENTER;    
 }
 
-.hyperlink Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .hyperlink:visited {
     -fx-text-fill: -fx-accent;
 }
@@ -800,10 +780,6 @@
     -fx-padding: 0.333333em 0.083333em 0.666667em 0.083333em; /* 4 1 8 1 */
 }
 
-.context-menu Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .context-menu .separator {
     -fx-padding: 0.0em 0.333333em 0.0em 0.333333em; /* 0 4 0 4 */
 }
@@ -835,10 +811,6 @@
     -fx-padding: 0.333333em 0.666667em 0.333333em 0.666667em; /* 4 8 4 8 */
 }
 
-.menu Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .menu:disabled {
     -fx-opacity: -fx-disabled-opacity;
 }
@@ -1049,10 +1021,6 @@
     -fx-background-color: transparent;
 }
 
-.radio-menu-item Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .radio-menu-item:focused {
     -fx-background: -fx-accent;
     -fx-background-color: -fx-selection-bar;
@@ -1137,10 +1105,6 @@
     -fx-content-display: CENTER;
 }
 
-.choice-box Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .choice-box:focused {
     -fx-color: -fx-focused-base;
     -fx-background-color: -fx-focus-color, -fx-outer-border, -fx-inner-border, -fx-body-color;
@@ -1212,10 +1176,6 @@
     -fx-skin: "com.sun.javafx.scene.control.skin.SliderSkin";
 }
 
-.slider Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .slider .thumb {
     -fx-background-color:
         derive(-fx-color,-36%),
@@ -1502,10 +1462,6 @@
     -fx-highlight-text-fill: white;
 }
 
-.text-box Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .text-box:focused {
     -fx-background-color: -fx-focus-color, -fx-text-box-border, -fx-control-inner-background;
     -fx-background-insets: -0.4, 1, 2;
@@ -1560,10 +1516,6 @@
     -fx-echo-char: "\u25cf";
 }
 
-.password-box Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .password-box .viewport {
     -fx-padding: 0.25em 0.416667em 0.25em 0.416667em; /* 3 5 3 5 */
 }
@@ -1606,10 +1558,6 @@
     -fx-cursor: text;
 }
 
-.text-field Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .text-field:focused {
     -fx-background-color: -fx-focus-color, -fx-text-box-border, -fx-control-inner-background;
     -fx-background-insets: -0.4, 1, 2;
@@ -1645,10 +1593,6 @@
     -fx-prompt-text-fill: derive(-fx-control-inner-background,-30%);
 }
 
-.text-area Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .text-area .scroll-pane {
     -fx-background-color: transparent;
 }
@@ -1711,10 +1655,6 @@
     -fx-padding: 1; /* 0.083333em; */
 }
 
-.list-view Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .list-view:focused {
     -fx-background-color: -fx-focus-color,-fx-box-border,-fx-control-inner-background;
     -fx-background-insets: -1.4, 0, 1;
@@ -1794,10 +1734,6 @@
     -fx-text-fill: -fx-selection-bar-text;
 }
 
-.list-cell Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .list-cell:filled:selected:focused:disabled, .list-cell:filled:selected:disabled {
     -fx-opacity: -fx-disabled-opacity;
 }
@@ -1833,10 +1769,6 @@
     -fx-padding: 1; /* 0.083333em; */
 }
 
-.tree-view Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .tree-view:focused {
     -fx-background-color: -fx-focus-color,-fx-box-border,-fx-control-inner-background;
     -fx-background-insets: -1.4, 0, 1;
@@ -1912,10 +1844,6 @@
     -fx-text-fill: -fx-selection-bar-text;
 }
 
-.tree-cell Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .tree-cell:filled:selected:focused:disabled, .tree-cell:filled:selected:disabled {
     -fx-opacity: -fx-disabled-opacity;
 }
@@ -1981,10 +1909,6 @@
 /* TODO workaround for RT-19062 */
 .menu-button .label { -fx-text-fill: -fx-text-base-color; }
 
-.menu-button Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .menu-button:focused {
     -fx-color: -fx-focused-base;
     -fx-background-color: -fx-focus-color, -fx-outer-border, -fx-inner-border, -fx-body-color;
@@ -2047,10 +1971,6 @@
     -fx-padding: 0.0em; /* 0 */
 }
 
-.split-menu-button Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .split-menu-button:focused {
     -fx-color: -fx-focused-base;
     -fx-background-color: -fx-focus-color;
@@ -2129,10 +2049,6 @@
     -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 8, 0.0 , 0 , 0 );
 }
 
-.tooltip Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .page-corner {
     -fx-padding: 4.5 4.5 4.5 4.5;
     -fx-background-color: linear-gradient( from 0% 0% to 50% 50%, #fcf7b6, #a59c31);
@@ -2279,10 +2195,6 @@
     -fx-progress-color: dodgerblue;
 }
 
-.progress-indicator Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .progress-indicator .indicator {
     -fx-background-color:
         -fx-box-border,
@@ -2345,10 +2257,6 @@
     -fx-table-cell-border-color: #bbbbbb;
 }
 
-.table-view Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 /** Draws focus border around tableview */
 .table-view:focused {
     -fx-background-color: -fx-focus-color,-fx-box-border,-fx-control-inner-background;
@@ -2462,10 +2370,6 @@
     -fx-cell-size: 2.0em; /* 24 */
 }
 
-.table-cell Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 /* When in constrained resize mode, the right-most visible cell should not have
    a right-border, as it is not possible to get this cleanly out of view without
    introducing horizontal scrollbars (see RT-14886). */
@@ -2648,10 +2552,6 @@
     -fx-skin: "com.sun.javafx.scene.control.skin.TitledPaneSkin";
 }
 
-.titled-pane Text {
-    -fx-font-smoothing-type: lcd;
-}
-
 .titled-pane > .title {
     -fx-background-color: -fx-box-border, -fx-inner-border, -fx-body-color;
     -fx-background-insets: 0, 1, 2;
@@ -2824,7 +2724,6 @@
 
 .tab *.tab-label Text {
     -fx-effect: dropshadow(two-pass-box , rgba(255, 255, 255, 0.4), 1, 0.0 , 0, 1);
-    -fx-font-smoothing-type: lcd;
 }
 
 .tab-content-area {
--- a/javafx-ui-controls/src/javafx/scene/chart/Axis.java	Tue Jan 31 10:07:21 2012 -0800
+++ b/javafx-ui-controls/src/javafx/scene/chart/Axis.java	Wed Feb 01 09:34:37 2012 -0500
@@ -378,7 +378,7 @@
         axisLabel.setAlignment(Pos.CENTER);
         tickMarkPath.getStyleClass().add("axis-tick-mark");
         getChildren().addAll(axisLabel, tickMarkPath);
-        measure.getStyleClass().add("tick-mark");
+        measure.getStyleClass().addAll("text", "tick-mark");
     }
 
     // -------------- METHODS ------------------------------------------------------------------------------------------
@@ -1008,7 +1008,7 @@
          * Creates and initializes an instance of TickMark. 
          */
         public TickMark() {
-            textNode.getStyleClass().add("tick-mark");
+            textNode.getStyleClass().addAll("text", "tick-mark");
         }
 
         /**
--- a/javafx-ui-controls/src/javafx/scene/control/ChoiceBox.java	Tue Jan 31 10:07:21 2012 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/ChoiceBox.java	Wed Feb 01 09:34:37 2012 -0500
@@ -65,6 +65,12 @@
  * specify the selected item and then the items. Either way will function
  * correctly.
  * <p>
+ * ChoiceBox item selection is handled by 
+ * {@link javafx.scene.control.SelectionModel SelectionModel}
+ * As with ListView and ComboBox, it is possible to modify the 
+ * {@link javafx.scene.control.SelectionModel SelectionModel} that is used, 
+ * although this is likely to be rarely changed. ChoiceBox supports only a 
+ * single selection model, hence the default used is a {@link SingleSelectionModel}.
  *
  * <pre>
  * import javafx.scene.control.ChoiceBox;