|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.function.AbstractFunction
org.jfree.report.function.PaintComponentFunction
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.
Field Summary | |
static java.lang.String |
ELEMENT_PROPERTY
Literal text for the 'field' property. |
static java.lang.String |
FIELD_PROPERTY
Literal text for the 'field' property. |
static java.lang.String |
SCALE_PROPERTY
Literal text for the 'scale' property. |
Fields inherited from interface org.jfree.report.function.Expression |
AUTOACTIVATE_PROPERTY |
Constructor Summary | |
PaintComponentFunction()
DefaultConstructor. |
Method Summary | |
java.lang.String |
getElement()
Returns the element used by the function. |
java.lang.String |
getField()
Returns the field used by the function. |
Expression |
getInstance()
Return a completly separated copy of this function. |
float |
getScale()
Gets the scale factor for the created image. |
java.lang.Object |
getValue()
Return the current expression value. |
void |
initialize()
Initializes the function and tests that all required properties are set. |
protected static boolean |
isHeadless()
Tests, whether the report generation is executed in an headless environment. |
void |
layoutComplete(LayoutEvent event)
Receives notification that the band layouting has completed. |
void |
setElement(java.lang.String field)
Sets the element name for the function. |
void |
setField(java.lang.String field)
Sets the field name for the function. |
void |
setScale(float scale)
Define a scale factor for the created image. |
Methods inherited from class org.jfree.report.function.AbstractFunction |
clone, getDataRow, getDependencyLevel, getName, getProperties, getProperty, getProperty, groupFinished, groupStarted, isActive, itemsAdvanced, itemsFinished, itemsStarted, reportDone, reportFinished, reportInitialized, reportStarted, setDataRow, setDependencyLevel, setName, setProperties, setProperty |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String FIELD_PROPERTY
public static final java.lang.String ELEMENT_PROPERTY
public static final java.lang.String SCALE_PROPERTY
Constructor Detail |
public PaintComponentFunction()
Method Detail |
public java.lang.String getElement()
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.
public void setElement(java.lang.String field)
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.
field
- the field name (null not permitted).public java.lang.String getField()
The field name corresponds to a column name in the report's TableModel.
public void setField(java.lang.String field)
The field name corresponds to a column name in the report's TableModel.
field
- the field name (null not permitted).protected static boolean isHeadless()
public void layoutComplete(LayoutEvent event)
The event carries the current report state.
layoutComplete
in interface LayoutListener
event
- The event.public java.lang.Object getValue()
The value depends (obviously) on the expression implementation.
getValue
in interface Expression
public void setScale(float scale)
scale
- the scale factor.public float getScale()
public Expression getInstance()
getInstance
in interface Expression
getInstance
in class AbstractFunction
public void initialize() throws FunctionInitializeException
initialize
in interface Expression
initialize
in class AbstractFunction
FunctionInitializeException
- when no field is set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |