All Superinterfaces:
IDesignElement, IReportElement, IReportItem

public interface IImage extends IReportItem
Represents a the design of an Image in the scripting environment
  • Method Details

    • getScale

      double getScale()
      Returns the image scale. The scale factor for the image given as a percentage.
      Returns:
      the scale of this image.
    • getSize

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

      • IMAGE_SIZE_SIZE_TO_IMAGE
      • IMAGE_SIZE_SCALE_TO_ITEM
      • IMAGE_SIZE_CLIP
      Returns:
      the internal value of the image size.
    • getAltText

      String getAltText()
      Returns the alternate text of this image.
      Returns:
      the alternate text of the image item.
    • setAltText

      void setAltText(String altText) throws SemanticException
      Sets the alternate text of this image.
      Parameters:
      altText - the alternate text of the image item.
      Throws:
      SemanticException
    • getAltTextKey

      String getAltTextKey()
      Returns the resource key of the alternate text of this image.
      Returns:
      the resource key of the alternate text
    • setAltTextKey

      void setAltTextKey(String altTextKey) throws SemanticException
      Sets the resource key of the alternate text of this image.
      Parameters:
      altTextKey - the alternate text of the image item.
      Throws:
      SemanticException
    • getSource

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

      • IMAGE_REF_TYPE_NONE
      • IMAGE_REF_TYPE_URL
      • IMAGE_REF_TYPE_FILE
      • IMAGE_REF_TYPE_EXPR
      • IMAGE_REF_TYPE_EMBED
      Returns:
      the image source type.
    • setSource

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

      • IMAGE_REF_TYPE_NONE
      • IMAGE_REF_TYPE_URL
      • IMAGE_REF_TYPE_FILE
      • IMAGE_REF_TYPE_EXPR
      • IMAGE_REF_TYPE_EMBED
      Parameters:
      source - the image source type.
      Throws:
      SemanticException - if the source is not one of the above.
    • getURI

      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

      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

      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

      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.getName()of this image item.
      Returns:
      the embedded image name, if the image source type is IMAGE_REF_TYPE_EMBED. Otherwise, return null.
    • setImageName

      void setImageName(String name) throws SemanticException
      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:
      SemanticException - if the property is locked.
    • setURI

      @Deprecated void setURI(String uri) throws SemanticException
      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:
      SemanticException - if the property is locked.
    • setScale

      void setScale(double scale) throws SemanticException
      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:
      SemanticException - if the property is locked.
    • setSize

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

      • IMAGE_SIZE_SIZE_TO_IMAGE
      • IMAGE_SIZE_SCALE_TO_ITEM
      • IMAGE_SIZE_CLIP
      Parameters:
      size - the size value to be set.
      Throws:
      SemanticException - if the input size is not one of the above, or if the property is locked.
    • setTypeExpression

      void setTypeExpression(String value) throws SemanticException
      Sets the type expression value. The source type is automatically set to IMAGE_REF_TYPE_EXPR.
      Parameters:
      value - the type expression value.
      Throws:
      SemanticException - if the property is locked.
    • setValueExpression

      void setValueExpression(String value) throws SemanticException
      Sets the value expression value. The source type is automatically set to IMAGE_REF_TYPE_EXPR.
      Parameters:
      value - the value expression.
      Throws:
      SemanticException - 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:
    • addAction

      void addAction(IAction action) throws SemanticException
      Add the action structure to this Image item.
      Parameters:
      action -
      Throws:
      SemanticException
    • getHelpText

      String getHelpText()
      Returns the help text of this image item.
      Returns:
      the help text
    • setHelpText

      void setHelpText(String helpText) throws SemanticException
      Sets the help text of this image item.
      Parameters:
      helpText - the help text
      Throws:
      SemanticException - if the property is locked.
    • getHelpTextKey

      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(String helpTextKey) throws SemanticException
      Sets the resource key of help text of this image item.
      Parameters:
      helpTextKey - the help text
      Throws:
      SemanticException - if the property is locked.
    • setURL

      void setURL(String url) throws SemanticException
      Sets the image url. The source type is IMAGE_REF_TYPE_URL, and will automatically set in this method.
      Parameters:
      url -
      Throws:
      SemanticException
    • getURL

      String getURL()
      Gets the image url, if the source type is not IMAGE_REF_TYPE_URL return null.
      Returns:
      image url.
    • setFile

      void setFile(String file) throws SemanticException
      Sets the image file. The source type is IMAGE_REF_TYPE_FILE, and will automatically set in this method.
      Parameters:
      file -
      Throws:
      SemanticException
    • getFile

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