Interface IElementDefn
- All Superinterfaces:
IObjectDefn
Interface for a report element definition. This interface defines some
methods to get "meta-data" about an element.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Determines if this element allows user properties.boolean
canContain
(int slot, IElementDefn type) Reports whether the given slot can contain elements of the given type.boolean
Returns whether elements of this class can be extended.Returns the property definitions for this element that can hold other elements.Returns the expression property definition list of this element definition and parent definition.Returns a list of the localized property group names defined by this element and its parents.Returns the expression property definition list of this element definition.Returns the method definition list of this element definition.Returns properties definitions as a list.Returns the method definition list of this element definition and parent definition.int
Gets the name option that says how the element type handles names.Returns the properties defined on this element.getProperty
(String propName) Gets a property definition given a property name.getSlot
(int slotID) Returns the meta-data definition for a slot given its numeric slot identifier.int
Returns the number of slots in this container.boolean
hasSlot
(int slotID) Returns whether this element has the requested slot given the numeric identifier of the slot.boolean
hasStyle()
Indicates if this element has a style.boolean
Determines if this element acts as a container.boolean
Justifies whether this definition is extension element.boolean
isKindOf
(IElementDefn type) Determines if the given element type is a kind of this type.boolean
isPropertyReadOnly
(String propName) Checks whether the property value is read-only in the property sheet.boolean
isPropertyVisible
(String propName) Checks whether the property is visible to the property sheet.Methods inherited from interface org.eclipse.birt.report.model.api.metadata.IObjectDefn
findProperty, getDisplayName, getDisplayNameKey, getName, getPropertyIterator, propertiesIterator
-
Method Details
-
hasStyle
boolean hasStyle()Indicates if this element has a style.- Returns:
- Returns whether the element has a style.
-
getProperties
List<IElementPropertyDefn> getProperties()Returns the properties defined on this element. Each object in the list is instance ofIElementPropertyDefn
.- Returns:
- list of properties defined in this element and and all its parent elements.
-
getLocalProperties
List<IElementPropertyDefn> getLocalProperties()Returns properties definitions as a list. Each object in the list is instance ofIElementPropertyDefn
.- Returns:
- list of locally-defined properties.
-
getProperty
Gets a property definition given a property name.- Parameters:
propName
- The name of the property to get.- Returns:
- The property with that name, or null if the property cannot be found.
-
getMethods
List<IElementPropertyDefn> getMethods()Returns the method definition list of this element definition and parent definition. Each object in the list is instance ofIElementPropertyDefn
.- Returns:
- the method definition list.
-
getLocalMethods
List<IElementPropertyDefn> getLocalMethods()Returns the method definition list of this element definition. Each object in the list is instance ofIElementPropertyDefn
.- Returns:
- the method definition list.
-
getExpressions
List<IElementPropertyDefn> getExpressions()Returns the expression property definition list of this element definition and parent definition. Each object in the list is instance ofIElementPropertyDefn
.- Returns:
- the expression property definition list.
-
getLocalExpressions
List<IElementPropertyDefn> getLocalExpressions()Returns the expression property definition list of this element definition. Each object in the list is instance ofIElementPropertyDefn
.- Returns:
- the expression property definition list.
-
getGroupNames
Returns a list of the localized property group names defined by this element and its parents.The UI uses property groups to organize properties within the generic property sheet.
- Returns:
- The list of group names. If there is no groups defined on the element, the list will has no content.
-
allowsUserProperties
boolean allowsUserProperties()Determines if this element allows user properties.- Returns:
- Returns true if the element supports user-defined properties, false if not.
-
isContainer
boolean isContainer()Determines if this element acts as a container.- Returns:
- True if this element is a container, false otherwise.
-
getSlotCount
int getSlotCount()Returns the number of slots in this container.- Returns:
- The number of slots. Returns 0 if this element is not a container.
-
hasSlot
boolean hasSlot(int slotID) Returns whether this element has the requested slot given the numeric identifier of the slot.- Parameters:
slotID
- The slotID to check.- Returns:
- True if the slotID exists, false otherwise.
-
getSlot
Returns the meta-data definition for a slot given its numeric slot identifier.- Parameters:
slotID
- The slot identifier.- Returns:
- The slot information. Returns null if this element is not a container, or if the ID is not valid for this container.
-
getContents
List<IElementPropertyDefn> getContents()Returns the property definitions for this element that can hold other elements. Each one in the list is instance ofIPropertyDefn
.- Returns:
- the list of the property definition that can hold other elements
-
canContain
Reports whether the given slot can contain elements of the given type.- Parameters:
slot
- The slot to check.type
- The element type to check.- Returns:
- True if the slot can contain that element type, false if the element is not a container, if the slot does not exist, or if the slot can't contain that type of element.
-
canExtend
boolean canExtend()Returns whether elements of this class can be extended.- Returns:
- True if the element can be extended, false if not.
-
getNameOption
int getNameOption()Gets the name option that says how the element type handles names. One of the following defined inMetaDataConstants
:MetaDataConstants.NO_NAME
-- The element cannot have a name. (Probably not used.)MetaDataConstants.OPTIONAL_NAME
-- The element can optionally have a name, but a name is not required.MetaDataConstants.REQUIRED_NAME
-- The element must have a name.
- Returns:
- the name option
-
isPropertyVisible
Checks whether the property is visible to the property sheet.- Parameters:
propName
- the property name- Returns:
true
if the element definition has the property definition and it is visible,false
otherwise.
-
isPropertyReadOnly
Checks whether the property value is read-only in the property sheet.- Parameters:
propName
- the property name- Returns:
true
if the element definition has the property definition and it is readonly,false
otherwise.
-
isKindOf
Determines if the given element type is a kind of this type. It is if either the given type is the same as this one, or if the given type derives from this type.- Parameters:
type
- The element type to check.- Returns:
- True if it is a kind of this element, false otherwise.
-
isExtendedElement
boolean isExtendedElement()Justifies whether this definition is extension element.- Returns:
- true if it is extension element
-