org.eclipse.birt.report.engine.api.script.element
Interface IImage

All Superinterfaces:
IDesignElement, IReportElement, IReportItem

public interface IImage
extends IReportItem

Represents a the design of an Image in the scripting environment


Method Summary
 IAction getAction()
          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.
 java.lang.String getFile()
          Returns the image file, if the source type is not IMAGE_REF_TYPE_FILE return null.
 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()
          Gets the image url, if the source type is not IMAGE_REF_TYPE_URL return null.
 java.lang.String getValueExpression()
          Returns the value expression of the image if the image source type is IMAGE_REF_TYPE_EXPR.
 void setAltText(java.lang.String altText)
          Sets 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 file.
 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)
          Returns the image source type.
 void setTypeExpression(java.lang.String value)
          Sets the type expression value.
 void setURI(java.lang.String uri)
          Deprecated. Sets the image uri property. The source type is automatically set in this method. Whether IMAGE_REF_TYPE_FILE or IMAGE_REF_TYPE_URL depends on the uri to set.
 void setURL(java.lang.String url)
          Sets the image url.
 void setValueExpression(java.lang.String value)
          Sets the value expression value.
 
Methods inherited from interface org.eclipse.birt.report.engine.api.script.element.IReportItem
addDataBinding, addHideRule, addHighlightRule, getBookmark, getDataBinding, getDataBindings, getHeight, getHideRules, getHighlightRules, getTocExpression, getWidth, getX, getY, removeDataBinding, removeDataBindings, removeHideRule, removeHideRules, removeHighlightRule, removeHighlightRules, setBookmark, setCurrentView, setHeight, setHeight, setTocExpression, setWidth, setWidth, setX, setX, setY, setY
 
Methods inherited from interface org.eclipse.birt.report.engine.api.script.element.IReportElement
getComments, getCustomXml, getDisplayName, getDisplayNameKey, getName, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setName
 
Methods inherited from interface org.eclipse.birt.report.engine.api.script.element.IDesignElement
getNamedExpression, getParent, getQualifiedName, getReport, getStyle, getUserProperty, setNamedExpression, setUserProperty, setUserProperty
 

Method Detail

getScale

double getScale()
Returns the image scale. The scale factor for the image given as a percentage.

Returns:
the scale of this image.

getSize

java.lang.String getSize()
Returns the image size. The size must be the internal name that is one the following options defined in DesignChoiceConstants:

Returns:
the internal value of the image size.

getAltText

java.lang.String getAltText()
Returns the alternate text of this image.

Returns:
the alternate text of the image item.

setAltText

void setAltText(java.lang.String altText)
                throws ScriptException
Sets the alternate text of this image.

Parameters:
altText - the alternate text
Throws:
ScriptException

getAltTextKey

java.lang.String getAltTextKey()
Returns the resource key of the alternate text of this image.

Returns:
the resource key of the alternate text

setAltTextKey

void setAltTextKey(java.lang.String altTextKey)
                   throws ScriptException
Sets the resource key of the alternate text of this image.

Parameters:
altTextKey - the resource key of the alternate text
Throws:
ScriptException

getSource

java.lang.String getSource()
Returns the image source type. This is one of the following options defined in DesignChoiceConstants:

Returns:
the image source type.

setSource

void setSource(java.lang.String source)
               throws ScriptException
Returns the image source type. This is one of the following options defined in DesignChoiceConstants:

Parameters:
source - the image source type.
Throws:
ScriptException - if the source is not one of the above.

getURI

java.lang.String getURI()
Returns the image URI if the image source type is IMAGE_REF_TYPE_URL or IMAGE_REF_TYPE_FILE.

Returns:
the image URI if the image source type is IMAGE_REF_TYPE_URL or IMAGE_REF_TYPE_FILE. Otherwise, return null.

getTypeExpression

java.lang.String getTypeExpression()
Returns the type expression of the image item if the image source type is IMAGE_REF_TYPE_EXPR.

Returns:
the type expression, if the image source type is IMAGE_REF_TYPE_EXPR. Otherwise, return null.

getValueExpression

java.lang.String getValueExpression()
Returns the value expression of the image if the image source type is IMAGE_REF_TYPE_EXPR.

Returns:
the value expression, if the image source type is IMAGE_REF_TYPE_EXPR. Otherwise, return null.

getImageName

java.lang.String getImageName()
Returns the embedded image name that this image refers, if the image source type is IMAGE_REF_TYPE_EMBED. This is not the same as DesignElementHandle#getNameof this image item.

Returns:
the embedded image name, if the image source type is IMAGE_REF_TYPE_EMBED. Otherwise, return null.

setImageName

void setImageName(java.lang.String name)
                  throws ScriptException
Sets the embedded image name that this image refers, if the image source type is IMAGE_REF_TYPE_EMBED. The reference type is automatically set in this method. This is not the same as DesignElementHandle#setName( String ).

Parameters:
name - the embedded image name
Throws:
ScriptException - if the property is locked.

setURI

void setURI(java.lang.String uri)
            throws ScriptException
Deprecated. Sets the image uri property. The source type is automatically set in this method. Whether IMAGE_REF_TYPE_FILE or IMAGE_REF_TYPE_URL depends on the uri to set.

Parameters:
uri - the uri to be set.
Throws:
ScriptException - if the property is locked.

setScale

void setScale(double scale)
              throws ScriptException
Sets the image scale property. The scale factor for the image given as a percentage. The default is 100%.

Parameters:
scale - the scale value to be set.
Throws:
ScriptException - if the property is locked.

setSize

void setSize(java.lang.String size)
             throws ScriptException
Sets the image size property. The input value is one of the followings defined in DesignChoiceConstants:

Parameters:
size - the size value to be set.
Throws:
ScriptException - if the input size is not one of the above, or if the property is locked.

setTypeExpression

void setTypeExpression(java.lang.String value)
                       throws ScriptException
Sets the type expression value. The source type is automatically set to IMAGE_REF_TYPE_EXPR.

Parameters:
value - the type expression value.
Throws:
ScriptException - if the property is locked.

setValueExpression

void setValueExpression(java.lang.String value)
                        throws ScriptException
Sets the value expression value. The source type is automatically set to IMAGE_REF_TYPE_EXPR.

Parameters:
value - the value expression.
Throws:
ScriptException - if the property is locked.

getAction

IAction getAction()
Returns a handle to work with the action property, action is a structure that defines a hyperlink.

Returns:
a handle to the action property, return null if the action has not been set on the image.
See Also:
ActionHandle

getHelpText

java.lang.String getHelpText()
Returns the help text of this image item.

Returns:
the help text

setHelpText

void setHelpText(java.lang.String helpText)
                 throws ScriptException
Sets the help text of this image item.

Parameters:
helpText - the help text
Throws:
ScriptException - if the property is locked.

getHelpTextKey

java.lang.String getHelpTextKey()
Returns the resource key of the help text of this image item.

Returns:
the resource key of the help text

setHelpTextKey

void setHelpTextKey(java.lang.String helpTextKey)
                    throws ScriptException
Sets the resource key of help text of this image item.

Parameters:
helpTextKey - the help text
Throws:
ScriptException - if the property is locked.

setURL

void setURL(java.lang.String url)
            throws ScriptException
Sets the image url. The source type is IMAGE_REF_TYPE_URL, and will automatically set in this method.

Parameters:
url -
Throws:
ScriptException

getURL

java.lang.String getURL()
Gets the image url, if the source type is not IMAGE_REF_TYPE_URL return null.

Returns:
image url.

setFile

void setFile(java.lang.String file)
             throws ScriptException
Sets the image file. The source type is IMAGE_REF_TYPE_FILE, and will automatically set in this method.

Parameters:
file -
Throws:
ScriptException

getFile

java.lang.String getFile()
Returns the image file, if the source type is not IMAGE_REF_TYPE_FILE return null.

Returns:
image file.


Copyright © 2008 Actuate Corp. All rights reserved.