Package org.eclipse.birt.report.model.api

# Class SimpleMasterPageHandle

java.lang.Object
org.eclipse.birt.report.model.api.DesignElementHandle
org.eclipse.birt.report.model.api.ReportElementHandle
org.eclipse.birt.report.model.api.MasterPageHandle
org.eclipse.birt.report.model.api.SimpleMasterPageHandle

All Implemented Interfaces:
  `org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel`, `org.eclipse.birt.report.model.elements.interfaces.IMasterPageModel`, `org.eclipse.birt.report.model.elements.interfaces.ISimpleMasterPageModel`

public class SimpleMasterPageHandle extends MasterPageHandle implements org.eclipse.birt.report.model.elements.interfaces.ISimpleMasterPageModel
Represents a simple master page. The simple master page provides a header and footer that appear on every page.

## Field Summary

### Fields inherited from class org.eclipse.birt.report.model.api.ReportElementHandle

`element`

### Fields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle

`module`

### Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel

`COMMENTS_PROP, CUSTOM_XML_PROP, DISPLAY_NAME_ID_PROP, DISPLAY_NAME_PROP, EVENT_HANDLER_CLASS_PROP, EXTENDS_PROP, FULL_LABEL, ID_SUFFIX, NAME_PROP, NEW_HANDLER_ON_EACH_EVENT_PROP, NO_SLOT, PROPERTY_MASKS_PROP, REF_TEMPLATE_PARAMETER_PROP, SHORT_LABEL, USER_LABEL, USER_PROPERTIES_PROP, VIEW_ACTION_PROP`

### Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IMasterPageModel

`A3_HEIGHT, A3_WIDTH, A4_HEIGHT, A4_WIDTH, A5_HEIGHT, A5_WIDTH, BOTTOM_MARGIN_PROP, COLUMN_SPACING_PROP, COLUMNS_PROP, HEIGHT_PROP, LEFT_MARGIN_PROP, ON_PAGE_END_METHOD, ON_PAGE_START_METHOD, ORIENTATION_PROP, RIGHT_MARGIN_PROP, STYLE_PROP, TOP_MARGIN_PROP, TYPE_PROP, US_LEDGER_HEIGHT, US_LEDGER_WIDTH, US_LEGAL_HEIGHT, US_LEGAL_WIDTH, US_LETTER_HEIGHT, US_LETTER_WIDTH, US_SUPER_B_HEIGHT, US_SUPER_B_WIDTH, WIDTH_PROP`

### Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.ISimpleMasterPageModel

`FLOATING_FOOTER, FOOTER_HEIGHT_PROP, HEADER_HEIGHT_PROP, PAGE_FOOTER_SLOT, PAGE_HEADER_SLOT, SHOW_FOOTER_ON_LAST_PROP, SHOW_HEADER_ON_FIRST_PROP, SLOT_COUNT`

## Constructor Summary

Constructors
Constructor
Description
`SimpleMasterPageHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)`
Constructs the handle for a simple master page with the given design and element.

## Method Summary

Modifier and Type
Method
Description
`DimensionHandle`
`getFooterHeight()`
Gets a dimension handle to work with the height on page footer.
`DimensionHandle`
`getHeaderHeight()`
Gets a dimension handle to work with the height on page header.
`SlotHandle`
`getPageFooter()`
Returns the page footer slot of this simple master page.
`SlotHandle`
`getPageHeader()`
Returns the page header slot of this simple master page.
`boolean`
`isFloatingFooter()`
Tests whether allows the footer 'floats' after the last content on each page.
`void`
`setFloatingFooter(boolean isFloatingFooter)`
Changes the status to say if it has a floating footer or not.
`void`
`setShowFooterOnLast(boolean showFooterOnLast)`
Changes the status to show footer on the last page.
`void`
`setShowHeaderOnFirst(boolean showHeaderOnFirst)`
Changes the status to show page header on the first page or not.
`boolean`
`showFooterOnLast()`
Tests whether to show the page footer on the last page.
`boolean`
`showHeaderOnFirst()`
Tests whether to show the page header on the first page of the report.

### Methods inherited from class org.eclipse.birt.report.model.api.MasterPageHandle

`getBottomMargin, getColumnCount, getColumnSpacing, getEffectiveHeight, getEffectiveWidth, getHeight, getLeftMargin, getOnPageEnd, getOnPageStart, getOrientation, getPageHeight, getPageType, getPageWidth, getRightMargin, getSize, getTopMargin, getWidth, setColumnCount, setOnPageEnd, setOnPageStart, setOrientation, setPageType`

### Methods inherited from class org.eclipse.birt.report.model.api.ReportElementHandle

`getComments, getCustomXml, getDisplayName, getDisplayNameKey, getElement, getPropertyMask, isValidLayoutForCompoundElement, isValidReferenceForCompoundElement, propertyMaskIterator, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setPropertyMask`

### Methods inherited from class org.eclipse.birt.report.model.api.DesignElementHandle

`add, add, addElement, addElement, addListener, addUserPropertyDefn, cachePropertyHandles, canContain, canContain, canContain, canContain, canDrop, canEdit, canTransformToTemplate, clearAllProperties, clearContents, clearProperty, clientsIterator, copy, copyPropertyTo, createTemplateElement, derivedIterator, doSort, drop, drop, drop, dropAndClear, dropAndClear, dropAndClear, dropUserPropertyDefn, findContentSlot, getBooleanProperty, getChoices, getColorProperty, getContainer, getContainerPropertyHandle, getContainerSlotHandle, getContent, getContentCount, getContents, getDefn, getDesign, getDesignHandle, getDimensionProperty, getDisplayLabel, getDisplayLabel, getDisplayProperty, getEffectiveModule, getElementFactory, getElementProperty, getEventHandlerClass, getExpressionProperty, getExtends, getExternalizedValue, getExternalizedValue, getExternalizedValue, getFactoryElementHandle, getFactoryPropertyHandle, getFloatProperty, getFontProperty, getFullName, getHostViewHandle, getID, getIndex, getIntProperty, getListProperty, getListProperty, getMethods, getModule, getModuleHandle, getName, getNumberProperty, getPrivateStyle, getProperty, getPropertyBinding, getPropertyBindingExpression, getPropertyBindings, getPropertyDefn, getPropertyHandle, getPropertyIterator, getQualifiedName, getRoot, getSemanticErrors, getSlot, getStringProperty, getStyle, getTagType, getUserProperties, getUserPropertyDefnHandle, getXPath, hasLocalProperties, hasSemanticError, initializeSlotHandles, isDirectionRTL, isInTemplateParameter, isTemplateParameterValue, isValid, localize, move, move, moveTo, moveTo, moveTo, moveTo, newHandlerOnEachEvent, paste, paste, paste, paste, removeListener, revertToReportItem, revertToTemplate, semanticCheck, setBooleanProperty, setEncryption, setEventHandlerClass, setExpressionProperty, setExtends, setExtendsElement, setExtendsName, setFloatProperty, setIntProperty, setName, setNewHandlerOnEachEvent, setNumberProperty, setProperties, setProperty, setPropertyBinding, setPropertyBinding, setStringProperty, setStyle, setStyleElement, setStyleName, setValid, shift, showError, slotsIterator`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SimpleMasterPageHandle

public SimpleMasterPageHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
Constructs the handle for a simple master page with the given design and 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

### showHeaderOnFirst

public boolean showHeaderOnFirst()
Tests whether to show the page header on the first page of the report.

Returns:
  `true` if allows to show the header on the first page.

### setShowHeaderOnFirst

public void setShowHeaderOnFirst(boolean showHeaderOnFirst) throws SemanticException
Changes the status to show page header on the first page or not.

Parameters:
  `showHeaderOnFirst` - `true` if allow show header on the first page, `false` otherwise.
Throws:
  `SemanticException` - if the property is locked.

### showFooterOnLast

public boolean showFooterOnLast()
Tests whether to show the page footer on the last page.

Returns:
  `true` if allows to show the footer on the last page.

### setShowFooterOnLast

public void setShowFooterOnLast(boolean showFooterOnLast) throws SemanticException
Changes the status to show footer on the last page.

Parameters:
  `showFooterOnLast` - `true` to allow to show footer on last page, `false` otherwise.
Throws:
  `SemanticException` - if the property is locked.

### isFloatingFooter

public boolean isFloatingFooter()
Tests whether allows the footer 'floats' after the last content on each page.

Returns:
  `true` if the simple master page allows floating footer.

### setFloatingFooter

public void setFloatingFooter(boolean isFloatingFooter) throws SemanticException
Changes the status to say if it has a floating footer or not.

Parameters:
  `isFloatingFooter` - `true` to allow the footer floating, `false` not.
Throws:
  `SemanticException` - if the property is locked.

### getPageHeader

public SlotHandle getPageHeader()
Returns the page header slot of this simple master page.

Returns:
  the page header slot handle.

### getPageFooter

public SlotHandle getPageFooter()
Returns the page footer slot of this simple master page.

Returns:
  the page footer slot handle.

### getHeaderHeight

public DimensionHandle getHeaderHeight()
Gets a dimension handle to work with the height on page header.

Returns:
  a DimensionHandle for the header height.

### getFooterHeight

public DimensionHandle getFooterHeight()
Gets a dimension handle to work with the height on page footer.

Returns:
  a DimensionHandle for the header footer.