Class ImageChart


  • public class ImageChart
    extends Object
    This class allows to handle the properties of the graph created by JFreeChart.
    Author:
    Alberto
    • Constructor Detail

      • ImageChart

        public ImageChart()
        Default constructor.
      • ImageChart

        public ImageChart​(String name,
                          org.jfree.chart.JFreeChart chart,
                          int width,
                          int height)
        Constructor.
        Parameters:
        name -
        chart -
        width -
        height -
      • ImageChart

        public ImageChart​(String name,
                          org.jfree.chart.JFreeChart chart)
        Constructor.
        Parameters:
        name -
        chart -
    • Method Detail

      • setName

        public void setName​(String name)
        Set the image name.
        Parameters:
        name -
      • setChart

        public void setChart​(org.jfree.chart.JFreeChart chart)
        Set chart.
        Parameters:
        chart -
      • setHeight

        public void setHeight​(int height)
        Set chart height.
        Parameters:
        height -
      • setWidth

        public void setWidth​(int width)
        Set chart width.
        Parameters:
        width -
      • getChart

        public org.jfree.chart.JFreeChart getChart()
        Return the chart.
        Returns:
        chart
      • getName

        public String getName()
        Return the name.
        Returns:
        name
      • getHeight

        public int getHeight()
        Return the height.
        Returns:
        height
      • getWidth

        public int getWidth()
        Return the width.
        Returns:
        width
      • exportIMG

        public void exportIMG​(String path,
                              String type)
                       throws IOException
        Export the image to formats JPG, PNG, SVG and EPS.
        Parameters:
        path -
        type -
        Throws:
        IOException