Package net.sf.jasperreports.engine.util
Class DefaultFormatFactory
- java.lang.Object
-
- net.sf.jasperreports.engine.util.DefaultFormatFactory
-
- All Implemented Interfaces:
FormatFactory
public class DefaultFormatFactory extends Object implements FormatFactory
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static StringEXCEPTION_MESSAGE_KEY_FACTORY_INSTANCE_ERRORstatic StringEXCEPTION_MESSAGE_KEY_FACTORY_LOADING_ERRORstatic StringSTANDARD_DATE_FORMAT_DEFAULTUsed in the date pattern to specify the default style.static StringSTANDARD_DATE_FORMAT_FULLUsed in the date pattern to specify the full style.static StringSTANDARD_DATE_FORMAT_HIDEUsed in the date pattern to specify that the date or time should not be included.static StringSTANDARD_DATE_FORMAT_LONGUsed in the date pattern to specify the long style.static StringSTANDARD_DATE_FORMAT_MEDIUMUsed in the date pattern to specify the medium style.static StringSTANDARD_DATE_FORMAT_SEPARATORUsed in the date format pattern to separate the date and time styles.static StringSTANDARD_DATE_FORMAT_SHORTUsed in the date pattern to specify the short style.static StringSTANDARD_NUMBER_FORMAT_DURATIONNumber pattern to show integer value as duration expressed in hours:minutes:seconds.
-
Constructor Summary
Constructors Constructor Description DefaultFormatFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DateFormatcreateDateFormat(String pattern, Locale locale, TimeZone tz)static FormatFactorycreateFormatFactory(String formatFactoryClassName)NumberFormatcreateNumberFormat(String pattern, Locale locale)protected static DateFormatgetDateFormat(int[] dateStyle, int[] timeStyle, Locale locale)protected static int[]getDateStyle(String pattern)
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_FACTORY_INSTANCE_ERROR
public static final String EXCEPTION_MESSAGE_KEY_FACTORY_INSTANCE_ERROR
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_FACTORY_LOADING_ERROR
public static final String EXCEPTION_MESSAGE_KEY_FACTORY_LOADING_ERROR
- See Also:
- Constant Field Values
-
STANDARD_DATE_FORMAT_DEFAULT
public static final String STANDARD_DATE_FORMAT_DEFAULT
Used in the date pattern to specify the default style.- See Also:
DateFormat.DEFAULT, Constant Field Values
-
STANDARD_DATE_FORMAT_SHORT
public static final String STANDARD_DATE_FORMAT_SHORT
Used in the date pattern to specify the short style.- See Also:
DateFormat.SHORT, Constant Field Values
-
STANDARD_DATE_FORMAT_MEDIUM
public static final String STANDARD_DATE_FORMAT_MEDIUM
Used in the date pattern to specify the medium style.- See Also:
DateFormat.MEDIUM, Constant Field Values
-
STANDARD_DATE_FORMAT_LONG
public static final String STANDARD_DATE_FORMAT_LONG
Used in the date pattern to specify the long style.- See Also:
DateFormat.LONG, Constant Field Values
-
STANDARD_DATE_FORMAT_FULL
public static final String STANDARD_DATE_FORMAT_FULL
Used in the date pattern to specify the full style.- See Also:
DateFormat.FULL, Constant Field Values
-
STANDARD_DATE_FORMAT_HIDE
public static final String STANDARD_DATE_FORMAT_HIDE
Used in the date pattern to specify that the date or time should not be included.- See Also:
- Constant Field Values
-
STANDARD_DATE_FORMAT_SEPARATOR
public static final String STANDARD_DATE_FORMAT_SEPARATOR
Used in the date format pattern to separate the date and time styles.- See Also:
- Constant Field Values
-
STANDARD_NUMBER_FORMAT_DURATION
public static final String STANDARD_NUMBER_FORMAT_DURATION
Number pattern to show integer value as duration expressed in hours:minutes:seconds.- See Also:
- Constant Field Values
-
-
Method Detail
-
createDateFormat
public DateFormat createDateFormat(String pattern, Locale locale, TimeZone tz)
- Specified by:
createDateFormatin interfaceFormatFactory
-
getDateStyle
protected static int[] getDateStyle(String pattern)
-
getDateFormat
protected static DateFormat getDateFormat(int[] dateStyle, int[] timeStyle, Locale locale)
-
createNumberFormat
public NumberFormat createNumberFormat(String pattern, Locale locale)
- Specified by:
createNumberFormatin interfaceFormatFactory
-
createFormatFactory
public static FormatFactory createFormatFactory(String formatFactoryClassName)
-
-