Class 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 instead
    A 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 property element 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 Detail

      • ElementColorFunction

        public ElementColorFunction()
        Deprecated.
        Default constructor.
    • 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.
      • 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.