public class RowBandingFunction extends AbstractFunction implements PageEventListener, LayoutProcessorFunction
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 and Description |
---|
RowBandingFunction()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getElement()
Returns the element name.
|
String |
getGroup() |
boolean |
getInitialState()
Returns the initial visibility that is used on the start of a new report, a new group or a new page.
|
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 |
groupStarted(ReportEvent event)
Receives notification that a group has started.
|
boolean |
isIgnoreCrosstabMode() |
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 |
setGroup(String group) |
void |
setIgnoreCrosstabMode(boolean ignoreCrosstabMode) |
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.
|
void |
summaryRowSelection(ReportEvent event)
A crosstab specific event notifying crosstab-aware functions to select the result for the summary row cell that
will be printed next.
|
groupFinished, itemsFinished, reportDone, reportFinished, reportStarted
clone, getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
groupFinished, itemsFinished, reportDone, reportFinished, reportStarted
clone, getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setDependencyLevel, setName, setRuntime
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 void groupStarted(ReportEvent event)
AbstractFunction
groupStarted
in interface ReportListener
groupStarted
in class AbstractFunction
event
- the event.public void summaryRowSelection(ReportEvent event)
AbstractFunction
summaryRowSelection
in interface ReportListener
summaryRowSelection
in class AbstractFunction
event
- The report event.public boolean isIgnoreCrosstabMode()
public void setIgnoreCrosstabMode(boolean ignoreCrosstabMode)
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 getInitialState()
public void setInitialState(boolean initialState)
initialState
- the initial value for the trigger.public void setElement(String name)
name
- The element name.org.pentaho.reporting.engine.classic.core.function.FunctionUtilities#findAllElements(org.pentaho.reporting
.engine.classic.core.Band, String)
public String getElement()
setElement(String)
public String getGroup()
public void setGroup(String group)
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
Copyright © 2002–2017 Pentaho Corporation. All rights reserved.