Class EmptyGroupElementHandle
- java.lang.Object
-
- org.eclipse.birt.report.model.api.GroupElementHandle
-
- org.eclipse.birt.report.model.api.EmptyGroupElementHandle
-
public class EmptyGroupElementHandle extends GroupElementHandle
Implements an empty group element handle, which actually can do nothing.
-
-
Constructor Summary
Constructors Constructor Description EmptyGroupElementHandle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanallExtendedElements()Checks if all elements have extends parents or virtual parents.voidclearLocalProperties()Clears values of all common properties(except the extends property) for the given collection of elements.voidclearLocalPropertiesIncludeSubElement()Clears values of all common properties(except the extends property) for the given collection of elements.java.util.ListgetCommonProperties()Returns the common properties shared by the given group of elements(including user properties).java.util.ListgetElements()Returns the list that contains the group of design elements.org.eclipse.birt.report.model.core.ModulegetModule()Returns the module.ModuleHandlegetModuleHandle()Returns the handle of module.GroupPropertyHandlegetPropertyHandle(java.lang.String propName)If property is shared by the group of elements, return the correspondingGroupPropertyHandle, otherwise, returnnull.booleanisExtendedElements()Returnstrueif each of the given collection of element extends has a parent.protected booleanisInGroup(DesignElementHandle element)Checks whether theelementis a member ofGroupElementHandle.protected booleanisPropertyReadOnly(java.lang.String propName)Checks whether a property is read-only in the property sheet.protected booleanisPropertyVisible(java.lang.String propName)Checks whether a property is visible in the property sheet.booleanisSameType()Indicates that if the given elements are of the same definition.java.util.IteratorvisiblePropertyIterator()Returns an iterator over the common properties that are visible.-
Methods inherited from class org.eclipse.birt.report.model.api.GroupElementHandle
clearProperty, getDisplayProperty, getLocalStringProperty, getStringProperty, hasLocalPropertiesForExtendedElements, hasLocalPropertiesIncludeSubElement, hasLocalPropertiesIncludeSubElement, propertyIterator, setProperty, setStringProperty, shareSameValue
-
-
-
-
Method Detail
-
allExtendedElements
protected boolean allExtendedElements()
Description copied from class:GroupElementHandleChecks if all elements have extends parents or virtual parents.- Specified by:
allExtendedElementsin classGroupElementHandle- Returns:
trueIf all elements have extend parents or virtual parents. Otherwisefalse;
-
getElements
public java.util.List getElements()
Description copied from class:GroupElementHandleReturns the list that contains the group of design elements. Contents of it isDesignElementHandle- Specified by:
getElementsin classGroupElementHandle- Returns:
- the list that contains the group of design elements.
-
getModule
public org.eclipse.birt.report.model.core.Module getModule()
Description copied from class:GroupElementHandleReturns the module.- Specified by:
getModulein classGroupElementHandle- Returns:
- the module
-
getModuleHandle
public ModuleHandle getModuleHandle()
Description copied from class:GroupElementHandleReturns the handle of module.- Specified by:
getModuleHandlein classGroupElementHandle- Returns:
- the handle of module
-
isSameType
public boolean isSameType()
Description copied from class:GroupElementHandleIndicates that if the given elements are of the same definition. Elements are considered of same type if their element definitions are identical.If elements have different definitions. Even the same element type, the return value is
false. For example, if the list contains anOdaDataSourceand aOdaDataSource, this method returnsfalse.- Specified by:
isSameTypein classGroupElementHandle- Returns:
trueif the given elements are of the same type; returnfalseif elements are of different element types, or the given list is empty, or the list contains any object that is not an instance ofDesignElementHandle.
-
getCommonProperties
public java.util.List getCommonProperties()
Description copied from class:GroupElementHandleReturns the common properties shared by the given group of elements(including user properties). Contents of the list is element property definitions. If elements do not share any common property, return an empty list.- Specified by:
getCommonPropertiesin classGroupElementHandle- Returns:
- the common properties shared by the given group of elements. If
elements do not share any common property, or the given list is
empty, or the list contains any item that is not an instance of
DesignElementHandle, return an empty list.
-
visiblePropertyIterator
public java.util.Iterator visiblePropertyIterator()
Description copied from class:GroupElementHandleReturns an iterator over the common properties that are visible. Contents of the iterator are handles to the common properties, type of them isGroupPropertyHandle. Note: remove is not support for the iterator.- Specified by:
visiblePropertyIteratorin classGroupElementHandle- Returns:
- an iterator over the common properties. Contents of the iterator are
handles to the common properties, type of them is
GroupPropertyHandle
-
isPropertyVisible
protected boolean isPropertyVisible(java.lang.String propName)
Description copied from class:GroupElementHandleChecks whether a property is visible in the property sheet. The visible property is visible in allelements.- Specified by:
isPropertyVisiblein classGroupElementHandle- Parameters:
propName- the property name- Returns:
trueif it is visible. Otherwisefalse.
-
clearLocalProperties
public void clearLocalProperties() throws SemanticExceptionDescription copied from class:GroupElementHandleClears values of all common properties(except the extends property) for the given collection of elements. Clearing a property removes any value set for the property on this element. After this, the element will now inherit the property from its parent element, style, or from the default value for the property. Note: this method clear the values of local properties ( not include sub element)- Specified by:
clearLocalPropertiesin classGroupElementHandle- Throws:
SemanticException- if the property is not defined on this element
-
isExtendedElements
public boolean isExtendedElements()
Description copied from class:GroupElementHandleReturnstrueif each of the given collection of element extends has a parent. Returnsfalseotherwise. If the collection has no elements, also returnfalse- Specified by:
isExtendedElementsin classGroupElementHandle- Returns:
trueif each of the given collection of element extends has a parent. Returnsfalseotherwise. If the collection has no elements, also returnfalse
-
isPropertyReadOnly
protected boolean isPropertyReadOnly(java.lang.String propName)
Description copied from class:GroupElementHandleChecks whether a property is read-only in the property sheet. The visible property is read-only in allelements.- Specified by:
isPropertyReadOnlyin classGroupElementHandle- Parameters:
propName- the property name- Returns:
trueif it is read-only. Otherwisefalse.
-
getPropertyHandle
public GroupPropertyHandle getPropertyHandle(java.lang.String propName)
Description copied from class:GroupElementHandleIf property is shared by the group of elements, return the correspondingGroupPropertyHandle, otherwise, returnnull.- Specified by:
getPropertyHandlein classGroupElementHandle- Parameters:
propName- name of the property needs to be handled.- Returns:
- If the property is a common property among the elements, return the
corresponding
GroupPropertyHandle; Otherwise returnnull.
-
isInGroup
protected boolean isInGroup(DesignElementHandle element)
Description copied from class:GroupElementHandleChecks whether theelementis a member ofGroupElementHandle.- Specified by:
isInGroupin classGroupElementHandle- Parameters:
element- the element to check- Returns:
trueif the element is in the list, otherwisefalse.
-
clearLocalPropertiesIncludeSubElement
public void clearLocalPropertiesIncludeSubElement() throws SemanticExceptionDescription copied from class:GroupElementHandleClears values of all common properties(except the extends property) for the given collection of elements. Clearing a property removes any value set for the property on this element. After this, the element will now inherit the property from its parent element, style, or from the default value for the property. Note: this method clear all the values of local properties (include sub element)- Specified by:
clearLocalPropertiesIncludeSubElementin classGroupElementHandle- Throws:
SemanticException- if the property is not defined on this element
-
-