Class ComplexValueHandle
java.lang.Object
org.eclipse.birt.report.model.api.ElementDetailHandle
org.eclipse.birt.report.model.api.ValueHandle
org.eclipse.birt.report.model.api.ComplexValueHandle
- Direct Known Subclasses:
ColorHandle
,DimensionHandle
,ExpressionHandle
,ExpressionListHandle
,FontHandle
Abstract class for working with properties that have internal structure, such
as a color, a dimension or a font.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.birt.report.model.core.StructureContext
Path to the property within an element, a list or a structure.protected org.eclipse.birt.report.model.metadata.ElementPropertyDefn
Property definition.Fields inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
elementHandle
-
Constructor Summary
ConstructorsConstructorDescriptionComplexValueHandle
(DesignElementHandle element, org.eclipse.birt.report.model.core.MemberRef theMemberRef) Deprecated.ComplexValueHandle
(DesignElementHandle element, org.eclipse.birt.report.model.core.StructureContext theMemberContext) Constructs a handle given an element handle and member reference.ComplexValueHandle
(DesignElementHandle element, org.eclipse.birt.report.model.metadata.ElementPropertyDefn thePropDefn) Constructs a handle given an element handle and definition of a property. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.birt.report.model.core.StructureContext
Returns the structure context to the value.protected IPropertyDefn
getDefn()
Returns a definition for the handle.Returns the value of the property or member in a localized format.Gets the property definition.protected final Object
Returns the value stored in the memory.Gets the property value converted to a string value.getValue()
Gets the value of the property as a generic object.boolean
isSet()
Tests whether this property value is set for this element or the structure.void
setStringValue
(String value) Sets the value of a property or member to a string.void
Sets the value of a property to the given value.Methods inherited from class org.eclipse.birt.report.model.api.ValueHandle
getReference
Methods inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
getDesign, getElement, getElementHandle, getModule
-
Field Details
-
propDefn
protected org.eclipse.birt.report.model.metadata.ElementPropertyDefn propDefnProperty definition. -
memberContext
protected org.eclipse.birt.report.model.core.StructureContext memberContextPath to the property within an element, a list or a structure.
-
-
Constructor Details
-
ComplexValueHandle
public ComplexValueHandle(DesignElementHandle element, org.eclipse.birt.report.model.metadata.ElementPropertyDefn thePropDefn) Constructs a handle given an element handle and definition of a property. The element property definition cannot be null.- Parameters:
element
- handle to the report element that contains the element property.thePropDefn
- element property definition.
-
ComplexValueHandle
public ComplexValueHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.StructureContext theMemberContext) Constructs a handle given an element handle and member reference. The element property definition can not be null.- Parameters:
element
- handle to the report element that has the property that contains the structure that contains the member.theMemberContext
- The context to the member.
-
ComplexValueHandle
@Deprecated public ComplexValueHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.MemberRef theMemberRef) Deprecated.Constructs a handle given an element handle and member reference. The element property definition can not be null.- Parameters:
element
- handle to the report element that has the property that contains the structure that contains the member.theMemberRef
- The reference to the member.
-
-
Method Details
-
setValue
Sets the value of a property to the given value. If the value is null, then the property value is cleared.- Parameters:
value
- The new value.- Throws:
SemanticException
- If the value is not valid for the property or member.
-
getValue
Gets the value of the property as a generic object.- Returns:
- The value of the property or member as a generic object.
-
getRawValue
Returns the value stored in the memory. The return value won't be wrapped.- Returns:
- the value
-
setStringValue
Sets the value of a property or member to a string. Call this method to set a input string from the user( localized or non-localized value).- Parameters:
value
- the value to set- Throws:
SemanticException
- if the string value is not valid for the property or member.
-
getStringValue
Gets the property value converted to a string value.- Returns:
- The property or member value as a string.
-
getDisplayValue
Returns the value of the property or member in a localized format.- Returns:
- Returns the value of the property or member in a localized format.
-
getPropertyDefn
Description copied from class:ValueHandle
Gets the property definition. This is the definition of the property that contains the specific value. If the value is a structure or member, then this is the definition of the property that contains the list that contains the structure that contains the member.- Specified by:
getPropertyDefn
in classValueHandle
- Returns:
- the property definition
-
getContext
public org.eclipse.birt.report.model.core.StructureContext getContext()Description copied from class:ValueHandle
Returns the structure context to the value. The context is used to identify a list entry or member.- Specified by:
getContext
in classValueHandle
-
getDefn
Returns a definition for the handle.- Returns:
- the definition of the handle.
-
isSet
public boolean isSet()Tests whether this property value is set for this element or the structure.- For an element property, it is set if it is defined on this element property or any of its parents, or in the element's private style property. It is considered unset if it is set on a shared style.
- For a member, it is set if the value is not
null
, otherwise it is considered unset.
- Returns:
true
if the value is set,false
if it is not set
-