Class ElementColorFunction
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.function.AbstractExpression
-
- org.pentaho.reporting.engine.classic.core.function.AbstractFunction
-
- org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction
-
- org.pentaho.reporting.engine.classic.core.function.ElementColorFunction
-
- All Implemented Interfaces:
Serializable
,Cloneable
,EventListener
,PageEventListener
,ReportListener
,Expression
,Function
,LayoutProcessorFunction
public class ElementColorFunction extends AbstractElementFormatFunction
Deprecated.add a style expression for the 'paint' style insteadA function that alternates between true and false for each item within a group. The functions value affects a defined elements color. If the function evaluates to true, the named element is painted with the colorTrue, else the element is painted with colorFalse. Use the propertyelement
to name an element contained in the ItemBand whose color should be affected by this function. All colors have the color 'black' by default.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ElementColorFunction()
Deprecated.Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected boolean
evaluateElement(ReportElement e)
Deprecated.Color
getColorFalse()
Deprecated.Returns the color for false values.Color
getColorTrue()
Deprecated.Returns the color for true values.String
getField()
Deprecated.Returns the field used by the function.protected boolean
isValueTrue()
Deprecated.Computes the boolean value.void
setColorFalse(Color colorFalse)
Deprecated.Sets the color for false values.void
setColorTrue(Color colorTrue)
Deprecated.Sets the color for true values.void
setField(String field)
Deprecated.Sets the field name for the function.-
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction
getDependencyLevel, getElement, getInstance, getValue, groupFinished, groupStarted, isExecutable, itemsAdvanced, itemsFinished, itemsStarted, pageFinished, pageStarted, processBand, processFooterBands, processGroupHeaders, processHeaderBands, processRootBand, recordCacheHit, recordCacheMiss, reportCachePerformance, reportDone, reportFinished, reportInitialized, reportStarted, setElement
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractFunction
summaryRowSelection
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
clone, getDataRow, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression
clone, getDataRow, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setDependencyLevel, setName, setRuntime
-
Methods inherited from interface org.pentaho.reporting.engine.classic.core.event.ReportListener
summaryRowSelection
-
-
-
-
Method Detail
-
getField
public String getField()
Deprecated.Returns the field used by the function. The field name corresponds to a column name in the report's data-row.- Returns:
- The field name.
-
setField
public void setField(String field)
Deprecated.Sets the field name for the function. The field name corresponds to a column name in the report's data-row.- Parameters:
field
- the field name.
-
setColorTrue
public void setColorTrue(Color colorTrue)
Deprecated.Sets the color for true values.- Parameters:
colorTrue
- the color.
-
setColorFalse
public void setColorFalse(Color colorFalse)
Deprecated.Sets the color for false values.- Parameters:
colorFalse
- the color.
-
getColorTrue
public Color getColorTrue()
Deprecated.Returns the color for true values.- Returns:
- A color.
-
getColorFalse
public Color getColorFalse()
Deprecated.Returns the color for false values.- Returns:
- A color.
-
evaluateElement
protected boolean evaluateElement(ReportElement e)
Deprecated.- Specified by:
evaluateElement
in classAbstractElementFormatFunction
-
isValueTrue
protected boolean isValueTrue()
Deprecated.Computes the boolean value. This method returns true only if the value is a java.lang.Boolean with the value true.- Returns:
- true if the datarow column contains Boolean.TRUE.
-
-