|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.birt.report.model.api.ElementDetailHandle
org.eclipse.birt.report.model.api.ValueHandle
org.eclipse.birt.report.model.api.SimpleValueHandle
org.eclipse.birt.report.model.api.PropertyHandle
public class PropertyHandle
A handle for working with a top-level property of an element.
PropertyDefn
,
PropertyType
Field Summary | |
---|---|
protected org.eclipse.birt.report.model.metadata.ElementPropertyDefn |
propDefn
Definition of the property. |
Fields inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle |
---|
elementHandle |
Constructor Summary | |
---|---|
PropertyHandle(DesignElementHandle element,
org.eclipse.birt.report.model.metadata.ElementPropertyDefn prop)
Constructs the handle for a top-level property with the given element handle and the definition of the property. |
|
PropertyHandle(DesignElementHandle element,
java.lang.String propName)
Constructs the handle for a top-level property with the given element handle and property name. |
Method Summary | |
---|---|
void |
add(DesignElementHandle content)
Adds a report item to the property with the given element handle. |
void |
add(DesignElementHandle content,
int newPos)
Adds a report item to this property at the given position. |
void |
addItem(java.lang.Object item)
Adds an item to the end of a list property. |
boolean |
canContain(DesignElementHandle content)
Determines if the given slot can contain the content . |
boolean |
canContain(java.lang.String type)
Determines if the slot can contain an element with the type of type . |
void |
drop(DesignElementHandle content)
Drops a content element from the slot, and unresolve any reference property which refers the element to drop. |
void |
drop(int posn)
Drops a content element at the given position from the slot, and unresolve any reference property which refers the element to drop. |
void |
dropAndClear(DesignElementHandle content)
Drops a content element from the slot, and clear any reference property which refers the element to drop. |
void |
dropAndClear(int posn)
Drops a content element at the given position from the slot, and clear any reference property which refers the element to drop. |
boolean |
equals(java.lang.Object propertyHandle)
Returns true if the two property handle has the same element and the same property. |
DesignElementHandle |
getContent(int posn)
Gets the content at the given position. |
int |
getContentCount()
Returns the number of elements in the property. |
java.util.List |
getContents()
Returns the a list with contents.Items are handles to the contents and in order by position. |
IPropertyDefn |
getDefn()
Gets the generic property definition. |
java.util.ArrayList |
getListValue()
Gets the value as a list. |
IElementPropertyDefn |
getPropertyDefn()
Gets the property definition. |
org.eclipse.birt.report.model.core.MemberRef |
getReference()
Returns a reference to the value. |
java.util.List |
getReferenceableElementList()
returns the element reference value list if the property is element referenceable type. |
java.lang.Object |
getValue()
Gets the value of the property as a generic object. |
boolean |
isLocal()
Determines whether this property value is set locally for this element. |
boolean |
isReadOnly()
Checks whether a value is read-only in the property sheet. |
boolean |
isSet()
Determines whether this property value is set for this element. |
boolean |
isVisible()
Checks whether a value is visible in the property sheet. |
void |
move(DesignElementHandle content,
DesignElementHandle newContainer,
java.lang.String propName)
Moves a content element into a slot in another container element. |
void |
move(DesignElementHandle content,
DesignElementHandle newContainer,
java.lang.String propName,
int newPos)
Moves a content element into a slot in another container element at the specified position. |
java.util.List |
paste(DesignElementHandle content)
Pastes a report item to this property. |
java.util.List |
paste(DesignElementHandle content,
int newPos)
Pastes a report item to the slot. |
java.util.List |
paste(IDesignElement content)
Pastes a report item to this property. |
java.util.List |
paste(IDesignElement content,
int newPos)
Pastes a report item to the property. |
void |
removeItem(int posn)
Removes an item from a list property or member. |
void |
setEncryption(java.lang.String encryptionID)
|
void |
setValue(java.lang.Object value)
Implementation of abstract method defined in base class. |
void |
shift(DesignElementHandle content,
int toPosn)
Moves the position of a content element within the slot. |
Methods inherited from class org.eclipse.birt.report.model.api.SimpleValueHandle |
---|
addItem, clearValue, get, getAt, getChoices, getDefaultUnit, getDisplayValue, getFloatValue, getIntValue, getNumberValue, getStringValue, getTypeCode, indexOf, insertItem, isList, iterator, moveItem, removeItem, removeItems, replaceItem, setFloatValue, setIntValue, setNumberValue, setStringValue |
Methods inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle |
---|
getDesign, getElement, getElementHandle, getModule |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.eclipse.birt.report.model.metadata.ElementPropertyDefn propDefn
Constructor Detail |
---|
public PropertyHandle(DesignElementHandle element, java.lang.String propName)
element
- a handle to a report elementpropName
- the name of the propertypublic PropertyHandle(DesignElementHandle element, org.eclipse.birt.report.model.metadata.ElementPropertyDefn prop)
element
- a handle to a report elementprop
- the definition of the property.Method Detail |
---|
public IElementPropertyDefn getPropertyDefn()
ValueHandle
getPropertyDefn
in class ValueHandle
public IPropertyDefn getDefn()
SimpleValueHandle
getDefn
in class SimpleValueHandle
public java.lang.Object getValue()
SimpleValueHandle
getValue
in class SimpleValueHandle
SimpleValueHandle.getStringValue()
,
SimpleValueHandle.getIntValue()
,
SimpleValueHandle.getFloatValue()
,
SimpleValueHandle.getNumberValue()
public void setValue(java.lang.Object value) throws SemanticException
setValue
in class SimpleValueHandle
value
- The new value.
SemanticException
- If the value is not valid for the property or member.SimpleValueHandle.setIntValue(int)
,
SimpleValueHandle.setStringValue(java.lang.String)
,
SimpleValueHandle.setFloatValue(double)
,
SimpleValueHandle.setNumberValue(java.math.BigDecimal)
,
SimpleValueHandle.clearValue()
public org.eclipse.birt.report.model.core.MemberRef getReference()
ValueHandle
getReference
in class ValueHandle
public boolean isSet()
true
if the value is set, false
if it
is not setpublic boolean isLocal()
true
if the local value is set, otherwise
false
.public boolean equals(java.lang.Object propertyHandle)
equals
in class java.lang.Object
propertyHandle
- the property handle
public java.util.List getReferenceableElementList()
public boolean isReadOnly()
SimpleValueHandle
isReadOnly
in class SimpleValueHandle
true
if it is read-only. Otherwise
false
.public boolean isVisible()
SimpleValueHandle
isVisible
in class SimpleValueHandle
true
if it is visible. Otherwise false
.public void removeItem(int posn) throws PropertyValueException
SimpleValueHandle
removeItem
in class SimpleValueHandle
posn
- The position of the item to remove.
PropertyValueException
- If the property is not a list property.public void addItem(java.lang.Object item) throws SemanticException
SimpleValueHandle
addItem
in class SimpleValueHandle
item
- The new item to add.
SemanticException
- If the property is not a list property, or if the the value
of the item is incorrect.public void add(DesignElementHandle content) throws SemanticException
content
- handle to the newly created element
SemanticException
- if the element is not allowed to insertpublic void add(DesignElementHandle content, int newPos) throws SemanticException
content
- handle to the newly created elementnewPos
- the position index at which the content to be inserted,
0-based integer
SemanticException
- if the element is not allowed to insertpublic java.util.List paste(DesignElementHandle content) throws SemanticException
content
- the newly created element handle
SemanticException
- if the element is not allowed to pastepublic java.util.List paste(IDesignElement content) throws SemanticException
content
- the newly created element
SemanticException
- if the element is not allowed to pastepublic java.util.List paste(DesignElementHandle content, int newPos) throws SemanticException
content
- the newly created element handlenewPos
- the position index at which the content to be inserted.
SemanticException
- if the element is not allowed in the slotpublic java.util.List paste(IDesignElement content, int newPos) throws SemanticException
content
- the newly created elementnewPos
- the position index at which the content to be inserted.
SemanticException
- if the element is not allowed in the propertypublic java.util.ArrayList getListValue()
SimpleValueHandle
getListValue
in class SimpleValueHandle
public java.util.List getContents()
public int getContentCount()
public void shift(DesignElementHandle content, int toPosn) throws ContentException
content
- handle to the content to movetoPosn
- the new position
ContentException
- if the content is not in the slot, or if the to position is
not valid.public void move(DesignElementHandle content, DesignElementHandle newContainer, java.lang.String propName) throws ContentException
content
- a handle to the element to movenewContainer
- a handle to the new container elementpropName
- the target property name where the element will be moved to.
ContentException
- if the content is not in this slot or if the new container is
not, in fact, a container, or if the content cannot go into
the target slot.public void move(DesignElementHandle content, DesignElementHandle newContainer, java.lang.String propName, int newPos) throws ContentException
content
- a handle to the element to movenewContainer
- a handle to the new container elementpropName
- the target property name where the element will be moved to.newPos
- the position to which the content will be moved. If it is
greater than the current size of the target slot, the content
will be appended at the end of the target slot.
ContentException
- if the content is not in this slot or if the new container is
not, in fact, a container, or if the content cannot go into
the target slot.public void dropAndClear(DesignElementHandle content) throws SemanticException
content
- a handle to the content to drop
SemanticException
- if the content is not within the slotpublic void drop(DesignElementHandle content) throws SemanticException
content
- a handle to the content to drop
SemanticException
- if the content is not within the slotpublic void dropAndClear(int posn) throws SemanticException
posn
- the position of the content to drop
SemanticException
- if the position is out of rangepublic void drop(int posn) throws SemanticException
posn
- the position of the content to drop
SemanticException
- if the position is out of rangepublic boolean canContain(java.lang.String type)
type
.
type
- the name of the element type, like "Table", "List", etc.
true
if the slot can contain the an element with
type
type, otherwise false
.public boolean canContain(DesignElementHandle content)
content
.
content
- the design element handle to check
true
if the slot with the given slotId
can contain the content
, otherwise
false
.public DesignElementHandle getContent(int posn)
posn
- the index where the content resides
public void setEncryption(java.lang.String encryptionID) throws SemanticException
encryptionID
-
SemanticException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |