Interface EmbeddedImage


public interface EmbeddedImage
This interface describes an image used in a InetHtmlDocument. It supports normal URL-referenced images and pasted images, which have no URL yet. It's up to the user of the document, to store the pasted images and give them a valid URL before exporting the content of the document to HTML form.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the data of this Image, if it is cached within the editors memory.
    Returns the location of this image.
    void
    setURL(String location)
    Sets the location of the image referred by this object.
  • Method Details

    • getUrl

      String getUrl()
      Returns the location of this image. If the image is only present in memory, this URL is null or may be a cache reference, if the images is cached as well. To detect a cache reference use ImageCache.isCacheReference(String). In that case, the URL has to be set call setURL before saving the InetHtmlDocument, otherwise the image reference would be empty.
      Returns:
      The URL of the image, if any, or null
    • setURL

      void setURL(String location)
      Sets the location of the image referred by this object. The reference set here will be used within the document and will be written to the HTML output on saving.
      Parameters:
      location - New location for the referenced image.
    • getImageData

      ImageIcon getImageData()
      Returns the data of this Image, if it is cached within the editors memory. If the this object refers to a linked image, this method returns null.
      Returns:
      referenced Image