Class PaintComponentFunction

  • All Implemented Interfaces:
    Serializable, Cloneable, EventListener, ReportListener, Expression, Function

    public class PaintComponentFunction
    extends AbstractFunction
    Deprecated.
    Use the new Component-Element instead. It uses drawables for this job, and therefore the result looks much better. This method does no longer work, as it depended on implementation details that are no longer in use.
    Paints a AWT or Swing Component, fitting the component into the element bounds. The component must be contained in the dataRow.

    In an headless environment this function wont work and will always return null.

    Author:
    Thomas Morgner
    See Also:
    Serialized Form
    • Constructor Detail

      • PaintComponentFunction

        public PaintComponentFunction()
        Deprecated.
        DefaultConstructor.
    • Method Detail

      • getElement

        public String getElement()
        Deprecated.
        Returns the element used by the function.

        The element name corresponds to a element in the report. The element name must be unique, as the first occurence of the element is used.

        Returns:
        The field name.
      • setElement

        public void setElement​(String field)
        Deprecated.
        Sets the element name for the function.

        The element name corresponds to a element in the report. The element name must be unique, as the first occurence of the element is used.

        Parameters:
        field - the field name (null not permitted).
      • 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.
      • isHeadless

        protected static boolean isHeadless()
        Deprecated.
        Tests, whether the report generation is executed in an headless environment.
        Returns:
        true, if this is an headless environment, false otherwise.
      • getValue

        public Object getValue()
        Deprecated.
        Return the current expression value.

        The value depends (obviously) on the expression implementation.

        Returns:
        the value of the function.
      • setScale

        public void setScale​(float scale)
        Deprecated.
        Define a scale factor for the created image. Using a higher scale factor will produce better results. A scale factor of 2 will double the resolution. A scale factor of 1 will create 72 dpi images.
        Parameters:
        scale - the scale factor.
      • getScale

        public float getScale()
        Deprecated.
        Gets the scale factor for the created image. Using a higher scale factor will produce better results. A scale factor of 2 will double the resolution. A scale factor of 1 will create 72 dpi images.
        Returns:
        the scale factor.
      • getInstance

        public Expression getInstance()
        Deprecated.
        Return a completly separated copy of this function. The copy does no longer share any changeable objects with the original function.
        Specified by:
        getInstance in interface Expression
        Overrides:
        getInstance in class AbstractExpression
        Returns:
        a copy of this function.