Package org.jfree.svg

Class ImageElement


  • public final class ImageElement
    extends java.lang.Object
    A (String, Image) pair that links together a reference ID and the source image. This is used internally by SVGGraphics2D to track images as they are rendered. This is important when images are not embedded in the SVG output, in which case you may need to generate corresponding image files for the images (see also SVGGraphics2D.getSVGImages()).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String href
      The filename specified in the href.
      private java.awt.Image image
      The image.
    • Constructor Summary

      Constructors 
      Constructor Description
      ImageElement​(java.lang.String href, java.awt.Image image)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getHref()
      Returns the reference ID that was specified in the constructor.
      java.awt.Image getImage()
      Returns the image that was specified in the constructor.
      java.lang.String toString()
      Returns a string representation of this object, primarily for debugging purposes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • href

        private final java.lang.String href
        The filename specified in the href.
      • image

        private final java.awt.Image image
        The image.
    • Constructor Detail

      • ImageElement

        public ImageElement​(java.lang.String href,
                            java.awt.Image image)
        Creates a new instance.
        Parameters:
        href - the href (null not permitted).
        image - the image (null not permitted).
    • Method Detail

      • getHref

        public java.lang.String getHref()
        Returns the reference ID that was specified in the constructor.
        Returns:
        The href (never null).
      • getImage

        public java.awt.Image getImage()
        Returns the image that was specified in the constructor.
        Returns:
        The image (never null).
      • toString

        public java.lang.String toString()
        Returns a string representation of this object, primarily for debugging purposes.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string.