Class MasterPageHandle
java.lang.Object
org.eclipse.birt.report.model.api.DesignElementHandle
org.eclipse.birt.report.model.api.ReportElementHandle
org.eclipse.birt.report.model.api.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:
-
MasterPage
DimensionHandle
-
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
-
Constructor Summary
ConstructorsConstructorDescriptionMasterPageHandle
(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. -
Method Summary
Modifier and TypeMethodDescriptionGets a dimension handle to work with the margin on the bottom side.int
Returns the number of columns in the report.Returns a handle to work with the the space between columns.Deprecated.Deprecated.Gets a dimension handle to work with the height of the page.Gets a dimension handle to work with the margin on the left side.Gets the script of onPageEnd method.Gets the script of onPageStart method.Returns the page orientation.Gets the effective page height.Returns the type of the page.Gets the effective page width.Gets a dimension handle to work with the margin on the right side.getSize()
Returns the size of the page.Gets a dimension handle to work with the margin on the top side.getWidth()
Gets a dimension handle to work with the width of the page.void
setColumnCount
(int count) Sets the number of columns in the report.void
setOnPageEnd
(String onPageEnd) Sets the script of onPageEnd method.void
setOnPageStart
(String onPageStart) Sets the script of onPageStart method.void
setOrientation
(String orientation) Returns the page orientation.void
setPageType
(String type) Sets the type of the page.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, 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
-
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 moduleelement
- the model representation of the element
-
-
Method Details
-
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 thegetWidth
andgetHeight
values unless the page uses a custom size.- Returns:
- the actual page size in application units
-
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.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
Returns the type of the page. The return type of the page is defined inDesignChoiceConstants
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
Sets the type of the page. The input type of the page is defined inDesignChoiceConstants
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
Returns the page orientation. The return type of the page is defined inDesignChoiceConstants
can be one of:PAGE_ORIENTATION_AUTO
PAGE_ORIENTATION_PORTRAIT
PAGE_ORIENTATION_LANDSCAPE
- Returns:
- the page orientation
-
setOrientation
Returns the page orientation. The input type of the page is defined inDesignChoiceConstants
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
Gets a dimension handle to work with the height of the page.- Returns:
- a DimensionHandle to work with the height
-
getWidth
Gets a dimension handle to work with the width of the page.- Returns:
- DimensionHandle to work with the width
-
getBottomMargin
Gets a dimension handle to work with the margin on the bottom side.- Returns:
- a DimensionHandle for the bottom margin.
-
getLeftMargin
Gets a dimension handle to work with the margin on the left side.- Returns:
- a DimensionHandle for the left margin.
-
getRightMargin
Gets a dimension handle to work with the margin on the right side.- Returns:
- a DimensionHandle for the right margin.
-
getTopMargin
Gets a dimension handle to work with the margin on the top side.- Returns:
- a DimensionHandle for the top margin.
-
getPageHeight
Gets the effective page height.- Returns:
- the page height
-
getPageWidth
Gets the effective page width.- Returns:
- the page width
-
getOnPageStart
Gets the script of onPageStart method.- Returns:
- the script of onPageStart method.
-
setOnPageStart
Sets the script of onPageStart method.- Parameters:
onPageStart
- the script of onPageStart method.- Throws:
SemanticException
- if the property is locked by masks.
-
getOnPageEnd
Gets the script of onPageEnd method.- Returns:
- the script of onPageEnd method.
-
setOnPageEnd
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
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
Returns a handle to work with the the space between columns.- Returns:
- a DimensionHandle to deal with the space between columns.
-