Class ReportSVGIcon

java.lang.Object
com.nomagic.magicreport.Image
com.nomagic.magicreport.ReportSVGIcon
All Implemented Interfaces:
IObserverMessage, IVariable, Serializable, Cloneable

@OpenApiAll public class ReportSVGIcon extends Image
A bean represent SVG icon. This class store original icon and SVGGraphics2D to create as svg
Since:
Sep 02, 2021
See Also:
  • Constructor Details

    • ReportSVGIcon

      public ReportSVGIcon(String id, Icon icon, String imageFormat, boolean disposeAfterUse)
  • Method Details

    • getSVGGraphics2D

      public org.apache.batik.svggen.SVGGraphics2D getSVGGraphics2D()
    • setSVGGraphics2D

      protected void setSVGGraphics2D(org.apache.batik.svggen.SVGGraphics2D svgGraphics2D)
    • getIcon

      public Icon getIcon()
    • flush

      public void flush(Object track) throws IOException
      Description copied from class: Image
      Flush current buffered image from Image.getData() into file stream. This method will set a new image file and dispose the data. The image file will be deleted when tracked object is garbage collected.
      Overrides:
      flush in class Image
      Parameters:
      track - the marker object track flushed file, deleting the file when the marker instance is garbage collected.
      Throws:
      IOException - when unable to flush the data.
      See Also:
    • ensureOriginal

      public void ensureOriginal()
      Overrides:
      ensureOriginal in class Image
    • readData

      public BufferedImage readData()
      Description copied from class: Image
      Read a buffered image from this instance. Return BufferedImage if Image.getData() contains data or read from Image.getImageFile().
      Overrides:
      readData in class Image
      Returns:
      a buffered image from Image.getData() or Image.getImageFile()
    • rotate

      public void rotate(boolean clockwise)
      Description copied from class: Image
      Rotate image in clockwise or anti-clockwise.
      Overrides:
      rotate in class Image
      Parameters:
      clockwise - true for clockwise; false for anti-clockwise
    • createSVGGraphics2D

      protected org.apache.batik.svggen.SVGGraphics2D createSVGGraphics2D()
      Create SVGGraphics2D
      Returns:
    • getBufferedImage

      public BufferedImage getBufferedImage()
      Create buffered image from icon.
      Returns:
      BufferedImage
    • clone

      public Object clone()
      Description copied from class: Image
      Creates and returns a copy of this object.
      Overrides:
      clone in class Image
      Returns:
      a copy of this instance
      See Also: