changeset 3815:02aaa6e6a7e0

RT-30233: [DatePicker] Handle incompatible change of method name in DateTimeFormatter. (Requires JDK8 b91).
author leifs
date Wed, 29 May 2013 10:09:54 -0700
parents 9fe6d5754733
children a1348a50b9ef
files build.properties javafx-ui-controls/src/com/sun/javafx/scene/control/skin/DatePickerContent.java javafx-ui-controls/src/com/sun/javafx/scene/control/skin/DatePickerHijrahContent.java javafx-ui-controls/src/javafx/scene/control/DatePicker.java
diffstat 4 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/build.properties	Wed May 29 12:45:55 2013 -0400
+++ b/build.properties	Wed May 29 10:09:54 2013 -0700
@@ -53,4 +53,4 @@
 
 jfx.build.jdk.version=1.8.0
 jfx.build.jdk.buildnum=91
-jfx.build.jdk.buildnum.min=87
+jfx.build.jdk.buildnum.min=91
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/DatePickerContent.java	Wed May 29 12:45:55 2013 -0400
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/DatePickerContent.java	Wed May 29 10:09:54 2013 -0700
@@ -26,9 +26,9 @@
 package com.sun.javafx.scene.control.skin;
 
 import java.time.LocalDate;
-// import java.time.format.DateTimeFormatSymbols;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.DecimalStyle;
 import java.time.chrono.Chronology;
 import java.time.chrono.ChronoLocalDate;
 import java.time.temporal.ChronoUnit;
@@ -443,7 +443,7 @@
                 // such as when Thai numerals are required.
                 String cellText =
                     weekNumberFormatter.withLocale(locale)
-//                                        .withSymbols(DateTimeFormatSymbols.of(locale))
+                                       .withDecimalStyle(DecimalStyle.of(locale))
                                        .format(date);
                 weekNumberCells.get(i).setText(cellText);
             }
@@ -496,7 +496,7 @@
             String cellText =
                 dayCellFormatter.withLocale(locale)
                                 .withChronology(chrono)
-//                                 .withSymbols(DateTimeFormatSymbols.of(locale))
+                                .withDecimalStyle(DecimalStyle.of(locale))
                                 .format(cDate);
             dayCell.setText(cellText);
 
@@ -576,7 +576,7 @@
         // Fixme: Format Japanese era names with Japanese text.
         String str = formatter.withLocale(getLocale())
                               .withChronology(getChronology())
-//                               .withSymbols(DateTimeFormatSymbols.of(getLocale()))
+                              .withDecimalStyle(DecimalStyle.of(getLocale()))
                               .format(cDate);
 
         return str;
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/DatePickerHijrahContent.java	Wed May 29 12:45:55 2013 -0400
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/DatePickerHijrahContent.java	Wed May 29 10:09:54 2013 -0700
@@ -28,7 +28,7 @@
 import java.time.LocalDate;
 import java.time.DateTimeException;
 import java.time.YearMonth;
-// import java.time.format.DateTimeFormatSymbols;
+import java.time.format.DecimalStyle;
 import java.time.chrono.Chronology;
 import java.time.chrono.HijrahChronology;
 import java.time.chrono.HijrahDate;
@@ -107,11 +107,11 @@
                 if (hijrahStr == null || month != firstMonth) {
                     String monthStr = monthFormatter.withLocale(locale)
                                                     .withChronology(chrono)
-//                                                     .withSymbols(DateTimeFormatSymbols.of(locale))
+                                                    .withDecimalStyle(DecimalStyle.of(locale))
                                                     .format(cDate);
                     String yearStr = yearFormatter.withLocale(locale)
                                                     .withChronology(chrono)
-//                                                     .withSymbols(DateTimeFormatSymbols.of(locale))
+                                                    .withDecimalStyle(DecimalStyle.of(locale))
                                                     .format(cDate);
                     if (hijrahStr == null) {
                         firstMonth = month;
@@ -170,7 +170,7 @@
                 String hijrahStr =
                     dayCellFormatter.withLocale(locale)
                                     .withChronology(chrono)
-//                                     .withSymbols(DateTimeFormatSymbols.of(locale))
+                                    .withDecimalStyle(DecimalStyle.of(locale))
                                     .format(cDate);
 
                 secondaryText.setText(hijrahStr);
--- a/javafx-ui-controls/src/javafx/scene/control/DatePicker.java	Wed May 29 12:45:55 2013 -0400
+++ b/javafx-ui-controls/src/javafx/scene/control/DatePicker.java	Wed May 29 10:09:54 2013 -0700
@@ -32,9 +32,9 @@
 import java.time.chrono.Chronology;
 import java.time.chrono.ChronoLocalDate;
 import java.time.chrono.IsoChronology;
-// import java.time.format.DateTimeFormatSymbols;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeParseException;
+import java.time.format.DecimalStyle;
 import java.time.format.FormatStyle;
 import java.time.temporal.TemporalAccessor;
 import java.util.ArrayList;
@@ -355,8 +355,8 @@
                 DateTimeFormatter dateFormatter =
                     DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT)
                                      .withLocale(locale)
-                                     .withChronology(chrono);
-//                                      .withSymbols(DateTimeFormatSymbols.of(locale));
+                                     .withChronology(chrono)
+                                     .withDecimalStyle(DecimalStyle.of(locale));
 
                 String pattern = getPattern();
                 //System.err.println("pattern = "+pattern);
@@ -400,8 +400,8 @@
                 DateTimeFormatter df =
                     DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT)
                                      .withLocale(locale)
-                                     .withChronology(chrono);
-//                                      .withSymbols(DateTimeFormatSymbols.of(locale));
+                                     .withChronology(chrono)
+                                     .withDecimalStyle(DecimalStyle.of(locale));
                 TemporalAccessor temporal = df.parse(text);
                 ChronoLocalDate cDate = chrono.date(temporal);
                 return LocalDate.from(cDate);