@Test public void testSaveGraphToPNG() throws Exception { System.out.println("saveGraphToPNG"); File file = File.createTempFile("test", ".png"); int w = 100; int h = 100; GraphPanelChart instance = new GraphPanelChart(); final ConcurrentSkipListMap<String, AbstractGraphRow> rows = new ConcurrentSkipListMap<String, AbstractGraphRow>(); instance.setRows(rows); instance.saveGraphToPNG(file, w, h); }
public void saveGraphToPNG(File file, int w, int h) throws IOException { log.info("Saving PNG to " + file.getAbsolutePath()); FileOutputStream fos = new FileOutputStream(file); ImageIO.write(getBufferedImage(w, h), "png", fos); fos.flush(); fos.close(); }
GraphPanelChart extends JComponent implements ClipboardOwner { public void saveGraphToPNG(File file, int w, int h) throws IOException { log.info("Saving PNG to " + file.getAbsolutePath()); FileOutputStream fos = new FileOutputStream(file); ImageIO.write(getBufferedImage(w, h), "png", fos); fos.flush(); fos.close(); } }
GraphPanelChart extends JComponent implements ClipboardOwner { public void saveGraphToPNG(File file, int w, int h) throws IOException { log.info("Saving PNG to " + file.getAbsolutePath()); FileOutputStream fos = new FileOutputStream(file); ImageIO.write(getBufferedImage(w, h), "png", fos); fos.flush(); fos.close(); } GraphPanelChart(boolean allowCsvExport, boolean haveGUI);  GraphPanelChart(boolean haveGUI);  GraphPanelChart(); }
GraphPanelChart extends JComponent implements ClipboardOwner { public void saveGraphToPNG(File file, int w, int h) throws IOException { log.info("Saving PNG to " + file.getAbsolutePath()); FileOutputStream fos = new FileOutputStream(file); ImageIO.write(getBufferedImage(w, h), "png", fos); fos.flush(); fos.close(); } GraphPanelChart(boolean allowCsvExport, boolean haveGUI);  GraphPanelChart(boolean haveGUI);  GraphPanelChart(); ChartSettings getChartSettings(); void setReSetColors(boolean reSetColors); void setDisplayPrecision(boolean displayPrecision); void setxAxisLabel(String xAxisLabel); void setYAxisLabel(String yAxisLabel); void setPrecisionLabel(int precision); void setIsPreview(boolean isPreview); void setTestStartTime(long time); boolean isModelContainsRow(AbstractGraphRow row); void setChartType(int type); void invalidateCache(); @Override void paintComponent(Graphics g); void setRows(AbstractMap<String, AbstractGraphRow> aRows); void setyAxisLabelRenderer(NumberRenderer yAxisLabelRenderer); void setxAxisLabelRenderer(NumberRenderer xAxisLabelRenderer); void setCurrentX(long currentX); void setForcedMinX(long minX); void clearErrorMessage(); void setErrorMessage(String msg); @Override void lostOwnership(Clipboard clipboard, Transferable contents); void setUseRelativeTime(boolean selected); void saveGraphToPNG(File file, int w, int h); void saveGraphToCSV(File file); }
GraphPanelChart extends JComponent implements ClipboardOwner { public void saveGraphToPNG(File file, int w, int h) throws IOException { log.info("Saving PNG to " + file.getAbsolutePath()); FileOutputStream fos = new FileOutputStream(file); ImageIO.write(getBufferedImage(w, h), "png", fos); fos.flush(); fos.close(); } GraphPanelChart(boolean allowCsvExport, boolean haveGUI);  GraphPanelChart(boolean haveGUI);  GraphPanelChart(); ChartSettings getChartSettings(); void setReSetColors(boolean reSetColors); void setDisplayPrecision(boolean displayPrecision); void setxAxisLabel(String xAxisLabel); void setYAxisLabel(String yAxisLabel); void setPrecisionLabel(int precision); void setIsPreview(boolean isPreview); void setTestStartTime(long time); boolean isModelContainsRow(AbstractGraphRow row); void setChartType(int type); void invalidateCache(); @Override void paintComponent(Graphics g); void setRows(AbstractMap<String, AbstractGraphRow> aRows); void setyAxisLabelRenderer(NumberRenderer yAxisLabelRenderer); void setxAxisLabelRenderer(NumberRenderer xAxisLabelRenderer); void setCurrentX(long currentX); void setForcedMinX(long minX); void clearErrorMessage(); void setErrorMessage(String msg); @Override void lostOwnership(Clipboard clipboard, Transferable contents); void setUseRelativeTime(boolean selected); void saveGraphToPNG(File file, int w, int h); void saveGraphToCSV(File file); static final int CHART_PERCENTAGE; static final int CHART_DEFAULT; }