Class MasterPageHandle

All Implemented Interfaces:
org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel, org.eclipse.birt.report.model.elements.interfaces.IMasterPageModel
Direct Known Subclasses:
GraphicMasterPageHandle, SimpleMasterPageHandle

public abstract class MasterPageHandle extends ReportElementHandle implements org.eclipse.birt.report.model.elements.interfaces.IMasterPageModel
Represents a master page. The master page is an abstract element that defines the basic properties of a printed page. The derived elements, Simple and Graphic Master Pages, provide content that appears on the page itself.
See Also:
  • Constructor Details

    • MasterPageHandle

      public MasterPageHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
      Constructs a master-page handle with the given design and the element. The application generally does not create handles directly. Instead, it uses one of the navigation methods available on other element handles.
      Parameters:
      module - the module
      element - the model representation of the element
  • Method Details

    • getSize

      public Point getSize()
      Returns the size of the page. The size is either one of the standard sizes, or a custom size. Note that the size returned will not match the getWidth and getHeight values unless the page uses a custom size.
      Returns:
      the actual page size in application units
    • getEffectiveWidth

      @Deprecated public DimensionValue getEffectiveWidth()
      Deprecated.
      Returns the the effective width of the page.
      Returns:
      the effective width of the page. Return value is a DimensionValue, the measure of it is the width measure of the page, unit is that set on the session.
    • getEffectiveHeight

      @Deprecated public DimensionValue getEffectiveHeight()
      Deprecated.
      Returns the the effective height of the page.
      Returns:
      the effective height of the page. Return value is a DimensionValue, the measure of it is the height measure of the page, unit is that set on the session.
    • getPageType

      public String getPageType()
      Returns the type of the page. The return type of the page is defined in DesignChoiceConstants and can be one of:
      • PAGE_SIZE_CUSTOM
      • PAGE_SIZE_US_LETTER
      • PAGE_SIZE_US_LEGAL
      • PAGE_SIZE_A4
      Returns:
      the type of the page
    • setPageType

      public void setPageType(String type) throws SemanticException
      Sets the type of the page. The input type of the page is defined in DesignChoiceConstants and can be one of:
      • PAGE_SIZE_CUSTOM
      • PAGE_SIZE_US_LETTER
      • PAGE_SIZE_US_LEGAL
      • PAGE_SIZE_A4
      Parameters:
      type - the type of the page
      Throws:
      SemanticException - if the property is locked or the input value is not one of the above.
    • getOrientation

      public String getOrientation()
      Returns the page orientation. The return type of the page is defined in DesignChoiceConstants can be one of:
      • PAGE_ORIENTATION_AUTO
      • PAGE_ORIENTATION_PORTRAIT
      • PAGE_ORIENTATION_LANDSCAPE
      Returns:
      the page orientation
    • setOrientation

      public void setOrientation(String orientation) throws SemanticException
      Returns the page orientation. The input type of the page is defined in DesignChoiceConstants can be one of:
      • PAGE_ORIENTATION_AUTO
      • PAGE_ORIENTATION_PORTRAIT
      • PAGE_ORIENTATION_LANDSCAPE
      Parameters:
      orientation - the page orientation
      Throws:
      SemanticException - if the property is locked or the input value is not one of the above.
    • getHeight

      public DimensionHandle getHeight()
      Gets a dimension handle to work with the height of the page.
      Returns:
      a DimensionHandle to work with the height
    • getWidth

      public DimensionHandle getWidth()
      Gets a dimension handle to work with the width of the page.
      Returns:
      DimensionHandle to work with the width
    • getBottomMargin

      public DimensionHandle getBottomMargin()
      Gets a dimension handle to work with the margin on the bottom side.
      Returns:
      a DimensionHandle for the bottom margin.
    • getLeftMargin

      public DimensionHandle getLeftMargin()
      Gets a dimension handle to work with the margin on the left side.
      Returns:
      a DimensionHandle for the left margin.
    • getRightMargin

      public DimensionHandle getRightMargin()
      Gets a dimension handle to work with the margin on the right side.
      Returns:
      a DimensionHandle for the right margin.
    • getTopMargin

      public DimensionHandle getTopMargin()
      Gets a dimension handle to work with the margin on the top side.
      Returns:
      a DimensionHandle for the top margin.
    • getPageHeight

      public DimensionValue getPageHeight()
      Gets the effective page height.
      Returns:
      the page height
    • getPageWidth

      public DimensionValue getPageWidth()
      Gets the effective page width.
      Returns:
      the page width
    • getOnPageStart

      public String getOnPageStart()
      Gets the script of onPageStart method.
      Returns:
      the script of onPageStart method.
    • setOnPageStart

      public void setOnPageStart(String onPageStart) throws SemanticException
      Sets the script of onPageStart method.
      Parameters:
      onPageStart - the script of onPageStart method.
      Throws:
      SemanticException - if the property is locked by masks.
    • getOnPageEnd

      public String getOnPageEnd()
      Gets the script of onPageEnd method.
      Returns:
      the script of onPageEnd method.
    • setOnPageEnd

      public void setOnPageEnd(String onPageEnd) throws SemanticException
      Sets the script of onPageEnd method.
      Parameters:
      onPageEnd - the script of onPageEnd method.
      Throws:
      SemanticException - if the property is locked by masks.
    • getColumnCount

      public int getColumnCount()
      Returns the number of columns in the report.
      Returns:
      the number of columns in the report
    • setColumnCount

      public void setColumnCount(int count) throws SemanticException
      Sets the number of columns in the report.
      Parameters:
      count - the number of columns in the report
      Throws:
      SemanticException - if the property is locked.
    • getColumnSpacing

      public DimensionHandle getColumnSpacing()
      Returns a handle to work with the the space between columns.
      Returns:
      a DimensionHandle to deal with the space between columns.