stringFormat.applyPattern( formatStr );
stringFormat = new StringFormatter( formatStr, context.getLocale( ) ); style.setStringFormatObject( stringFormat );
	protected boolean formatValue( Object value, String formatStr,			StyleDesign style, StringBuffer formattedStr )	{		if ( value == null )		{			return false;		}		assert style != null && formattedStr != null;		assert context.getLocale( ) != null;		if ( ( value instanceof Number ) )		{			NumberFormatter numberFormat;			if ( formatStr == null || formatStr.length( ) == 0 )			{				numberFormat = style.getNumberFormatObject( );				//initial number-format for the first time				if ( numberFormat == null )				{					numberFormat = new NumberFormatter( context.getLocale( ) );					formatStr = style.getNumberFormat( );					if ( formatStr != null )					{						numberFormat.applyPattern( formatStr );					}					style.setNumberFormatObject( numberFormat );				}				else				{					formatStr = numberFormat.getPattern( );				}			}			else			//deal with value-of for text item			{				numberFormat = new NumberFormatter( context.getLocale( ) );				numberFormat.applyPattern( formatStr );			}			formattedStr.append( numberFormat.format( ( (Number) value )					.doubleValue( ) ) );		}		else if ( value instanceof Date )		{			DateFormatter dateFormat;			if ( formatStr == null || formatStr.length( ) == 0 )			{				dateFormat = style.getDateFormatObject( );				//initial date-format for the first time				if ( dateFormat == null )				{					dateFormat = new DateFormatter( context.getLocale( ) );					formatStr = style.getDateTimeFormat( );					if ( formatStr != null )					{						dateFormat.applyPattern( formatStr );					}					style.setDateFormatObject( dateFormat );				}				else				{					formatStr = dateFormat.getPattern( );				}			}			else			//deal with value-of for text item			{				dateFormat = new DateFormatter( context.getLocale( ) );				dateFormat.applyPattern( formatStr );			}			formattedStr.append( dateFormat.format( (Date) value ) );		}		else if ( value instanceof String )		{			StringFormatter stringFormat;			if ( formatStr == null || formatStr.length( ) == 0 )			{				stringFormat = style.getStringFormatObject( );				//initial string-format for the first time				if ( stringFormat == null )				{					stringFormat = new StringFormatter( );					//use default stringFormat					stringFormat.setLocale( context.getLocale( ) );					//get format pattern from style					formatStr = style.getStringFormat( );					if ( formatStr != null )					{						stringFormat.applyPattern( formatStr );					}					style.setStringFormatObject( stringFormat );				}				else				{					formatStr = stringFormat.getPattern( );				}			}			else			//deal with value-of for text item			{				stringFormat = new StringFormatter( );				stringFormat.setLocale( context.getLocale( ) );				stringFormat.applyPattern( formatStr );			}			formattedStr.append( stringFormat.format( value.toString( ) ) );		}		else		{			formattedStr.append( value.toString( ) );			return false;		}		if ( formatStr == null || formatStr.length( ) == 0 )		{			return false;		}		return true;	}