List of usage examples for org.jfree.ui RefineryUtilities centerFrameOnScreen
public static void centerFrameOnScreen(final Window frame)
From source file:com.github.brandtg.stl.StlPlotter.java
static void plotOnScreen(final StlResult stlResult, final String title) { final ResultsPlot plot = new ResultsPlot(stlResult, title, Minute.class); plot.pack();//w w w. j a v a 2s. com RefineryUtilities.centerFrameOnScreen(plot); plot.setVisible(true); }
From source file:org.jgrasstools.gears.utils.chart.PlotFrame.java
public void plot() { JFreeChart chart = ichart.getChart(); ChartPanel chartPanel = new ChartPanel(chart, true); chartPanel.setPreferredSize(new Dimension(chartWidth, chartHeight)); setContentPane(chartPanel);/*from w w w. j a v a2 s . c o m*/ pack(); RefineryUtilities.centerFrameOnScreen(this); setVisible(true); }
From source file:org.jfree.chart.demo.PerformanceTest1.java
public static void main2(String as[]) { PerformanceTest1 performancetest1 = new PerformanceTest1("Performance Test 1"); performancetest1.pack();//from w w w.ja v a 2 s .co m RefineryUtilities.centerFrameOnScreen(performancetest1); performancetest1.setVisible(true); TimeSeries timeseries = new TimeSeries("Test"); timeseries.setMaximumItemAge(200L); do { Millisecond millisecond = new Millisecond(); long l = System.currentTimeMillis(); for (int i = 0; i < 200; i++) { millisecond = (Millisecond) millisecond.next(); timeseries.addOrUpdate(millisecond, 1.0D); } long l1 = System.currentTimeMillis(); performancetest1.addObservation(l1 - l); } while (true); }
From source file:org.sonar.api.charts.AbstractChartTest.java
protected static void displayTestPanel(BufferedImage image) { ApplicationFrame frame = new ApplicationFrame("testframe"); BufferedPanel imgPanel = new BufferedPanel(image); frame.setContentPane(imgPanel);/*from ww w . j a va 2 s . com*/ frame.pack(); RefineryUtilities.centerFrameOnScreen(frame); frame.setVisible(true); }
From source file:spminiproject.lab2.chart.Histogram2.java
public static void generateChart(String title, double vector[], int intervals, String labelx, String labely) { Histogram2 histo = new Histogram2(title, vector, intervals, labelx, labely); histo.pack();/*from w ww . j a v a 2 s. c o m*/ RefineryUtilities.centerFrameOnScreen(histo); histo.setVisible(true); }
From source file:com.github.ruananswer.stl.StlPlotter.java
static void plotOnScreen(final STLResult stlResult, double[] series, double[] times, final String title) { final ResultsPlot plot = new ResultsPlot(stlResult, series, times, title, Minute.class); plot.pack();/*from w w w . j a v a 2s. c om*/ RefineryUtilities.centerFrameOnScreen(plot); plot.setVisible(true); }
From source file:playground.dgrether.analysis.charts.utils.DgChartFrame.java
public DgChartFrame(String title, JFreeChart chart) { super(title); ChartPanel chartPanel = new ChartPanel(chart, false); chartPanel.setPreferredSize(new Dimension(1024, 768)); setContentPane(chartPanel);/* ww w . j av a 2 s . co m*/ this.pack(); RefineryUtilities.centerFrameOnScreen(this); this.setVisible(true); }
From source file:unalcol.termites.boxplots.SucessfulRatesGlobal.java
/** * * @param args// w w w . jav a2s . c o m */ public static void main(String args[]) { SucessfulRatesGlobal itemlabeldemo2 = new SucessfulRatesGlobal("Sucess Rates"); itemlabeldemo2.pack(); RefineryUtilities.centerFrameOnScreen(itemlabeldemo2); itemlabeldemo2.setVisible(true); }
From source file:org.jfree.chart.demo.SurveyResultsDemo.java
/** * Starting point for the demonstration application. * * @param args ignored./* w w w . ja va2s.com*/ */ public static void main(final String[] args) { final SurveyResultsDemo demo = new SurveyResultsDemo("Survey Results Demo"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
From source file:Graphics.Barchart.java
public void showGraphic() { this.setSize(largura, altura); RefineryUtilities.centerFrameOnScreen(this); this.setVisible(true); }