|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.report.function.AbstractFunction | +--com.jrefinery.report.function.ElementVisibilitySwitchFunction
A function that alternates between true and false for each item within a group. The functions value affects a defined elements visibility. If the function evaluates to true, the named element is visible, else the element is invisible.
Use the property element
to name an element contained in the ItemBand whose
visiblity should be affected by this function.
Field Summary | |
static java.lang.String |
ELEMENT_PROPERTY
the Property key for the name of the ItemBand element. |
static java.lang.String |
INITIAL_STATE_PROPERTY
The initial state property key. |
Fields inherited from interface com.jrefinery.report.function.Expression |
AUTOACTIVATE_PROPERTY |
Constructor Summary | |
ElementVisibilitySwitchFunction()
Default constructor. |
Method Summary | |
java.lang.String |
getElement()
Returns the element name. |
boolean |
getInitialTriggerValue()
Gets the initial value for the visible trigger, either "true" or "false". |
java.lang.Object |
getValue()
Returns the defined visibility of the element. |
void |
initialize()
Checks that the function has been correctly initialized. |
void |
itemsAdvanced(ReportEvent event)
Triggers the visibility of an element. |
void |
itemsStarted(ReportEvent event)
Receives notification that the items are being processed. |
void |
pageStarted(ReportEvent event)
Receives notification that a page has started. |
void |
setElement(java.lang.String name)
Sets the element name. |
Methods inherited from class com.jrefinery.report.function.AbstractFunction |
clone, getDataRow, getDependencyLevel, getInstance, getName, getProperties, getProperty, getProperty, groupFinished, groupStarted, isActive, itemsFinished, pageFinished, 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 INITIAL_STATE_PROPERTY
Constructor Detail |
public ElementVisibilitySwitchFunction()
Method Detail |
public void pageStarted(ReportEvent event)
pageStarted
in interface ReportListener
pageStarted
in class AbstractFunction
event
- the event.public void itemsStarted(ReportEvent event)
Following this event, there will be a sequence of itemsAdvanced events until the itemsFinished event is raised.
itemsStarted
in interface ReportListener
itemsStarted
in class AbstractFunction
event
- Information about the event.public void itemsAdvanced(ReportEvent event)
itemsAdvanced
in interface ReportListener
itemsAdvanced
in class AbstractFunction
event
- the report event.public void initialize() throws FunctionInitializeException
initialize
in interface Expression
initialize
in class AbstractFunction
FunctionInitializeException
- if required parameters were missing and initialisation
cannot be performed.public boolean getInitialTriggerValue()
public void setElement(java.lang.String name)
name
- The element name.Band.getElement(String)
public java.lang.String getElement()
public java.lang.Object getValue()
getValue
in interface Expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |