|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.birt.report.model.api.DesignElementHandle
org.eclipse.birt.report.model.api.ReportElementHandle
org.eclipse.birt.report.model.api.ReportItemHandle
org.eclipse.birt.report.model.api.ImageHandle
public class ImageHandle
Represents an image report item. The image can come from a number of sources:
The image has the following properties:
ImageItem
,
DesignChoiceConstants
Field Summary |
---|
Fields inherited from class org.eclipse.birt.report.model.api.ReportItemHandle |
---|
DATABINDING_TYPE_DATA, DATABINDING_TYPE_NONE, DATABINDING_TYPE_REPORT_ITEM_REF |
Fields inherited from class org.eclipse.birt.report.model.api.ReportElementHandle |
---|
element |
Fields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle |
---|
module |
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IImageItemModel |
---|
ACTION_PROP, ALT_TEXT_KEY_PROP, ALT_TEXT_PROP, HELP_TEXT_ID_PROP, HELP_TEXT_PROP, IMAGE_NAME_PROP, SCALE_PROP, SIZE_PROP, SOURCE_PROP, TYPE_EXPR_PROP, URI_PROP, VALUE_EXPR_PROP |
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IReportItemModel |
---|
ACL_EXPRESSION_PROP, ALLOW_EXPORT_PROP, BOOKMARK_PROP, BOUND_DATA_COLUMNS_PROP, CASCADE_ACL_PROP, CUBE_PROP, DATA_BINDING_REF_PROP, DATA_SET_PROP, HEIGHT_PROP, MULTI_VIEWS_PROP, ON_CREATE_METHOD, ON_PAGE_BREAK_METHOD, ON_PREPARE_METHOD, ON_RENDER_METHOD, PARAM_BINDINGS_PROP, TOC_PROP, VISIBILITY_PROP, WIDTH_PROP, X_PROP, Y_PROP, Z_INDEX_PROP |
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IStyledElementModel |
---|
STYLE_PROP |
Fields inherited from interface org.eclipse.birt.report.model.api.elements.IReportItemMethodContext |
---|
ON_CREATE_CONTEXT, ON_PREPARE_CONTEXT, ON_RENDER_CONTEXT |
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel |
---|
COMMENTS_PROP, CUSTOM_XML_PROP, DISPLAY_NAME_ID_PROP, DISPLAY_NAME_PROP, EVENT_HANDLER_CLASS_PROP, EXTENDS_PROP, FULL_LABEL, ID_SUFFIX, NAME_PROP, NO_SLOT, PROPERTY_MASKS_PROP, REF_TEMPLATE_PARAMETER_PROP, SHORT_LABEL, USER_LABEL, USER_PROPERTIES_PROP, VIEW_ACTION_PROP |
Constructor Summary | |
---|---|
ImageHandle(org.eclipse.birt.report.model.core.Module module,
org.eclipse.birt.report.model.core.DesignElement element)
Constructs a image handle with the given design and the element. |
Method Summary | |
---|---|
ActionHandle |
getActionHandle()
Returns a handle to work with the action property, action is a structure that defines a hyperlink. |
java.lang.String |
getAltText()
Returns the alternate text of this image. |
java.lang.String |
getAltTextKey()
Returns the resource key of the alternate text of this image. |
EmbeddedImageHandle |
getEmbeddedImage()
Returns the embedded image handle that this image refers, if the image source type is IMAGE_REF_TYPE_EMBED . |
java.lang.String |
getFile()
Returns the image URI if the image source type is IMAGE_REF_TYPE_URL or IMAGE_REF_TYPE_FILE . |
java.lang.String |
getHelpText()
Returns the help text of this image item. |
java.lang.String |
getHelpTextKey()
Returns the resource key of the help text of this image item. |
java.lang.String |
getImageName()
Returns the embedded image name that this image refers, if the image source type is IMAGE_REF_TYPE_EMBED . |
double |
getScale()
Returns the image scale. |
java.lang.String |
getSize()
Returns the image size. |
java.lang.String |
getSource()
Returns the image source type. |
java.lang.String |
getTypeExpression()
Returns the type expression of the image item if the image source type is IMAGE_REF_TYPE_EXPR . |
java.lang.String |
getURI()
Returns the image URI if the image source type is IMAGE_REF_TYPE_URL or IMAGE_REF_TYPE_FILE . |
java.lang.String |
getURL()
Returns the image URI if the image source type is IMAGE_REF_TYPE_URL or IMAGE_REF_TYPE_FILE . |
java.lang.String |
getValueExpression()
Returns the value expression of the image if the image source type is IMAGE_REF_TYPE_EXPR . |
ActionHandle |
setAction(Action action)
Set an action on the image. |
void |
setAltText(java.lang.String altText)
Sets the the alternate text of this image. |
void |
setAltTextKey(java.lang.String altTextKey)
Sets the resource key of the alternate text of this image. |
void |
setFile(java.lang.String file)
Sets the image uri property. |
void |
setHelpText(java.lang.String helpText)
Sets the help text of this image item. |
void |
setHelpTextKey(java.lang.String helpTextKey)
Sets the resource key of help text of this image item. |
void |
setImageName(java.lang.String name)
Sets the embedded image name that this image refers, if the image source type is IMAGE_REF_TYPE_EMBED . |
void |
setScale(double scale)
Sets the image scale property. |
void |
setSize(java.lang.String size)
Sets the image size property. |
void |
setSource(java.lang.String source)
Sets the image source type. |
void |
setTypeExpression(java.lang.String value)
Sets the type expression value. |
void |
setURI(java.lang.String uri)
Deprecated. should use setFile(String) or
setURL(String) . |
void |
setURL(java.lang.String url)
Sets the image uri property. |
void |
setValueExpression(java.lang.String value)
Sets the value expression value. |
Methods inherited from class org.eclipse.birt.report.model.api.ReportElementHandle |
---|
getComments, getCustomXml, getDisplayName, getDisplayNameKey, getElement, getPropertyMask, isValidLayoutForCompoundElement, isValidReferenceForCompoundElement, propertyMaskIterator, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setPropertyMask |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
module
- the moduleelement
- the model representation of the elementMethod Detail |
---|
public double getScale()
public java.lang.String getSize()
DesignChoiceConstants
:
IMAGE_SIZE_SIZE_TO_IMAGE
IMAGE_SIZE_SCALE_TO_ITEM
IMAGE_SIZE_CLIP
public java.lang.String getAltText()
public void setAltText(java.lang.String altText) throws SemanticException
altText
- the alternate text
SemanticException
public java.lang.String getAltTextKey()
public void setAltTextKey(java.lang.String altTextKey) throws SemanticException
altTextKey
- the alternate text key
SemanticException
public java.lang.String getSource()
DesignChoiceConstants
:
IMAGE_REF_TYPE_NONE
IMAGE_REF_TYPE_URL
IMAGE_REF_TYPE_FILE
IMAGE_REF_TYPE_EXPR
IMAGE_REF_TYPE_EMBED
public void setSource(java.lang.String source) throws SemanticException
DesignChoiceConstants
:
IMAGE_REF_TYPE_NONE
IMAGE_REF_TYPE_URL
IMAGE_REF_TYPE_FILE
IMAGE_REF_TYPE_EXPR
IMAGE_REF_TYPE_EMBED
source
- the image source type.
SemanticException
- if the source
is not one of the above.public java.lang.String getURI()
IMAGE_REF_TYPE_URL
or IMAGE_REF_TYPE_FILE
.
IMAGE_REF_TYPE_URL
or
IMAGE_REF_TYPE_FILE
. Otherwise, return
null
.public java.lang.String getURL()
IMAGE_REF_TYPE_URL
or IMAGE_REF_TYPE_FILE
.
IMAGE_REF_TYPE_URL
, Otherwise, return
null
.public java.lang.String getFile()
IMAGE_REF_TYPE_URL
or IMAGE_REF_TYPE_FILE
.
IMAGE_REF_TYPE_FILE
. Otherwise, return
null
.public java.lang.String getTypeExpression()
IMAGE_REF_TYPE_EXPR
.
IMAGE_REF_TYPE_EXPR
. Otherwise, return
null
.public java.lang.String getValueExpression()
IMAGE_REF_TYPE_EXPR
.
IMAGE_REF_TYPE_EXPR
. Otherwise, return
null
.public java.lang.String getImageName()
IMAGE_REF_TYPE_EMBED
. This is not the same as
DesignElementHandle.getName()
of this image item.
IMAGE_REF_TYPE_EMBED
. Otherwise, return
null
.public EmbeddedImageHandle getEmbeddedImage()
IMAGE_REF_TYPE_EMBED
.
IMAGE_REF_TYPE_EMBED
and the referred embedded image
is found. Otherwise, return null
.public void setImageName(java.lang.String name) throws SemanticException
IMAGE_REF_TYPE_EMBED
. The reference type is
automatically set in this method. This is not the same as
DesignElementHandle.setName(String )
.
name
- the embedded image name
SemanticException
- if the property is locked.public void setURL(java.lang.String url) throws SemanticException
IMAGE_REF_TYPE_URL
, and will automatically set in this
method.
url
- the url to be set.
SemanticException
- if the property is locked.public void setURI(java.lang.String uri) throws SemanticException
setFile(String)
or
setURL(String)
.
IMAGE_REF_TYPE_URL
, and will automatically set in this
method.
uri
- the uri to be set.
SemanticException
- if the property is locked.public void setFile(java.lang.String file) throws SemanticException
IMAGE_REF_TYPE_FILE
, and will automatically set in this
method.
file
- the file to be set.
SemanticException
- if the property is locked.public void setScale(double scale) throws SemanticException
scale
- the scale value to be set.
SemanticException
- if the property is locked.public void setSize(java.lang.String size) throws SemanticException
DesignChoiceConstants
:
IMAGE_SIZE_SIZE_TO_IMAGE
IMAGE_SIZE_SCALE_TO_ITEM
IMAGE_SIZE_CLIP
size
- the size value to be set.
SemanticException
- if the input size is not one of the above, or if the property
is locked.public void setTypeExpression(java.lang.String value) throws SemanticException
IMAGE_REF_TYPE_EXPR
.
value
- the type expression value.
SemanticException
- if the property is locked.public void setValueExpression(java.lang.String value) throws SemanticException
IMAGE_REF_TYPE_EXPR
.
value
- the value expression.
SemanticException
- if the property is locked.public ActionHandle getActionHandle()
null
if the
action has not been set on the image.ActionHandle
public ActionHandle setAction(Action action) throws SemanticException
action
- new action to be set on the image, it represents a bookmark
link, hyper-link, and drill through etc.
null
if the
action has not been set on the image.
SemanticException
- if member of the action is not valid.public java.lang.String getHelpText()
public void setHelpText(java.lang.String helpText) throws SemanticException
helpText
- the help text
SemanticException
- if the property is locked.public java.lang.String getHelpTextKey()
public void setHelpTextKey(java.lang.String helpTextKey) throws SemanticException
helpTextKey
- the help text
SemanticException
- if the property is locked.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |