org.pentaho.reporting.engine.classic.core.function
Class NegativeNumberPaintChangeFunction

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.function.AbstractExpression
      extended by org.pentaho.reporting.engine.classic.core.function.AbstractFunction
          extended by org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction
              extended by org.pentaho.reporting.engine.classic.core.function.NegativeNumberPaintChangeFunction
All Implemented Interfaces:
Serializable, Cloneable, EventListener, PageEventListener, ReportListener, Expression, Function, LayoutProcessorFunction

Deprecated. The same thing can be achieved using a simple StyleExpression on the element's PAINT stylekey.

public class NegativeNumberPaintChangeFunction
extends AbstractElementFormatFunction

This function changes the color of the named elements according to the current value of a numeric field. If the value of the field is not numeric (or null), the positive color is set.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
NegativeNumberPaintChangeFunction()
          Deprecated. Default Constructor.
 
Method Summary
 String getField()
          Deprecated. Returns the name of the data-row column from where to read the numeric value.
 Color getNegativeColor()
          Deprecated. Returns the color that is used if the number read from the field is negative.
 Color getPositiveColor()
          Deprecated. Returns the color that is used if the number read from the field is positive.
 Color getZeroColor()
          Deprecated. Returns the color that is used if the number read from the field is zero.
 void setField(String field)
          Deprecated. Defines the name of the data-row column from where to read the numeric value.
 void setNegativeColor(Color negativeColor)
          Deprecated. Defines the color that is used if the number read from the field is negative.
 void setPositiveColor(Color positiveColor)
          Deprecated. Defines the color that is used if the number read from the field is positive.
 void setZeroColor(Color zeroColor)
          Deprecated. Defines the color that is used if the number read from the field is zero.
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction
getElement, getValue, groupFinished, groupStarted, itemsAdvanced, itemsFinished, itemsStarted, pageFinished, pageStarted, reportFinished, reportInitialized, reportStarted, setElement
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractFunction
reportDone
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
clone, getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pentaho.reporting.engine.classic.core.event.ReportListener
reportDone
 
Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression
clone, getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setDependencyLevel, setName, setRuntime
 

Constructor Detail

NegativeNumberPaintChangeFunction

public NegativeNumberPaintChangeFunction()
Deprecated. 
Default Constructor.

Method Detail

getPositiveColor

public Color getPositiveColor()
Deprecated. 
Returns the color that is used if the number read from the field is positive.

Returns:
the color for positive values.

setPositiveColor

public void setPositiveColor(Color positiveColor)
Deprecated. 
Defines the color that is used if the number read from the field is positive.

Parameters:
positiveColor - the color for positive values.

getNegativeColor

public Color getNegativeColor()
Deprecated. 
Returns the color that is used if the number read from the field is negative.

Returns:
the color for negative values.

setNegativeColor

public void setNegativeColor(Color negativeColor)
Deprecated. 
Defines the color that is used if the number read from the field is negative.

Parameters:
negativeColor - the color for negative values.

getZeroColor

public Color getZeroColor()
Deprecated. 
Returns the color that is used if the number read from the field is zero.

Returns:
the color for zero values.

setZeroColor

public void setZeroColor(Color zeroColor)
Deprecated. 
Defines the color that is used if the number read from the field is zero.

Parameters:
zeroColor - the color for zero values.

getField

public String getField()
Deprecated. 
Returns the name of the data-row column from where to read the numeric value.

Returns:
the field name.

setField

public void setField(String field)
Deprecated. 
Defines the name of the data-row column from where to read the numeric value.

Parameters:
field - the field name.