|
||||||||||
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.RowBandingFunction
public class RowBandingFunction
A function that alternates the background-color for each item-band within a group. If the function evaluates to true, then the background of the named element will be set to the visible-color, else it will be set to the invisible-color.
The ElementVisibilitySwitchFunction defines two parameters:The name of the element in the itemband that should be modified. The element(s) must be named using the "name" attribute, if no name is given here, the ItemBand's background color is defined instead.
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 | |
---|---|
RowBandingFunction()
Default constructor. |
Method Summary | |
---|---|
String |
getElement()
Returns the element name. |
boolean |
getInitialState()
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. |
Color |
getInvisibleBackground()
Returns the background color that is used if the row-banding background should be invisible. |
Boolean |
getNewPageState()
Returns the visibility state that should be used on new pages. |
int |
getNumberOfElements()
Returns the number of rows that must be processed before the visibility can switch again. |
Object |
getValue()
Returns the defined visibility of the element. |
Color |
getVisibleBackground()
Returns the background color that is used if the row-banding background should be visible. |
void |
itemsAdvanced(ReportEvent event)
Triggers the visibility of an element. |
void |
itemsStarted(ReportEvent event)
Receives notification that the items are being processed. |
void |
pageFinished(ReportEvent event)
Receives notification that a page is completed. |
void |
pageStarted(ReportEvent event)
Receives notification that a page has started. |
void |
reportInitialized(ReportEvent event)
Receives notification that report generation initializes the current run. |
void |
setElement(String name)
Sets the element name. |
void |
setInitialState(boolean initialState)
Defines the initial visibility that is used on the start of a new report, a new group or a new page. |
void |
setInvisibleBackground(Color invisibleBackground)
Defines the background color that is used if the row-banding background should be invisible. |
void |
setNewPageState(Boolean newPageState)
Defines the visibility state that should be used on new pages. |
void |
setNumberOfElements(int numberOfElements)
Defines the number of rows that must be processed before the visibility can switch again. |
void |
setVisibleBackground(Color visibleBackground)
Defines the background color that is used if the row-banding background should be visible. |
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 RowBandingFunction()
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 Color getInvisibleBackground()
public void setInvisibleBackground(Color invisibleBackground)
invisibleBackground
- a color.public Color getVisibleBackground()
public void setVisibleBackground(Color visibleBackground)
visibleBackground
- a color.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 |