public void showIt(boolean centered) { if(centered) { RefineryUtilities.centerFrameOnScreen(this); } showIt(); }
public void showIt(boolean centered) { if(centered) { RefineryUtilities.centerFrameOnScreen(this); } showIt(); }
public static void main(String[] args) { List<Double> costTrends = Arrays.asList(1.0, 1.2, 1.3, 1.34, 1.23, 1.11, 1.5); CostTrend chart = new CostTrend(costTrends, "cost vs generation"); RefineryUtilities.centerFrameOnScreen( chart ); chart.showIt(true); } }
public void showWindow() { pack(); RefineryUtilities.centerFrameOnScreen(this); setVisible(true); }
public void showWindow() { pack(); RefineryUtilities.centerFrameOnScreen(this); setVisible(true); }
/** * The starting point for the demo. * * @param args ignored. */ public static void main(final String[] args) { final DrawStringDemo demo = new DrawStringDemo("DrawString Demo"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
/** * Starting point for the demonstration application. * * @param args ignored. */ public static void main(String[] args) { DateChooserPanelDemo demo = new DateChooserPanelDemo( "DateChooserPanel Demo"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
/** * The starting point for the demo. * * @param args ignored. */ public static void main(final String[] args) { final TextBlockDemo demo = new TextBlockDemo("TextBlock Demo"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
/** * Starting point for the demonstration application. * * @param args ignored. */ public static void main(String[] args) { XYTitleAnnotationDemo1 demo = new XYTitleAnnotationDemo1( "XYTitleAnnotationDemo1"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
/** * Starting point for the demonstration application. * * @param args ignored. */ public static void main(String[] args) { BarChartDemo1 demo = new BarChartDemo1("Bar Chart Demo 1"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
/** * Starting point for the demonstration application. * * @param args ignored. */ public static void main(String[] args) { TimeSeriesChartDemo1 demo = new TimeSeriesChartDemo1( "Time Series Chart Demo 1"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
/** * Starting point for the demonstration application. * * @param args ignored. */ public static void main(String[] args) { TimeCategoryPlot demo = new TimeCategoryPlot( "Time Series Chart Demo 1" ); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
public void saveAndDisplayPlot(String fileName) { createChartFromData(); File filename_png = new File(fileName); //saving try { ChartUtilities.saveChartAsPNG(filename_png, chart, graphSizeInXDimension, graphSizeInYDimension); } catch (IOException ex) { throw new RuntimeException("Error saving a file",ex); } //display final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(graphSizeInXDimension, graphSizeInYDimension)); setContentPane(chartPanel); this.pack(); RefineryUtilities.centerFrameOnScreen(this); this.setVisible(true); }
public void displayPlot() { createChartFromData(); final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(graphSizeInXDimension, graphSizeInYDimension)); setContentPane(chartPanel); this.pack(); RefineryUtilities.centerFrameOnScreen(this); this.setVisible(true); }
/** * Displays a chart in a frame. * @param chart the chart to be displayed */ private static void displayChart(JFreeChart chart) { // Chart panel ChartPanel panel = new ChartPanel(chart); panel.setFillZoomRectangle(true); panel.setMouseWheelEnabled(true); panel.setPreferredSize(new java.awt.Dimension(500, 270)); // Application frame ApplicationFrame frame = new ApplicationFrame("Ta4j example - Indicators to chart"); frame.setContentPane(panel); frame.pack(); RefineryUtilities.centerFrameOnScreen(frame); frame.setVisible(true); }
/** * Displays a chart in a frame. * @param chart the chart to be displayed */ private static void displayChart(JFreeChart chart) { // Chart panel ChartPanel panel = new ChartPanel(chart); panel.setFillZoomRectangle(true); panel.setMouseWheelEnabled(true); panel.setPreferredSize(new Dimension(1024, 400)); // Application frame ApplicationFrame frame = new ApplicationFrame("Ta4j example - Buy and sell signals to chart"); frame.setContentPane(panel); frame.pack(); RefineryUtilities.centerFrameOnScreen(frame); frame.setVisible(true); }
/** * Displays a chart in a frame. * @param chart the chart to be displayed */ private static void displayChart(JFreeChart chart) { // Chart panel ChartPanel panel = new ChartPanel(chart); panel.setFillZoomRectangle(true); panel.setMouseWheelEnabled(true); panel.setPreferredSize(new Dimension(1024, 400)); // Application frame ApplicationFrame frame = new ApplicationFrame("Ta4j example - Cash flow to chart"); frame.setContentPane(panel); frame.pack(); RefineryUtilities.centerFrameOnScreen(frame); frame.setVisible(true); }
/** * Displays a chart in a frame. * @param chart the chart to be displayed */ private static void displayChart(JFreeChart chart) { // Chart panel ChartPanel panel = new ChartPanel(chart); panel.setFillZoomRectangle(true); panel.setMouseWheelEnabled(true); panel.setPreferredSize(new java.awt.Dimension(740, 300)); // Application frame ApplicationFrame frame = new ApplicationFrame("Ta4j example - Candlestick chart"); frame.setContentPane(panel); frame.pack(); RefineryUtilities.centerFrameOnScreen(frame); frame.setVisible(true); }
/** * Displays a chart in a frame. * * @param chart * the chart to be displayed */ private static void displayChart(JFreeChart chart) { // Chart panel ChartPanel panel = new ChartPanel(chart); panel.setFillZoomRectangle(true); panel.setMouseWheelEnabled(true); panel.setPreferredSize(new Dimension(1024, 400)); // Application frame ApplicationFrame frame = new ApplicationFrame("Ta4j example - Buy and sell signals to chart"); frame.setContentPane(panel); frame.pack(); RefineryUtilities.centerFrameOnScreen(frame); frame.setVisible(true); }
private static void display(JFreeChart chart, String title) { ApplicationFrame frame = new ApplicationFrame(title); final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); frame.setContentPane(chartPanel); frame.pack(); RefineryUtilities.centerFrameOnScreen(frame); frame.setVisible(true); }