mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 05:55:35 +00:00
Calendar reorg: move format methods into DateFormat and DFS
X-SVN-Rev: 2727
This commit is contained in:
parent
b5b2c11964
commit
9086f460de
6 changed files with 30 additions and 30 deletions
|
@ -5,8 +5,8 @@
|
|||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/demo/calendar/Attic/CalendarCalc.java,v $
|
||||
* $Date: 2000/05/12 23:21:23 $
|
||||
* $Revision: 1.7 $
|
||||
* $Date: 2000/10/19 00:27:16 $
|
||||
* $Revision: 1.8 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
|
@ -505,7 +505,7 @@ class CalendarCalcFrame extends Frame
|
|||
text = new JTextField("",FIELD_COLUMNS);
|
||||
text.setFont(DemoUtility.editFont);
|
||||
|
||||
format = IBMCalendar.getDateFormat(cal, DateFormat.FULL,
|
||||
format = DateFormat.getDateInstance(cal, DateFormat.FULL,
|
||||
Locale.getDefault());
|
||||
//format.applyPattern(DEFAULT_FORMAT);
|
||||
}
|
||||
|
@ -513,8 +513,8 @@ class CalendarCalcFrame extends Frame
|
|||
public void setLocale(Locale loc) {
|
||||
String pattern = toPattern();
|
||||
|
||||
format = IBMCalendar.getDateFormat(calendar, DateFormat.FULL,
|
||||
loc);
|
||||
format = DateFormat.getDateInstance(calendar, DateFormat.FULL,
|
||||
loc);
|
||||
applyPattern(pattern);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/demo/calendar/Attic/CalendarFrame.java,v $
|
||||
* $Date: 2000/05/12 23:21:23 $
|
||||
* $Revision: 1.7 $
|
||||
* $Date: 2000/10/19 00:27:16 $
|
||||
* $Revision: 1.8 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
|
@ -14,7 +14,7 @@
|
|||
package com.ibm.demo.calendar;
|
||||
|
||||
import com.ibm.demo.*;
|
||||
import com.ibm.util.IBMCalendar;
|
||||
import com.ibm.util.Calendar;
|
||||
import com.ibm.util.HebrewCalendar;
|
||||
import com.ibm.util.BuddhistCalendar;
|
||||
import com.ibm.util.JapaneseCalendar;
|
||||
|
@ -28,7 +28,7 @@ import java.awt.event.*;
|
|||
import java.net.*;
|
||||
import java.io.*;
|
||||
//import java.text.DateFormat;
|
||||
import com.ibm.text.DateFormat;
|
||||
import com.ibm.text.DateFormat;
|
||||
import java.text.MessageFormat;
|
||||
//import java.util.Calendar;
|
||||
import com.ibm.util.Calendar;
|
||||
|
@ -245,7 +245,7 @@ class CalendarFrame extends Frame
|
|||
for (int i = 0; i < 2; i++) {
|
||||
try {
|
||||
if (monthFormat[i] == null) { // TODO: optimize
|
||||
DateFormat f = IBMCalendar.getDateTimeFormat(
|
||||
DateFormat f = DateFormat.getDateTimeInstance(
|
||||
calendars[i], DateFormat.MEDIUM, -1,
|
||||
locales[displayMenu.getSelectedIndex()]);
|
||||
if (f instanceof com.ibm.text.SimpleDateFormat) {
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/demo/calendar/Attic/CalendarPanel.java,v $
|
||||
* $Date: 2000/05/12 23:21:23 $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2000/10/19 00:27:16 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
|
@ -46,8 +46,8 @@ class CalendarPanel extends Canvas {
|
|||
|
||||
for (int i = 0; i < fCalendar.length; i++) {
|
||||
if (fCalendar[i] != null) {
|
||||
fSymbols[i] = IBMCalendar.getDateFormatSymbols(fCalendar[i],
|
||||
fDisplayLocale);
|
||||
fSymbols[i] = new DateFormatSymbols(fCalendar[i],
|
||||
fDisplayLocale);
|
||||
}
|
||||
}
|
||||
String lang = locale.getLanguage();
|
||||
|
@ -86,7 +86,7 @@ class CalendarPanel extends Canvas {
|
|||
fCalendar[index] = c;
|
||||
fCalendar[index].setTime(date);
|
||||
|
||||
fSymbols[index] = IBMCalendar.getDateFormatSymbols(c, fDisplayLocale);
|
||||
fSymbols[index] = new DateFormatSymbols(c, fDisplayLocale);
|
||||
dirty = true;
|
||||
repaint();
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/demo/calendar/CalendarCalc.java,v $
|
||||
* $Date: 2000/05/12 23:21:23 $
|
||||
* $Revision: 1.7 $
|
||||
* $Date: 2000/10/19 00:27:16 $
|
||||
* $Revision: 1.8 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
|
@ -505,7 +505,7 @@ class CalendarCalcFrame extends Frame
|
|||
text = new JTextField("",FIELD_COLUMNS);
|
||||
text.setFont(DemoUtility.editFont);
|
||||
|
||||
format = IBMCalendar.getDateFormat(cal, DateFormat.FULL,
|
||||
format = DateFormat.getDateInstance(cal, DateFormat.FULL,
|
||||
Locale.getDefault());
|
||||
//format.applyPattern(DEFAULT_FORMAT);
|
||||
}
|
||||
|
@ -513,8 +513,8 @@ class CalendarCalcFrame extends Frame
|
|||
public void setLocale(Locale loc) {
|
||||
String pattern = toPattern();
|
||||
|
||||
format = IBMCalendar.getDateFormat(calendar, DateFormat.FULL,
|
||||
loc);
|
||||
format = DateFormat.getDateInstance(calendar, DateFormat.FULL,
|
||||
loc);
|
||||
applyPattern(pattern);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/demo/calendar/CalendarFrame.java,v $
|
||||
* $Date: 2000/05/12 23:21:23 $
|
||||
* $Revision: 1.7 $
|
||||
* $Date: 2000/10/19 00:27:16 $
|
||||
* $Revision: 1.8 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
|
@ -14,7 +14,7 @@
|
|||
package com.ibm.demo.calendar;
|
||||
|
||||
import com.ibm.demo.*;
|
||||
import com.ibm.util.IBMCalendar;
|
||||
import com.ibm.util.Calendar;
|
||||
import com.ibm.util.HebrewCalendar;
|
||||
import com.ibm.util.BuddhistCalendar;
|
||||
import com.ibm.util.JapaneseCalendar;
|
||||
|
@ -28,7 +28,7 @@ import java.awt.event.*;
|
|||
import java.net.*;
|
||||
import java.io.*;
|
||||
//import java.text.DateFormat;
|
||||
import com.ibm.text.DateFormat;
|
||||
import com.ibm.text.DateFormat;
|
||||
import java.text.MessageFormat;
|
||||
//import java.util.Calendar;
|
||||
import com.ibm.util.Calendar;
|
||||
|
@ -245,7 +245,7 @@ class CalendarFrame extends Frame
|
|||
for (int i = 0; i < 2; i++) {
|
||||
try {
|
||||
if (monthFormat[i] == null) { // TODO: optimize
|
||||
DateFormat f = IBMCalendar.getDateTimeFormat(
|
||||
DateFormat f = DateFormat.getDateTimeInstance(
|
||||
calendars[i], DateFormat.MEDIUM, -1,
|
||||
locales[displayMenu.getSelectedIndex()]);
|
||||
if (f instanceof com.ibm.text.SimpleDateFormat) {
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/demo/calendar/CalendarPanel.java,v $
|
||||
* $Date: 2000/05/12 23:21:23 $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2000/10/19 00:27:16 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
*****************************************************************************************
|
||||
*/
|
||||
|
@ -46,8 +46,8 @@ class CalendarPanel extends Canvas {
|
|||
|
||||
for (int i = 0; i < fCalendar.length; i++) {
|
||||
if (fCalendar[i] != null) {
|
||||
fSymbols[i] = IBMCalendar.getDateFormatSymbols(fCalendar[i],
|
||||
fDisplayLocale);
|
||||
fSymbols[i] = new DateFormatSymbols(fCalendar[i],
|
||||
fDisplayLocale);
|
||||
}
|
||||
}
|
||||
String lang = locale.getLanguage();
|
||||
|
@ -86,7 +86,7 @@ class CalendarPanel extends Canvas {
|
|||
fCalendar[index] = c;
|
||||
fCalendar[index].setTime(date);
|
||||
|
||||
fSymbols[index] = IBMCalendar.getDateFormatSymbols(c, fDisplayLocale);
|
||||
fSymbols[index] = new DateFormatSymbols(c, fDisplayLocale);
|
||||
dirty = true;
|
||||
repaint();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue