Package moa.gui.experimentertab
Class ImageChart
- java.lang.Object
-
- moa.gui.experimentertab.ImageChart
-
public class ImageChart extends Object
This class allows to handle the properties of the graph created by JFreeChart.- Author:
- Alberto
-
-
Constructor Summary
Constructors Constructor Description ImageChart()
Default constructor.ImageChart(String name, org.jfree.chart.JFreeChart chart)
Constructor.ImageChart(String name, org.jfree.chart.JFreeChart chart, int width, int height)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
exportIMG(String path, String type)
Export the image to formats JPG, PNG, SVG and EPS.org.jfree.chart.JFreeChart
getChart()
Return the chart.int
getHeight()
Return the height.String
getName()
Return the name.int
getWidth()
Return the width.void
setChart(org.jfree.chart.JFreeChart chart)
Set chart.void
setHeight(int height)
Set chart height.void
setName(String name)
Set the image name.void
setWidth(int width)
Set chart width.String
toString()
-
-
-
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
-
-