Save This Page
Home » pentaho-reporting-engine-classic-0.8.10 » org » jfree » report » filter » [javadoc | source]
org.jfree.report.filter
public class: DecimalFormatFilter [javadoc | source]
java.lang.Object
   org.jfree.report.filter.FormatFilter
      org.jfree.report.filter.NumberFormatFilter
         org.jfree.report.filter.DecimalFormatFilter

All Implemented Interfaces:
    RawDataSource, DataFilter

A filter that formats the numeric value from a data source to a string representation using the decimal number system as base.

This filter will format java.lang.Number objects using a java.text.DecimalFormat to create the string representation for the date obtained from the datasource.

If the object read from the datasource is no date, the NullValue defined by setNullValue(Object) is returned.

Constructor:
 public DecimalFormatFilter() 
Method from org.jfree.report.filter.DecimalFormatFilter Summary:
getDecimalFormat,   getFormatString,   getFormatString,   getLocalizedFormatString,   getValue,   isKeepState,   setDecimalFormat,   setFormatString,   setFormatter,   setKeepState,   setLocalizedFormatString
Methods from org.jfree.report.filter.NumberFormatFilter:
getFormatString,   getMaximumFractionDigits,   getMaximumIntegerDigits,   getMinimumFractionDigits,   getMinimumIntegerDigits,   getNumberFormat,   isGroupingUsed,   setFormatter,   setGroupingUsed,   setMaximumFractionDigits,   setMaximumIntegerDigits,   setMinimumFractionDigits,   setMinimumIntegerDigits,   setNumberFormat
Methods from org.jfree.report.filter.FormatFilter:
clone,   getDataSource,   getFormatString,   getFormatter,   getNullValue,   getRawValue,   getValue,   invalidateCache,   setDataSource,   setFormatter,   setNullValue
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.report.filter.DecimalFormatFilter Detail:
 public DecimalFormat getDecimalFormat() 
    Returns the format for the filter. The DecimalFormatParser has only DecimalFormat objects assigned.
 public String getFormatString() 
    Synthesizes a pattern string that represents the current state of this Format object.
 public FormatSpecification getFormatString(ExpressionRuntime runtime,
    Element element,
    FormatSpecification formatSpecification) 
 public String getLocalizedFormatString() 
    Synthesizes a localized pattern string that represents the current state of this Format object.
 public Object getValue(ExpressionRuntime runtime,
    Element element) 
    Returns the formatted string. The value is read using the data source given and formated using the formatter of this object. The formating is guaranteed to completly form the object to an string or to return the defined NullValue.

    If format, datasource or object are null, the NullValue is returned.

 public boolean isKeepState() 
    Defines, whether the filter should keep its state, if a locale change is detected. This will effectivly disable the locale update.
 public  void setDecimalFormat(DecimalFormat format) 
    Sets the format for the filter.
 public  void setFormatString(String format) 
    Applies a format string to the internal DecimalFormat instance.
 public  void setFormatter(Format format) 
    Sets the format for the filter. If the given format is no Decimal format, a ClassCastException is thrown
 public  void setKeepState(boolean keepState) 
    Defines, whether the filter should keep its state, if a locale change is detected. This will effectivly disable the locale update.
 public  void setLocalizedFormatString(String format) 
    Applies a localised format string to the internal DecimalFormat instance.