jdk/src/macosx/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java
changeset 14502 d63fed06fed4
parent 13583 dc0017b1a452
child 16481 8e30386cc014
--- a/jdk/src/macosx/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java	Sun Nov 11 10:05:37 2012 +0000
+++ b/jdk/src/macosx/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java	Mon Nov 12 11:12:29 2012 +0900
@@ -41,6 +41,7 @@
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.atomic.AtomicReferenceArray;
 import java.util.spi.CalendarDataProvider;
+import java.util.spi.CalendarNameProvider;
 import java.util.spi.CurrencyNameProvider;
 import java.util.spi.LocaleNameProvider;
 import java.util.spi.TimeZoneNameProvider;
@@ -324,6 +325,30 @@
             }
 
             @Override
+            public int getFirstDayOfWeek(Locale locale) {
+                return getCalendarInt(locale.toLanguageTag(), CD_FIRSTDAYOFWEEK);
+            }
+
+            @Override
+            public int getMinimalDaysInFirstWeek(Locale locale) {
+                return getCalendarInt(locale.toLanguageTag(), CD_MINIMALDAYSINFIRSTWEEK);
+            }
+        };
+    }
+
+    public static CalendarNameProvider getCalendarNameProvider() {
+        return new CalendarNameProvider() {
+            @Override
+            public Locale[] getAvailableLocales() {
+                return getSupportedCalendarLocales();
+            }
+
+            @Override
+            public boolean isSupportedLocale(Locale locale) {
+                return isSupportedCalendarLocale(locale);
+            }
+
+            @Override
             public String getDisplayName(String calType, int field, int value,
                                          int style, Locale locale) {
                 return null;
@@ -334,16 +359,6 @@
                                          int field, int style, Locale locale) {
                 return null;
             }
-
-            @Override
-            public int getFirstDayOfWeek(Locale locale) {
-                return getCalendarInt(locale.toLanguageTag(), CD_FIRSTDAYOFWEEK);
-            }
-
-            @Override
-            public int getMinimalDaysInFirstWeek(Locale locale) {
-                return getCalendarInt(locale.toLanguageTag(), CD_MINIMALDAYSINFIRSTWEEK);
-            }
         };
     }