public class LocaleNumericFormat extends java.lang.Object implements IFormat
NumericFormat
,
DateTimeFormat
,
LocaleDateTimeFormat
,
LogicalFormat
,
IFormat
Modifier and Type | Field and Description |
---|---|
static int |
CURRENCY
Currency format
|
static int |
NUMBER
Number format
|
static int |
PERCENT
Percent format
|
BARCODE, DATETIME, IMAGEURL, LOCALEDATETIME, LOCALENUMERIC, LOGICAL, NUMERIC, STRING, TEXTURL
Modifier and Type | Method and Description |
---|---|
static LocaleNumericFormat |
createFormat(java.lang.String text)
For internal use only.
|
java.lang.String |
format(java.lang.Object obj)
Define quadbase.reportdesigner.util.IFormat.
|
static LocaleNumericFormat |
getCurrencyInstance()
Create an instance of currency format for the default locale.
|
static LocaleNumericFormat |
getCurrencyInstance(java.util.Locale locale)
Create an instance of currency format for the specified locale.
|
int |
getFormatType()
Define quadbase.reportdesigner.util.IFormat.
|
int |
getInstanceType()
Get the type of the instance.
|
java.text.NumberFormat |
getNumberFormat()
This method returns the java object from LocaleNumberFormat, and the returned value can later
be used to setup the format of the current instance.
|
static LocaleNumericFormat |
getNumberInstance()
Create an instance of numeric format for the default locale.
|
static LocaleNumericFormat |
getNumberInstance(java.util.Locale locale)
Create an instance of numeric format for the specified locale.
|
static LocaleNumericFormat |
getPercentInstance()
Create an instance of percentage format for the default locale.
|
static LocaleNumericFormat |
getPercentInstance(java.util.Locale locale)
Create an instance of percentage format for the specified locale.
|
java.lang.String |
getTextFormat()
For internal use only.
|
void |
setFormat(LocaleNumericFormat obj)
Copy the following attributes of the object to this: maximum fraction digits, minimum
fraction digits, maximum integer digits, minimum integer digits, grouping and parse integer
only.
|
void |
setLocale(java.util.Locale locale)
Sets the format locale
|
public static final int CURRENCY
public static final int NUMBER
public static final int PERCENT
public void setLocale(java.util.Locale locale)
locale
- The locale to become this format locale.public int getFormatType()
getFormatType
in interface IFormat
public java.lang.String format(java.lang.Object obj)
public static LocaleNumericFormat getCurrencyInstance()
public static LocaleNumericFormat getCurrencyInstance(java.util.Locale locale)
locale
- the specified localepublic static LocaleNumericFormat getNumberInstance()
public static LocaleNumericFormat getNumberInstance(java.util.Locale locale)
locale
- the specified localepublic static LocaleNumericFormat getPercentInstance()
public static LocaleNumericFormat getPercentInstance(java.util.Locale locale)
locale
- the specified localepublic java.text.NumberFormat getNumberFormat()
public int getInstanceType()
public void setFormat(LocaleNumericFormat obj)
obj
- Another LocaleNumericFormat instanceNumberFormat
public java.lang.String getTextFormat()
getTextFormat
in interface IFormat
public static LocaleNumericFormat createFormat(java.lang.String text) throws java.lang.Exception
java.lang.Exception