Class AbstractThemeHandle
java.lang.Object
org.eclipse.birt.report.model.api.DesignElementHandle
org.eclipse.birt.report.model.api.ReportElementHandle
org.eclipse.birt.report.model.api.AbstractThemeHandle
- All Implemented Interfaces:
org.eclipse.birt.report.model.elements.interfaces.IAbstractThemeModel,org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel
- Direct Known Subclasses:
ReportItemThemeHandle,ThemeHandle
public abstract class AbstractThemeHandle
extends ReportElementHandle
implements org.eclipse.birt.report.model.elements.interfaces.IAbstractThemeModel
Represents a abstract theme in the library. Each theme contains some number
of styles. It can be a normal theme or a report item theme.
- See Also:
-
Theme
-
Field Summary
Fields inherited from class org.eclipse.birt.report.model.api.ReportElementHandle
elementFields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
moduleFields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IAbstractThemeModel
CSSES_PROP, DEFAULT_THEME_NAME, STYLES_SLOTFields 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 -
Constructor Summary
ConstructorsConstructorDescriptionAbstractThemeHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Constructs the handle for a theme with the given design and element. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.voidaddCss(CssStyleSheetHandle sheetHandle) (non-Javadoc)voidaddCss(IncludedCssStyleSheet cssStruct) (non-Javadoc)voidaddCssByProerties(String fileName, String externalCssURI, boolean isUseExternalCss) Add css based on propertiesbooleancanAddCssStyleSheet(String fileName) Deprecated.booleancanAddCssStyleSheet(CssStyleSheetHandle sheetHandle) Check if the css style sheet can be added based on sheet handlebooleancanAddCssStyleSheetByProperties(String fileName, String externalCssURI, boolean useExternalCss) Check if the css style sheet can be added based on propertiesbooleancanDropCssStyleSheet(CssStyleSheetHandle sheetHandle) Check if the css style sheet can be dropped based on sheet handlebooleancanRenameCss(IncludedCssStyleSheetHandle handle, String newFileName) Deprecated.booleancanRenameCssByProperties(IncludedCssStyleSheetHandle handle, String newFileName, String externalCssURI, boolean useExternalCss) Verify if the css could be renamed by propertyvoiddropCss(CssStyleSheetHandle sheetHandle) Check if the css style sheet can be dropped based on sheet handlefindCssStyleSheetHandleByName(String fileName) Deprecated.findCssStyleSheetHandleByProperties(String fileName, String externalCssURI, boolean useExternalCss) Find the css style sheet handle based on propertiesfindIncludedCssStyleSheetHandleByName(String fileName) Deprecated.findIncludedCssStyleSheetHandleByProperties(String fileName, String externalCssURI, boolean useExternalCss) Find the included css style sheet handle based on propertiesfinal StyleHandleReturns the style with the given name.Gets all css styles sheetfinal List<DesignElementHandle>Gets all styles in theme,include css file.final StringgetDisplayLabel(int level) Returns the display label for this element.final SlotHandleReturns the styles slot of row.final IteratorReturns the iterator over all included css style sheets.voidreloadCss(CssStyleSheetHandle sheetHandle) Reload the css stylevoidrenameCss(IncludedCssStyleSheetHandle handle, String newFileName) Deprecated.voidrenameCssByProperties(IncludedCssStyleSheetHandle handle, String newFileName, String externalCssURI, boolean useExternalCss) Rename css properties based on propertiesMethods inherited from class org.eclipse.birt.report.model.api.ReportElementHandle
getComments, getCustomXml, getDisplayName, getDisplayNameKey, getElement, getPropertyMask, isValidLayoutForCompoundElement, isValidReferenceForCompoundElement, propertyMaskIterator, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setPropertyMaskMethods 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, 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
-
AbstractThemeHandle
public AbstractThemeHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Constructs the handle for a theme 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 moduleelement- the model representation of the element
-
-
Method Details
-
getStyles
Returns the styles slot of row. Through SlotHandle, each style can be obtained.- Returns:
- the handle to the style slot
- See Also:
-
getAllStyles
Gets all styles in theme,include css file.- Returns:
- all styles.each item is
StyleHandle
-
findStyle
Returns the style with the given name.- Parameters:
name- the style name- Returns:
- the corresponding style
-
getDisplayLabel
Description copied from class:DesignElementHandleReturns the display label for this element. The display label is the localized display name to be shown in the UI. The display label is one of the following:- The localized display name of this element, if the display name resource key is set and the localized string is available
- The static display name property text of this element, if set
- The name of element, if set
- The localized display name of this kind of element, which is defined in metadata, if set
- The name of this kind of element, which is also defined in metadata
The user can also decide at which detail level the display label should be returned. The level can be one of the following options:
- USER_LABEL: Only the first 3 steps are used, if not found, return null
- SHORT_LABEL: All the above steps are used. This will ensure there will be a return value
- FULL_LABEL: Besides the return value of SHORT_LABEL, this option says we need to return additional information. This information is specific to each kind of element and my include row and column position, x and y position and so on. To get this, every child element needs to overwrite this method
- Overrides:
getDisplayLabelin classDesignElementHandle- Parameters:
level- the display label detail level- Returns:
- the display label of this element in a given level
-
includeCssesIterator
Returns the iterator over all included css style sheets. Each one is the instance ofIncludedCssStyleSheetHandle- Returns:
- the iterator over all included css style sheets.
-
getAllCssStyleSheets
Gets all css styles sheet- Returns:
- each item is
CssStyleSheetHandle
-
addCss
(non-Javadoc)- Parameters:
sheetHandle-- Throws:
SemanticException- See Also:
-
addCss
(non-Javadoc)- Parameters:
cssStruct-- Throws:
SemanticException- See Also:
-
addCss
Deprecated.Add css based on file- Parameters:
fileName- file name of the css style sheet- Throws:
SemanticException
-
addCssByProerties
public void addCssByProerties(String fileName, String externalCssURI, boolean isUseExternalCss) throws SemanticException Add css based on properties- Parameters:
fileName- file name of the css fileexternalCssURI- external css uriisUseExternalCss- use external css- Throws:
SemanticException
-
dropCss
Check if the css style sheet can be dropped based on sheet handle- Parameters:
sheetHandle-- Throws:
SemanticException
-
canDropCssStyleSheet
Check if the css style sheet can be dropped based on sheet handle- Parameters:
sheetHandle- sheet handle to be validated- Returns:
- Return the value of drop option of css style sheet
-
canAddCssStyleSheet
Check if the css style sheet can be added based on sheet handle- Parameters:
sheetHandle- sheet handle to be validated- Returns:
- Return the validation result of the add option
-
canAddCssStyleSheet
Deprecated.Check if the css style sheet can be added based on file name- Parameters:
fileName- file name of the css style sheet- Returns:
- Return the validation result of the add option
-
canAddCssStyleSheetByProperties
public boolean canAddCssStyleSheetByProperties(String fileName, String externalCssURI, boolean useExternalCss) Check if the css style sheet can be added based on properties- Parameters:
fileName- file name of the css fileexternalCssURI- external css uriuseExternalCss- use external css- Returns:
- Give the value of add option of css sytle sheet
-
reloadCss
Reload the css style- Parameters:
sheetHandle- css style sheet handle to be reloaded- Throws:
SemanticException
-
findCssStyleSheetHandleByName
Deprecated.Find the css style sheet handle based on file name- Parameters:
fileName- file name of the css style sheet- Returns:
- Return the css style sheet handle
-
findCssStyleSheetHandleByProperties
public CssStyleSheetHandle findCssStyleSheetHandleByProperties(String fileName, String externalCssURI, boolean useExternalCss) Find the css style sheet handle based on properties- Parameters:
fileName- file name of the cssexternalCssURI- external css uriuseExternalCss- use external css- Returns:
- Return the css style sheet handle
-
findIncludedCssStyleSheetHandleByName
@Deprecated public IncludedCssStyleSheetHandle findIncludedCssStyleSheetHandleByName(String fileName) Deprecated.Find the included css style sheet handle based on file name- Parameters:
fileName- file name of the css- Returns:
- Return the css style sheet handle
-
findIncludedCssStyleSheetHandleByProperties
public IncludedCssStyleSheetHandle findIncludedCssStyleSheetHandleByProperties(String fileName, String externalCssURI, boolean useExternalCss) Find the included css style sheet handle based on properties- Parameters:
fileName- file name of the cssexternalCssURI- external css uriuseExternalCss- use external css- Returns:
- Return the css style sheet handle
-
renameCss
@Deprecated public void renameCss(IncludedCssStyleSheetHandle handle, String newFileName) throws SemanticException Deprecated.Rename css properties based on file name- Parameters:
handle- css sytle sheet handlenewFileName- new file name- Throws:
SemanticException
-
renameCssByProperties
public void renameCssByProperties(IncludedCssStyleSheetHandle handle, String newFileName, String externalCssURI, boolean useExternalCss) throws SemanticException Rename css properties based on properties- Parameters:
handle- css style sheet handlenewFileName- new file nameexternalCssURI- external css uriuseExternalCss- use external css- Throws:
SemanticException
-
canRenameCss
@Deprecated public boolean canRenameCss(IncludedCssStyleSheetHandle handle, String newFileName) throws SemanticException Deprecated.Verify if the css could be renamed by file name- Parameters:
handle- css style sheet handlenewFileName- new file name- Returns:
- Verification result of renaming
- Throws:
SemanticException
-
canRenameCssByProperties
public boolean canRenameCssByProperties(IncludedCssStyleSheetHandle handle, String newFileName, String externalCssURI, boolean useExternalCss) throws SemanticException Verify if the css could be renamed by property- Parameters:
handle- css style sheet handlenewFileName- new file nameexternalCssURI- external css uriuseExternalCss- use external css- Returns:
- Verification result of renaming
- Throws:
SemanticException
-