|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.function.AbstractExpression
org.pentaho.reporting.engine.classic.core.function.AbstractFunction
org.pentaho.reporting.engine.classic.core.function.ElementVisibilitySwitchFunction
public class 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.
Prior to Version 0.8.9, Elements in the Classic Engine did not define their own background color attribute. To create a background, one had to place a rectangle shape element behind the element. To modify the band's background directly, use theRowBandingFunction
. The
ElementVisibilitySwitchFunction is used to trigger the visibility of an named element. If the element is your
background, you will get the alternating effect. The ElementVisibilitySwitchFunction defines two parameters:
The name of the element(s) in the itemband that should be modified. The element(s) must be named using the "name" attribute.
The initial state of the function. (true or false) defaults to false. This is the reverse of the element's visiblity (set to false to start with an visible element, set to true to hide the element in the first itemrow).
Constructor Summary | |
---|---|
ElementVisibilitySwitchFunction()
Deprecated. Default constructor. |
Method Summary | |
---|---|
String |
getElement()
Deprecated. Returns the element name. |
boolean |
getInitialState()
Deprecated. Returns the initial visibility that is used on the start of a new report, a new group or a new page. |
boolean |
getInitialTriggerValue()
Deprecated. use getInitialState instead. |
Boolean |
getNewPageState()
Deprecated. Returns the visibility state that should be used on new pages. |
int |
getNumberOfElements()
Deprecated. Returns the number of rows that must be processed before the visibility can switch again. |
Object |
getValue()
Deprecated. Returns the defined visibility of the element. |
void |
itemsAdvanced(ReportEvent event)
Deprecated. Triggers the visibility of an element. |
void |
itemsStarted(ReportEvent event)
Deprecated. Receives notification that the items are being processed. |
void |
pageFinished(ReportEvent event)
Deprecated. Receives notification that a page is completed. |
void |
pageStarted(ReportEvent event)
Deprecated. Receives notification that a page has started. |
void |
reportInitialized(ReportEvent event)
Deprecated. Receives notification that report generation initializes the current run. |
void |
setElement(String name)
Deprecated. Sets the element name. |
void |
setInitialState(boolean initialState)
Deprecated. Defines the initial visibility that is used on the start of a new report, a new group or a new page. |
void |
setNewPageState(Boolean newPageState)
Deprecated. Defines the visibility state that should be used on new pages. |
void |
setNumberOfElements(int numberOfElements)
Deprecated. Defines the number of rows that must be processed before the visibility can switch again. |
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractFunction |
---|
groupFinished, groupStarted, itemsFinished, reportDone, reportFinished, reportStarted |
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression |
---|
clone, getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.pentaho.reporting.engine.classic.core.event.ReportListener |
---|
groupFinished, groupStarted, itemsFinished, reportDone, reportFinished, reportStarted |
Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression |
---|
clone, getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setDependencyLevel, setName, setRuntime |
Constructor Detail |
---|
public ElementVisibilitySwitchFunction()
Method Detail |
---|
public void pageStarted(ReportEvent event)
pageStarted
in interface PageEventListener
event
- the event.public void pageFinished(ReportEvent event)
pageFinished
in interface PageEventListener
event
- The event.public void reportInitialized(ReportEvent event)
The event carries a ReportState.Started state. Use this to initialize the report.
reportInitialized
in interface ReportListener
reportInitialized
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 int getNumberOfElements()
public void setNumberOfElements(int numberOfElements)
numberOfElements
- a row count.public boolean getInitialTriggerValue()
public boolean getInitialState()
public void setInitialState(boolean initialState)
initialState
- the initial value for the trigger.public void setElement(String name)
name
- The element name.FunctionUtilities.findAllElements(org.pentaho.reporting.engine.classic.core.Band,String)
public String getElement()
setElement(String)
public Boolean getNewPageState()
public void setNewPageState(Boolean newPageState)
newPageState
- the state on new pages or null to use the initialState.public Object getValue()
getValue
in interface Expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |