java.text.DateFormat.SHORT, java.text.DateFormat.SHORT,
java.text.DateFormat.MEDIUM, java.text.DateFormat.SHORT,
	public void applyPattern( String formatString )	{		try		{			this.formatPattern = formatString;			/*			 * we can seperate these single name-based patterns form those			 * patterns with multinumber letters			 */			if ( formatString == null || "Unformatted".equals(formatString)) //$NON-NLS-1$			{				formatPattern = "";				dateFormat = java.text.DateFormat.getDateTimeInstance(						java.text.DateFormat.SHORT, java.text.DateFormat.SHORT,						locale );				return;			}			if ( formatString.length( ) == 1 )			{				char patternTemp = formatString.charAt( 0 );				switch ( patternTemp )				{					case 'G' :						dateFormat = java.text.DateFormat.getDateTimeInstance(								java.text.DateFormat.LONG,								java.text.DateFormat.LONG, locale );						return;					case 'D' :						dateFormat = java.text.DateFormat.getDateInstance(								java.text.DateFormat.LONG, locale );						return;					case 'd' :						dateFormat = java.text.DateFormat.getDateInstance(								java.text.DateFormat.SHORT, locale );						return;					case 'T' :						dateFormat = java.text.DateFormat.getTimeInstance(								java.text.DateFormat.LONG, locale );						return;					case 't' :						dateFormat = new SimpleDateFormat( "HH:mm", locale );						return;					case 'f' :						dateFormat = java.text.DateFormat.getDateTimeInstance(								java.text.DateFormat.LONG,								java.text.DateFormat.SHORT, locale );						return;					case 'F' :						dateFormat = java.text.DateFormat.getDateTimeInstance(								java.text.DateFormat.LONG,								java.text.DateFormat.LONG, locale );						return;					case 'g' :						dateFormat = java.text.DateFormat.getDateTimeInstance(								java.text.DateFormat.SHORT,								java.text.DateFormat.SHORT, locale );						return;					case 'M' :					case 'm' :						dateFormat = new SimpleDateFormat( "MM/dd", locale );						return;					case 'R' :					case 'r' :						dateFormat = new SimpleDateFormat(								"yyyy.MM.dd HH:mm:ss a", locale );						dateFormat.setTimeZone( TimeZone.getTimeZone( "GMT" ) );						return;					case 's' :						dateFormat = new SimpleDateFormat(								"yyyy.MM.dd HH:mm:ss", locale );						return;					case 'u' :						dateFormat = new SimpleDateFormat(								"yyyy.MM.dd HH:mm:ss  Z", locale );						return;					//TODO:the defination is not clear enough					/*					 * case 'U': return;					 */					case 'Y' :					case 'y' :						dateFormat = new SimpleDateFormat( "yyyy/mm", locale );						return;					default :						dateFormat = new SimpleDateFormat( formatString, locale );						return;				}			}			/*			 * including the patterns which Java accepted and those name-based			 * patterns with multinumber letters			 */			if ( formatString.equals( "General Date" ) )			{				dateFormat = java.text.DateFormat.getDateTimeInstance(						java.text.DateFormat.LONG, java.text.DateFormat.LONG,						locale );				return;			}			if ( formatString.equals( "Long Date" ) )			{				dateFormat = java.text.DateFormat.getDateInstance(						java.text.DateFormat.LONG, locale );				return;			}			if ( formatString.equals( "Medium Date" ) )			{				dateFormat = java.text.DateFormat.getDateInstance(						java.text.DateFormat.MEDIUM, locale );				return;			}			if ( formatString.equals( "Short Date" ) )			{				dateFormat = java.text.DateFormat.getDateInstance(						java.text.DateFormat.SHORT, locale );				return;			}			if ( formatString.equals( "Long Time" ) )			{				dateFormat = java.text.DateFormat.getTimeInstance(						java.text.DateFormat.LONG, locale );				return;			}			if ( formatString.equals( "Medium Time" ) )			{				dateFormat = java.text.DateFormat.getTimeInstance(						java.text.DateFormat.MEDIUM, locale );				return;			}			if ( formatString.equals( "Short Time" ) )			{				dateFormat = new SimpleDateFormat( "kk:mm", locale );				return;			}			dateFormat = new SimpleDateFormat( formatString, locale );		}		catch ( Exception e )		{			logger.log( Level.WARNING, e.getMessage( ), e );		}	}