Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.birt.report.model.api
Class SimpleGroupElementHandle

    java.lang.Object
      org.eclipse.birt.report.model.api.GroupElementHandle
          org.eclipse.birt.report.model.api.SimpleGroupElementHandle

    public class SimpleGroupElementHandle

extends GroupElementHandle

Implements a simple group element handle, which has a non-empty selection element list and root module.

Field Summary
`protected java.util.List` | `elements` List of handles to design elements.
`protected org.eclipse.birt.report.model.core.Module` | `module` The module that provides overall information, especially the command stack.

Constructor Summary
`SimpleGroupElementHandle(ModuleHandle moduleHandle, java.util.List elements)` Constructs a handle to deal with a list of report elements.

Method Summary
`protected boolean` | `allExtendedElements()` Checks if all elements have extends parents or virtual parents.
`void` | `clearLocalProperties()` Clears values of all common properties(except the extends property) for the given collection of elements.
`java.util.List` | `getCommonProperties()` Returns the common properties shared by the given group of elements(including user properties).
`java.util.List` | `getElements()` Returns the list that contains the group of design elements.
`org.eclipse.birt.report.model.core.Module` | `getModule()` Returns the module.
`ModuleHandle` | `getModuleHandle()` Returns the handle of module.
`GroupPropertyHandle` | `getPropertyHandle(java.lang.String propName)` If property is shared by the group of elements, return the corresponding `GroupPropertyHandle`, otherwise, return `null`.
`boolean` | `isExtendedElements()` Returns `true` if each of the given collection of element extends has a parent.
`protected boolean` | `isInGroup(DesignElementHandle element)` Checks whether the `element` is a member of `GroupElementHandle`.
`protected boolean` | `isPropertyReadOnly(java.lang.String propName)` Checks whether a property is read-only in the property sheet.
`protected boolean` | `isPropertyVisible(java.lang.String propName)` Checks whether a property is visible in the property sheet.
`boolean` | `isSameType()` Indicates that if the given elements are of the same definition.
`java.util.Iterator` | `visiblePropertyIterator()` 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, propertyIterator, setProperty, setStringProperty, shareSameValue`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### module

    protected final org.eclipse.birt.report.model.core.Module module

  The module that provides overall information, especially the command stack.

### elements

    protected java.util.List elements

  List of handles to design elements.

Constructor Detail

### SimpleGroupElementHandle

    public SimpleGroupElementHandle(ModuleHandle moduleHandle,
                                    java.util.List elements)

  Constructs a handle to deal with a list of report elements. The contents of the given list should be design element handles.

  Parameters:
    `moduleHandle` - the handle of module
    `elements` - a list of handles of design elements. If a item is not `DesignElementHandle`, it is ignored.
  See Also:
    `DesignElementHandle`

Method Detail

### getElements

    public java.util.List getElements()

  Description copied from class: `GroupElementHandle`
  Returns the list that contains the group of design elements. Contents of it is `DesignElementHandle`

  Specified by:
    `getElements` in class `GroupElementHandle`
  Returns:
    the list that contains the group of design elements.

### getModule

    public org.eclipse.birt.report.model.core.Module getModule()

  Description copied from class: `GroupElementHandle`
  Returns the module.

  Specified by:
    `getModule` in class `GroupElementHandle`
  Returns:
    the module

### getModuleHandle

    public ModuleHandle getModuleHandle()

  Description copied from class: `GroupElementHandle`
  Returns the handle of module.

  Specified by:
    `getModuleHandle` in class `GroupElementHandle`
  Returns:
    the handle of module

### getCommonProperties

    public java.util.List getCommonProperties()

  Description copied from class: `GroupElementHandle`
  Returns 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:
    `getCommonProperties` in class `GroupElementHandle`
  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.

### isSameType

    public boolean isSameType()

  Description copied from class: `GroupElementHandle`
  Indicates 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 an `OdaDataSource` and a `OdaDataSource`, this method returns `false`.

  Specified by:
    `isSameType` in class `GroupElementHandle`
  Returns:
    `true` if the given elements are of the same type; return `false` if elements are of different element types, or the given list is empty, or the list contains any object that is not an instance of `DesignElementHandle`.

### visiblePropertyIterator

    public java.util.Iterator visiblePropertyIterator()

  Description copied from class: `GroupElementHandle`
  Returns an iterator over the common properties that are visible. Contents of the iterator are handles to the common properties, type of them is `GroupPropertyHandle`. Note: remove is not support for the iterator.

  Specified by:
    `visiblePropertyIterator` in class `GroupElementHandle`
  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: `GroupElementHandle`
  Checks whether a property is visible in the property sheet. The visible property is visible in all `elements`.

  Specified by:
    `isPropertyVisible` in class `GroupElementHandle`
  Parameters:
    `propName` - the property name
  Returns:
    `true` if it is visible. Otherwise `false`.

### clearLocalProperties

    public void clearLocalProperties()
                              throws SemanticException

  Description copied from class: `GroupElementHandle`
  Clears 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.

  Specified by:
    `clearLocalProperties` in class `GroupElementHandle`
  Throws:
    `SemanticException` - if the property is not defined on this element

### isExtendedElements

    public boolean isExtendedElements()

  Description copied from class: `GroupElementHandle`
  Returns `true` if each of the given collection of element extends has a parent. Returns `false` otherwise. If the collection has no elements, also return `false`

  Specified by:
    `isExtendedElements` in class `GroupElementHandle`
  Returns:
    `true` if each of the given collection of element extends has a parent. Returns `false` otherwise. If the collection has no elements, also return `false`

### allExtendedElements

    protected boolean allExtendedElements()

  Description copied from class: `GroupElementHandle`
  Checks if all elements have extends parents or virtual parents.

  Specified by:
    `allExtendedElements` in class `GroupElementHandle`
  Returns:
    `true` If all elements have extend parents or virtual parents. Otherwise `false`;

### isPropertyReadOnly

    protected boolean isPropertyReadOnly(java.lang.String propName)

  Description copied from class: `GroupElementHandle`
  Checks whether a property is read-only in the property sheet. The visible property is read-only in all `elements`.

  Specified by:
    `isPropertyReadOnly` in class `GroupElementHandle`
  Parameters:
    `propName` - the property name
  Returns:
    `true` if it is read-only. Otherwise `false`.

### getPropertyHandle

    public GroupPropertyHandle getPropertyHandle(java.lang.String propName)

  Description copied from class: `GroupElementHandle`
  If property is shared by the group of elements, return the corresponding `GroupPropertyHandle`, otherwise, return `null`.

  Specified by:
    `getPropertyHandle` in class `GroupElementHandle`
  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 return `null`.

### isInGroup

    protected boolean isInGroup(DesignElementHandle element)

  Description copied from class: `GroupElementHandle`
  Checks whether the `element` is a member of `GroupElementHandle`.

  Specified by:
    `isInGroup` in class `GroupElementHandle`
  Parameters:
    `element` - the element to check
  Returns:
    `true` if the element is in the list, otherwise `false`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Actuate Corp. All rights reserved.