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

java.lang.Object
  extended by org.eclipse.birt.report.model.api.DesignElementHandle
      extended by org.eclipse.birt.report.model.api.ReportElementHandle
          extended by 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
element
 
Fields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
module
 
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IAbstractThemeModel
CSSES_PROP, DEFAULT_THEME_NAME, STYLES_SLOT
 
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
 
Constructor Summary
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.
 
Method Summary
 void addCss(CssStyleSheetHandle sheetHandle)
          (non-Javadoc)
 void addCss(IncludedCssStyleSheet cssStruct)
          (non-Javadoc)
 void addCss(java.lang.String fileName)
          Deprecated.  
 void addCssByProerties(java.lang.String fileName, java.lang.String externalCssURI, boolean isUseExternalCss)
           
 boolean canAddCssStyleSheet(CssStyleSheetHandle sheetHandle)
          (non-Javadoc)
 boolean canAddCssStyleSheet(java.lang.String fileName)
          Deprecated.  
 boolean canAddCssStyleSheetByProperties(java.lang.String fileName, java.lang.String externalCssURI, boolean useExternalCss)
          (non-Javadoc)
 boolean canDropCssStyleSheet(CssStyleSheetHandle sheetHandle)
          (non-Javadoc)
 boolean canRenameCss(IncludedCssStyleSheetHandle handle, java.lang.String newFileName)
          Deprecated.  
 boolean canRenameCssByProperties(IncludedCssStyleSheetHandle handle, java.lang.String newFileName, java.lang.String externalCssURI, boolean useExternalCss)
           
 void dropCss(CssStyleSheetHandle sheetHandle)
          (non-Javadoc)
 CssStyleSheetHandle findCssStyleSheetHandleByName(java.lang.String fileName)
          Deprecated.  
 CssStyleSheetHandle findCssStyleSheetHandleByProperties(java.lang.String fileName, java.lang.String externalCssURI, boolean useExternalCss)
          (non-Javadoc)
 IncludedCssStyleSheetHandle findIncludedCssStyleSheetHandleByName(java.lang.String fileName)
          Deprecated.  
 IncludedCssStyleSheetHandle findIncludedCssStyleSheetHandleByProperties(java.lang.String fileName, java.lang.String externalCssURI, boolean useExternalCss)
          (non-Javadoc)
 StyleHandle findStyle(java.lang.String name)
          Returns the style with the given name.
 java.util.List getAllCssStyleSheets()
          Gets all css styles sheet
 java.util.List getAllStyles()
          Gets all styles in theme,include css file.
 java.lang.String getDisplayLabel(int level)
          Returns the display label for this element.
 SlotHandle getStyles()
          Returns the styles slot of row.
 java.util.Iterator includeCssesIterator()
          Returns the iterator over all included css style sheets.
 void reloadCss(CssStyleSheetHandle sheetHandle)
           
 void renameCss(IncludedCssStyleSheetHandle handle, java.lang.String newFileName)
          Deprecated.  
 void renameCssByProperties(IncludedCssStyleSheetHandle handle, java.lang.String newFileName, java.lang.String externalCssURI, boolean useExternalCss)
          (non-Javadoc)
 
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, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 module
element - the model representation of the element
Method Detail

getStyles

public final SlotHandle getStyles()
Returns the styles slot of row. Through SlotHandle, each style can be obtained.

Returns:
the handle to the style slot
See Also:
SlotHandle

getAllStyles

public final java.util.List getAllStyles()
Gets all styles in theme,include css file.

Returns:
all styles.each item is StyleHandle

findStyle

public final StyleHandle findStyle(java.lang.String name)
Returns the style with the given name.

Parameters:
name - the style name
Returns:
the corresponding style

getDisplayLabel

public final java.lang.String getDisplayLabel(int level)
Description copied from class: DesignElementHandle
Returns 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 user can also decide at which detail level the display label should be returned. The level can be one of the following options:

Overrides:
getDisplayLabel in class DesignElementHandle
Parameters:
level - the display label detail level
Returns:
the display label of this element in a given level

includeCssesIterator

public final java.util.Iterator includeCssesIterator()
Returns the iterator over all included css style sheets. Each one is the instance of IncludedCssStyleSheetHandle

Returns:
the iterator over all included css style sheets.

getAllCssStyleSheets

public java.util.List getAllCssStyleSheets()
Gets all css styles sheet

Returns:
each item is CssStyleSheetHandle

addCss

public void addCss(CssStyleSheetHandle sheetHandle)
            throws SemanticException
(non-Javadoc)

Throws:
SemanticException
See Also:
org.eclipse.birt.report.model.api.AbstractThemeHandle#addCss(org.eclipse .birt.report.model.api.css.CssStyleSheetHandle)

addCss

public void addCss(IncludedCssStyleSheet cssStruct)
            throws SemanticException
(non-Javadoc)

Throws:
SemanticException
See Also:
org.eclipse.birt.report.model.api.AbstractThemeHandle#addCss(org.eclipse .birt.report.model.api.elements.structures.IncludedCssStyleSheet)

addCss

public void addCss(java.lang.String fileName)
            throws SemanticException
Deprecated. 

(non-Javadoc)

Throws:
SemanticException
See Also:
org.eclipse.birt.report.model.api.AbstractThemeHandle#addCssByFileName(java.lang .String)

addCssByProerties

public void addCssByProerties(java.lang.String fileName,
                              java.lang.String externalCssURI,
                              boolean isUseExternalCss)
                       throws SemanticException
Throws:
SemanticException

dropCss

public void dropCss(CssStyleSheetHandle sheetHandle)
             throws SemanticException
(non-Javadoc)

Throws:
SemanticException
See Also:
org.eclipse.birt.report.model.api.AbstractThemeHandle#dropCss(org.eclipse .birt.report.model.api.css.CssStyleSheetHandle)

canDropCssStyleSheet

public boolean canDropCssStyleSheet(CssStyleSheetHandle sheetHandle)
(non-Javadoc)

See Also:
(org.eclipse.birt.report.model.api.css.CssStyleSheetHandle)

canAddCssStyleSheet

public boolean canAddCssStyleSheet(CssStyleSheetHandle sheetHandle)
(non-Javadoc)

See Also:
(org.eclipse.birt.report.model.api.css.CssStyleSheetHandle)

canAddCssStyleSheet

public boolean canAddCssStyleSheet(java.lang.String fileName)
Deprecated. 

(non-Javadoc)

See Also:
(java.lang.String)

canAddCssStyleSheetByProperties

public boolean canAddCssStyleSheetByProperties(java.lang.String fileName,
                                               java.lang.String externalCssURI,
                                               boolean useExternalCss)
(non-Javadoc)

See Also:
(java.lang.String)

reloadCss

public void reloadCss(CssStyleSheetHandle sheetHandle)
               throws SemanticException
Throws:
SemanticException

findCssStyleSheetHandleByName

public CssStyleSheetHandle findCssStyleSheetHandleByName(java.lang.String fileName)
Deprecated. 

(non-Javadoc)

See Also:
findCssStyleSheetHandleByName(java.lang.String)

findCssStyleSheetHandleByProperties

public CssStyleSheetHandle findCssStyleSheetHandleByProperties(java.lang.String fileName,
                                                               java.lang.String externalCssURI,
                                                               boolean useExternalCss)
(non-Javadoc)

See Also:
findCssStyleSheetHandleByProperties(java.lang.String, java.lang.String, java.lang.Boolean)

findIncludedCssStyleSheetHandleByName

public IncludedCssStyleSheetHandle findIncludedCssStyleSheetHandleByName(java.lang.String fileName)
Deprecated. 

(non-Javadoc)

See Also:
findIncludedCssStyleSheetHandleByName(java.lang.String)

findIncludedCssStyleSheetHandleByProperties

public IncludedCssStyleSheetHandle findIncludedCssStyleSheetHandleByProperties(java.lang.String fileName,
                                                                               java.lang.String externalCssURI,
                                                                               boolean useExternalCss)
(non-Javadoc)

See Also:
findIncludedCssStyleSheetHandleByProperties(java.lang.String, java.lang.String, java.lang.Boolean)

renameCss

public void renameCss(IncludedCssStyleSheetHandle handle,
                      java.lang.String newFileName)
               throws SemanticException
Deprecated. 

(non-Javadoc)

Throws:
SemanticException
See Also:
org.eclipse.birt.report.model.api.AbstractThemeHandle#renameCss(org.eclipse .birt.report.model.api.IncludedCssStyleSheetHandle, java.lang.String)

renameCssByProperties

public void renameCssByProperties(IncludedCssStyleSheetHandle handle,
                                  java.lang.String newFileName,
                                  java.lang.String externalCssURI,
                                  boolean useExternalCss)
                           throws SemanticException
(non-Javadoc)

Throws:
SemanticException
See Also:
org.eclipse.birt.report.model.api.AbstractThemeHandle#renameCssByProperties(org.eclipse .birt.report.model.api.IncludedCssStyleSheetHandle, java.lang.String, java.lang.String, java.lang.Boolean)

canRenameCss

public boolean canRenameCss(IncludedCssStyleSheetHandle handle,
                            java.lang.String newFileName)
                     throws SemanticException
Deprecated. 

(non-Javadoc)

Throws:
SemanticException
See Also:
org.eclipse.birt.report.model.api.AbstractThemeHandle#canRenameCss(org .eclipse.birt.report.model.api.IncludedCssStyleSheetHandle, java.lang.String)

canRenameCssByProperties

public boolean canRenameCssByProperties(IncludedCssStyleSheetHandle handle,
                                        java.lang.String newFileName,
                                        java.lang.String externalCssURI,
                                        boolean useExternalCss)
                                 throws SemanticException
Parameters:
handle -
newFileName -
externalCssURI -
useExternalCss -
Returns:
Throws:
SemanticException


Copyright © 2008 Actuate Corp. All rights reserved.