org.pentaho.reporting.engine.classic.core.function
Class AbstractElementFormatFunction

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.function.AbstractExpression
      extended by org.pentaho.reporting.engine.classic.core.function.AbstractFunction
          extended by org.pentaho.reporting.engine.classic.core.function.AbstractElementFormatFunction
All Implemented Interfaces:
Serializable, Cloneable, EventListener, PageEventListener, ReportListener, Expression, Function, LayoutProcessorFunction
Direct Known Subclasses:
AttributeExpressionsEvaluator, CellFormatFunction, CreateHyperLinksFunction, ElementColorFunction, ElementTrafficLightFunction, ElementVisibilityFunction, HideElementByNameFunction, HideElementIfDataAvailableExpression, HideNullValuesFunction, MetaDataStyleEvaluator, NegativeNumberPaintChangeFunction, SheetNameFunction, ShowElementByNameFunction, ShowElementIfDataAvailableExpression, StyleExpressionsEvaluator, WizardItemHideFunction

public abstract class AbstractElementFormatFunction
extends AbstractFunction
implements PageEventListener, LayoutProcessorFunction

The AbstractElementFormatFunction provides a common base implementation for all functions that need to modify the report definition or the style of an report element or band during the report processing.

The Expression retrieves the next root-level band that will be printed and uses this band as parameter for the processRootBand(org.pentaho.reporting.engine.classic.core.Band) method.

Author:
Thomas Morgner
See Also:
Serialized Form

Method Summary
 String getElement()
          Returns the element name.
 Object getValue()
          Format-Functions usually are not expected to return anything.
 void groupFinished(ReportEvent event)
          Processes the group footer of the current group.
 void groupStarted(ReportEvent event)
          Processes the group header of the current group.
 void itemsAdvanced(ReportEvent event)
          Processes the ItemBand.
 void itemsFinished(ReportEvent event)
          Receives notification that a group of item bands has been completed.
 void itemsStarted(ReportEvent event)
          Processes the No-Data-Band.
 void pageFinished(ReportEvent event)
          Processes the page footer.
 void pageStarted(ReportEvent event)
          Processes the page header.
 void reportFinished(ReportEvent event)
          Processes the Report-Footer.
 void reportInitialized(ReportEvent event)
          Receives notification that report generation initializes the current run.
 void reportStarted(ReportEvent event)
          Processes the Report-Header.
 void setElement(String name)
          Sets the element name.
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractFunction
reportDone
 
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
reportDone
 
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
 

Method Detail

setElement

public void setElement(String name)
Sets the element name. The name denotes an element or band within the root-band or the root-band itself. It is possible to define multiple elements with the same name to apply the modification to all of these elements.

Parameters:
name - The element name.
See Also:
FunctionUtilities.findAllElements(org.pentaho.reporting.engine.classic.core.Band,String)

getElement

public String getElement()
Returns the element name.

Returns:
The element name.
See Also:
setElement(String)

itemsStarted

public void itemsStarted(ReportEvent event)
Processes the No-Data-Band.

Specified by:
itemsStarted in interface ReportListener
Overrides:
itemsStarted in class AbstractFunction
Parameters:
event - the report event.

itemsAdvanced

public void itemsAdvanced(ReportEvent event)
Processes the ItemBand.

Specified by:
itemsAdvanced in interface ReportListener
Overrides:
itemsAdvanced in class AbstractFunction
Parameters:
event - the event.

itemsFinished

public void itemsFinished(ReportEvent event)
Receives notification that a group of item bands has been completed.

The itemBand is finished, the report starts to close open groups.

Specified by:
itemsFinished in interface ReportListener
Overrides:
itemsFinished in class AbstractFunction
Parameters:
event - The event.

reportInitialized

public void reportInitialized(ReportEvent event)
Receives notification that report generation initializes the current run.

The event carries a ReportState.Started state. Use this to initialize the report.

Specified by:
reportInitialized in interface ReportListener
Overrides:
reportInitialized in class AbstractFunction
Parameters:
event - The event.

reportFinished

public void reportFinished(ReportEvent event)
Processes the Report-Footer.

Specified by:
reportFinished in interface ReportListener
Overrides:
reportFinished in class AbstractFunction
Parameters:
event - the event.

reportStarted

public void reportStarted(ReportEvent event)
Processes the Report-Header.

Specified by:
reportStarted in interface ReportListener
Overrides:
reportStarted in class AbstractFunction
Parameters:
event - the event.

groupStarted

public void groupStarted(ReportEvent event)
Processes the group header of the current group.

Specified by:
groupStarted in interface ReportListener
Overrides:
groupStarted in class AbstractFunction
Parameters:
event - the event.

groupFinished

public void groupFinished(ReportEvent event)
Processes the group footer of the current group.

Specified by:
groupFinished in interface ReportListener
Overrides:
groupFinished in class AbstractFunction
Parameters:
event - the event.

pageFinished

public void pageFinished(ReportEvent event)
Processes the page footer.

Specified by:
pageFinished in interface PageEventListener
Parameters:
event - the event.

pageStarted

public void pageStarted(ReportEvent event)
Processes the page header.

Specified by:
pageStarted in interface PageEventListener
Parameters:
event - the event.

getValue

public Object getValue()
Format-Functions usually are not expected to return anything.

Specified by:
getValue in interface Expression
Returns:
null, as format functions do not compute values.