org.eclipse.birt.report.model.api
Class DesignVisitor

java.lang.Object
  extended byorg.eclipse.birt.report.model.api.DesignVisitor

public class DesignVisitor
extends java.lang.Object

Applies logic customized to each type of report element. This is an implementation of the classic visitor pattern. The application creates a derived iterator, and overrides methods for the elements of interest. The visitor can also walk the design tree, performing actions on each element down the containment hierarchy.

By default, each method calls the method for its parent element. That is, a DataItem method calls the ReportItem method which calls the DesignElement method.


Nested Class Summary
protected  class DesignVisitor.Forwarder
          A class forward the visit of an element to its handle.
 
Field Summary
protected  DesignVisitor.Forwarder forwarder
          The private internal element visitor.
 
Constructor Summary
DesignVisitor()
          Constructs a DesignVisitor, which is not related with the specific report.
 
Method Summary
 void apply(DesignElementHandle handle)
          Applies this visitor to the given element.
protected  void visitCascadingParameterGroup(CascadingParameterGroupHandle obj)
          Visits the cascading parameter group element.
protected  void visitCell(CellHandle obj)
          Visits the cell element.
protected  void visitColumn(ColumnHandle obj)
          Visits the column element.
protected  void visitContents(SlotHandle slot)
          Visits the content of the slot.
protected  void visitDataItem(DataItemHandle obj)
          Visits the data element.
protected  void visitDataSet(DataSetHandle obj)
          Visits the data set element.
protected  void visitDataSource(DataSourceHandle obj)
          Visits the data source element.
protected  void visitDesignElement(DesignElementHandle obj)
          Visits the design element.
protected  void visitExtendedDataSet(OdaDataSetHandle obj)
          Visits the extended data set element.
protected  void visitExtendedDataSource(OdaDataSourceHandle obj)
          Visits the extended data source element.
protected  void visitExtendedItem(ExtendedItemHandle obj)
          Visits the extended element.
protected  void visitFreeForm(FreeFormHandle obj)
          Visits the free form element.
protected  void visitGraphicMasterPage(GraphicMasterPageHandle obj)
          Visits the graphic master page element.
protected  void visitGrid(GridHandle obj)
          Visits the grid element.
protected  void visitGroup(GroupHandle obj)
          Visits the group element.
protected  void visitImage(ImageHandle obj)
          Visits the image element.
protected  void visitLabel(LabelHandle obj)
          Visits the label element.
protected  void visitLibrary(LibraryHandle obj)
          Visits the library element.
protected  void visitLine(LineHandle obj)
          Visits the line element.
protected  void visitList(ListHandle obj)
          Visits the list element.
protected  void visitListGroup(ListGroupHandle obj)
          Visits the list group element.
protected  void visitMasterPage(MasterPageHandle obj)
          Visits the master page element.
protected  void visitModule(ModuleHandle obj)
          Visits the module element
protected  void visitParameter(ParameterHandle obj)
          Visits the parameter element.
protected  void visitParameterGroup(ParameterGroupHandle obj)
          Visits the parameter group element.
protected  void visitRectangle(RectangleHandle obj)
          Visits the rectangle element.
protected  void visitReportDesign(ReportDesignHandle obj)
          Visits the report design element.
protected  void visitReportItem(ReportItemHandle obj)
          Visits the report item.
protected  void visitRow(RowHandle obj)
          Visits the row element.
protected  void visitScalarParameter(ScalarParameterHandle obj)
          Visits the scalar parameter element.
protected  void visitScriptDataSet(ScriptDataSetHandle obj)
          Visits the script data set element.
protected  void visitScriptDataSource(ScriptDataSourceHandle obj)
          Visits the extended element.
protected  void visitSimpleMasterPage(SimpleMasterPageHandle obj)
          Visits the simple master page element.
protected  void visitStyle(StyleHandle obj)
          Visits the style element.
protected  void visitStyledElement(ReportItemHandle obj)
          Visits the styled element.
protected  void visitTable(TableHandle obj)
          Visits the table element.
protected  void visitTableGroup(TableGroupHandle obj)
          Visits the table group element.
 void visitTemplateDataSet(TemplateDataSetHandle obj)
          Visits the template data set.
 void visitTemplateElement(TemplateElementHandle obj)
          Visits the template element.
protected  void visitTemplateParameterDefinition(TemplateParameterDefinitionHandle obj)
          Visits the template parameter definition.
 void visitTemplateReportItem(TemplateReportItemHandle obj)
          Visits the template report item.
protected  void visitTextDataItem(TextDataHandle obj)
          Visits the multi-line data element.
protected  void visitTextItem(TextItemHandle obj)
          Visits the text element.
protected  void visitTheme(ThemeHandle obj)
          Visits the theme element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

forwarder

protected DesignVisitor.Forwarder forwarder
The private internal element visitor.

Constructor Detail

DesignVisitor

public DesignVisitor()
Constructs a DesignVisitor, which is not related with the specific report.

Method Detail

apply

public void apply(DesignElementHandle handle)
Applies this visitor to the given element.

Parameters:
handle - handle to the element to visit.

visitFreeForm

protected void visitFreeForm(FreeFormHandle obj)
Visits the free form element.

Parameters:
obj - the handle of the free form to traverse

visitDataSet

protected void visitDataSet(DataSetHandle obj)
Visits the data set element.

Parameters:
obj - the handle of the data set to traverse

visitScriptDataSet

protected void visitScriptDataSet(ScriptDataSetHandle obj)
Visits the script data set element.

Parameters:
obj - the handle of the script data set to traverse

visitDataSource

protected void visitDataSource(DataSourceHandle obj)
Visits the data source element.

Parameters:
obj - the handle of data source to traverse

visitLabel

protected void visitLabel(LabelHandle obj)
Visits the label element.

Parameters:
obj - the handle of the label to traverse

visitDataItem

protected void visitDataItem(DataItemHandle obj)
Visits the data element.

Parameters:
obj - the handle of the data to traverse

visitTextItem

protected void visitTextItem(TextItemHandle obj)
Visits the text element.

Parameters:
obj - the handle of the text to traverse

visitImage

protected void visitImage(ImageHandle obj)
Visits the image element.

Parameters:
obj - the handle of the image to traverse

visitList

protected void visitList(ListHandle obj)
Visits the list element.

Parameters:
obj - the handle of the list to traverse

visitGroup

protected void visitGroup(GroupHandle obj)
Visits the group element.

Parameters:
obj - the handle of the group to traverse

visitListGroup

protected void visitListGroup(ListGroupHandle obj)
Visits the list group element.

Parameters:
obj - the handle of the list group to traverse

visitTable

protected void visitTable(TableHandle obj)
Visits the table element.

Parameters:
obj - the handle of the table to traverse

visitTableGroup

protected void visitTableGroup(TableGroupHandle obj)
Visits the table group element.

Parameters:
obj - the handle of the table group to traverse

visitCell

protected void visitCell(CellHandle obj)
Visits the cell element.

Parameters:
obj - the handle of the cell to traverse

visitColumn

protected void visitColumn(ColumnHandle obj)
Visits the column element.

Parameters:
obj - the handle of the column to traverse

visitRow

protected void visitRow(RowHandle obj)
Visits the row element.

Parameters:
obj - the handle of the row to traverse

visitGrid

protected void visitGrid(GridHandle obj)
Visits the grid element.

Parameters:
obj - the handle of the grid to traverse

visitLine

protected void visitLine(LineHandle obj)
Visits the line element.

Parameters:
obj - the handle of the line to traverse

visitMasterPage

protected void visitMasterPage(MasterPageHandle obj)
Visits the master page element.

Parameters:
obj - the handle of the master page to traverse

visitParameterGroup

protected void visitParameterGroup(ParameterGroupHandle obj)
Visits the parameter group element.

Parameters:
obj - the handle of the parameter group to traverse

visitCascadingParameterGroup

protected void visitCascadingParameterGroup(CascadingParameterGroupHandle obj)
Visits the cascading parameter group element.

Parameters:
obj - the handle of the cascading parameter group to traverse

visitModule

protected void visitModule(ModuleHandle obj)
Visits the module element

Parameters:
obj - the handle of the module to traverse

visitLibrary

protected void visitLibrary(LibraryHandle obj)
Visits the library element.

Parameters:
obj - the handle of the library to traverse

visitReportDesign

protected void visitReportDesign(ReportDesignHandle obj)
Visits the report design element.

Parameters:
obj - the handle of the report design to traverse

visitScalarParameter

protected void visitScalarParameter(ScalarParameterHandle obj)
Visits the scalar parameter element.

Parameters:
obj - the handle of the scalar parameter to traverse

visitStyle

protected void visitStyle(StyleHandle obj)
Visits the style element.

Parameters:
obj - the handle of the style to traverse

visitParameter

protected void visitParameter(ParameterHandle obj)
Visits the parameter element.

Parameters:
obj - the handle of the parameter to traverse

visitReportItem

protected void visitReportItem(ReportItemHandle obj)
Visits the report item.

Parameters:
obj - the handle of report item to traverse

visitStyledElement

protected void visitStyledElement(ReportItemHandle obj)
Visits the styled element.

Parameters:
obj - the handle of styled element to traverse

visitDesignElement

protected void visitDesignElement(DesignElementHandle obj)
Visits the design element.

Parameters:
obj - the handle of design element to traverse

visitRectangle

protected void visitRectangle(RectangleHandle obj)
Visits the rectangle element.

Parameters:
obj - the handle of rectangle to traverse

visitContents

protected void visitContents(SlotHandle slot)
Visits the content of the slot.

Parameters:
slot - the handle of a slot to traverse

visitTextDataItem

protected void visitTextDataItem(TextDataHandle obj)
Visits the multi-line data element.

Parameters:
obj - the handle of a multi-line data to traverse

visitExtendedItem

protected void visitExtendedItem(ExtendedItemHandle obj)
Visits the extended element.

Parameters:
obj - the handle of an extended element to traverse

visitScriptDataSource

protected void visitScriptDataSource(ScriptDataSourceHandle obj)
Visits the extended element.

Parameters:
obj - the handle of an extended element to traverse

visitGraphicMasterPage

protected void visitGraphicMasterPage(GraphicMasterPageHandle obj)
Visits the graphic master page element.

Parameters:
obj - the handle of a graphic master page to traverse

visitSimpleMasterPage

protected void visitSimpleMasterPage(SimpleMasterPageHandle obj)
Visits the simple master page element.

Parameters:
obj - the handle of a simple master page to traverse

visitExtendedDataSource

protected void visitExtendedDataSource(OdaDataSourceHandle obj)
Visits the extended data source element.

Parameters:
obj - the handle of a extended data source to traverse

visitExtendedDataSet

protected void visitExtendedDataSet(OdaDataSetHandle obj)
Visits the extended data set element.

Parameters:
obj - the extended data set to traverse

visitTheme

protected void visitTheme(ThemeHandle obj)
Visits the theme element.

Parameters:
obj - the theme to traverse

visitTemplateParameterDefinition

protected void visitTemplateParameterDefinition(TemplateParameterDefinitionHandle obj)
Visits the template parameter definition.

Parameters:
obj - the template parameter definition to traverse

visitTemplateElement

public void visitTemplateElement(TemplateElementHandle obj)
Visits the template element.

Parameters:
obj - the template element to traverse

visitTemplateReportItem

public void visitTemplateReportItem(TemplateReportItemHandle obj)
Visits the template report item.

Parameters:
obj - the template report item to traverse

visitTemplateDataSet

public void visitTemplateDataSet(TemplateDataSetHandle obj)
Visits the template data set.

Parameters:
obj - the template data set to traverse


Copyright © 2005 Actuate Corp. All rights reserved.