|
||||||||||
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.ItemHideFunction
The ItemHideFunction hides equal values in a group. Only the first changed value is printed.
This function uses the property element
to define the name of the element in the
ItemBand that should be made visible or invisible by this function.
The property field
defines the field in the datasource or the expression which
should be used to determine the visibility.
Field Summary | |
static java.lang.String |
ELEMENT_PROPERTY
Literal text for the 'element' property. |
static java.lang.String |
FIELD_PROPERTY
Literal text for the 'field' property. |
Fields inherited from interface org.jfree.report.function.Expression |
AUTOACTIVATE_PROPERTY |
Constructor Summary | |
ItemHideFunction()
Constructs an unnamed function. |
|
ItemHideFunction(java.lang.String name)
Constructs a named function. |
Method Summary | |
java.lang.String |
getElement()
Returns the name of the element in the item band that should be set visible/invisible. |
java.lang.String |
getField()
Returns the field used by the function. |
Expression |
getInstance()
Return a completly separated copy of this function. |
java.lang.Object |
getValue()
Returns the function value, in this case the visibility of the defined element. |
void |
initialize()
Initializes the function and tests that all required properties are set. |
void |
itemsAdvanced(ReportEvent event)
Receives notification that a row of data is being processed. |
void |
itemsStarted(ReportEvent event)
Resets the state of the function when a new ItemGroup has started. |
void |
setElement(java.lang.String name)
Sets the name of the element in the item band that should be set visible/invisible. |
void |
setField(java.lang.String field)
Sets the field name for the function. |
Methods inherited from class org.jfree.report.function.AbstractFunction |
clone, getDataRow, getDependencyLevel, getName, getProperties, getProperty, getProperty, groupFinished, groupStarted, isActive, itemsFinished, 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 ELEMENT_PROPERTY
public static final java.lang.String FIELD_PROPERTY
Constructor Detail |
public ItemHideFunction()
Make sure to set the function name before it is used, or function initialisation will fail.
public ItemHideFunction(java.lang.String name)
The field must be defined before using the function.
name
- The function name.Method Detail |
public java.lang.String getElement()
public void setElement(java.lang.String name)
name
- the element name (must not be null).public java.lang.String getField()
The field name corresponds to a column name in the report's TableModel or to an expression.
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).public void itemsAdvanced(ReportEvent event)
itemsAdvanced
in interface ReportListener
itemsAdvanced
in class AbstractFunction
event
- Information about the event.public void itemsStarted(ReportEvent event)
itemsStarted
in interface ReportListener
itemsStarted
in class AbstractFunction
event
- the report event.public java.lang.Object getValue()
getValue
in interface Expression
public void initialize() throws FunctionInitializeException
initialize
in interface Expression
initialize
in class AbstractFunction
FunctionInitializeException
- when no field or element is set.public Expression getInstance()
getInstance
in interface Expression
getInstance
in class AbstractFunction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |