public class NumberFormatFilter extends FormatFilter
NumberFormat
,
Serialized FormConstructor and Description |
---|
NumberFormatFilter()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
FormatSpecification |
getFormatString(ExpressionRuntime runtime,
ReportElement element,
FormatSpecification formatSpecification)
Returns information about the formatstring that was used to transform a raw-value into a formatted text.
|
int |
getMaximumFractionDigits()
Returns the maximum number of fraction digits.
|
int |
getMaximumIntegerDigits()
Returns the maximum number of integer digits.
|
int |
getMinimumFractionDigits()
Returns the minimum number of fraction digits.
|
int |
getMinimumIntegerDigits()
Returns the minimum number of integer digits.
|
NumberFormat |
getNumberFormat()
Returns the number format.
|
boolean |
isGroupingUsed()
Returns the value of the grouping flag for the current number format.
|
void |
setFormatter(Format f)
Sets the formatter.
|
void |
setGroupingUsed(boolean newValue)
Turns grouping on or off for the current number format.
|
void |
setMaximumFractionDigits(int newValue)
Sets the maximum number of fraction digits for the current number format.
|
void |
setMaximumIntegerDigits(int newValue)
Sets the maximum number of digits in the integer part of the current number format.
|
void |
setMinimumFractionDigits(int newValue)
Sets the minimum number of fraction digits for the current number format.
|
void |
setMinimumIntegerDigits(int newValue)
Sets the minimum number of digits in the integer part of the current number format.
|
void |
setNumberFormat(NumberFormat nf)
Sets the number format.
|
clone, getDataSource, getFormatter, getNullValue, getRawValue, getValue, setDataSource, setNullValue
public NumberFormatFilter()
Uses a general number format for the current locale.
public void setNumberFormat(NumberFormat nf)
nf
- The number format.public NumberFormat getNumberFormat()
public void setFormatter(Format f)
setFormatter
in class FormatFilter
f
- The format.public void setGroupingUsed(boolean newValue)
newValue
- The new value of the grouping flag.public boolean isGroupingUsed()
public void setMaximumFractionDigits(int newValue)
newValue
- The number of digits.public int getMaximumFractionDigits()
public void setMaximumIntegerDigits(int newValue)
newValue
- The number of digits.public int getMaximumIntegerDigits()
public void setMinimumFractionDigits(int newValue)
newValue
- The number of digits.public int getMinimumFractionDigits()
public void setMinimumIntegerDigits(int newValue)
newValue
- The number of digits.public int getMinimumIntegerDigits()
public FormatSpecification getFormatString(ExpressionRuntime runtime, ReportElement element, FormatSpecification formatSpecification)
RawDataSource
.classic.core.filter.FormatSpecification#TYPE_UNDEFINED
in that case.getFormatString
in interface RawDataSource
getFormatString
in class FormatFilter
runtime
- the Expression runtime used to possibly compute the raw-value.element
- the element to which this datasource is added.formatSpecification
- the format specification (can be null). @return a filled format specififcation. If the
formatSpecification
parameter was not null, this given instance is reused.