List of usage examples for org.jfree.ui RefineryUtilities centerFrameOnScreen
public static void centerFrameOnScreen(final Window frame)
From source file:org.marekasf.troughput.XYHistogramChart.java
public static void display(final AdaptiveHistogram h, final String title) { final XYHistogramChart demo = new XYHistogramChart(h, title); demo.pack();/*from w ww.j a v a2 s.co m*/ RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); final Semaphore semaphore = new Semaphore(0); demo.addWindowListener(new WindowAdapter() { @Override public void windowClosing(final WindowEvent we) { semaphore.release(); } }); try { semaphore.acquire(); } catch (final InterruptedException e) { // } }
From source file:de.citec.csra.allocation.vis.MovingChart.java
/** * Starting point for the dynamic graph application. * * @param args ignored./*from ww w . j ava 2 s . c o m*/ */ public static void main(final String[] args) throws InterruptedException, RSBException { int past = DEFAULT_PAST; int future = DEFAULT_FUTURE; if (args.length > 0) { if (args.length == 2) { try { past = Integer.valueOf(args[0]); future = Integer.valueOf(args[1]); } catch (IllegalArgumentException ex) { System.err.println( "Could not read integer values for PAST or FUTURE.\nusage: csra-allocation-viewer [PAST FUTURE]"); System.exit(1); } } else { System.err.println("usage: csra-allocation-viewer [PAST FUTURE]"); System.exit(1); } } final MovingChart demo = new MovingChart("Resource Allocation Chart", past, future); Listener l = Factory.getInstance().createListener(AllocationServer.getScope()); l.addHandler(demo, true); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); l.activate(); demo.setVisible(true); }
From source file:pl.poid.bzdp.zadanieObrazy.ImageHistogram.java
public static void showHistogram(String title, XYSeriesCollection dataset, Color c) { final ImageHistogram histogram = new ImageHistogram(title, dataset, c); histogram.setDefaultCloseOperation(DISPOSE_ON_CLOSE); histogram.pack();/* www .j a va2 s. co m*/ RefineryUtilities.centerFrameOnScreen(histogram); histogram.setVisible(true); histogram.setDefaultCloseOperation(DISPOSE_ON_CLOSE); }
From source file:com.mxgraph.examples.swing.chart.BarChartDemo1.java
/** * Starting point for the demonstration application. * * @param args ignored./*from w ww . j a va2 s .com*/ */ public static void main(String[] args) { BarChartDemo1 demo = new BarChartDemo1("Bar Chart Demo 1"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
From source file:org.jfree.chart.demo.JFreeChartDemo.java
/** * The starting point for the demonstration application. * * @param args ignored.//w w w .ja va2 s .c om */ public static void main(final String[] args) { final JFreeChartDemo f = new JFreeChartDemo(); f.pack(); RefineryUtilities.centerFrameOnScreen(f); f.setVisible(true); }
From source file:nodeconfig.SuspectLine.java
public static void putLine() { SuspectLine chart = new SuspectLine("Fuzzy Decision Making", "Degree Of Suspect"); chart.pack();/* w w w. j ava 2s . co m*/ RefineryUtilities.centerFrameOnScreen(chart); chart.setVisible(true); }
From source file:nodeconfig.FinalSuspectLine.java
public static void putLine(ArrayList<String> suspect) { suspectline = suspect;//from w ww. ja va2 s .c o m FinalSuspectLine chart = new FinalSuspectLine("Fuzzy Decision Making", "Degree Of Suspect"); chart.pack(); RefineryUtilities.centerFrameOnScreen(chart); chart.setVisible(true); }
From source file:graph.GraphCreater.java
public static void createGraph(ArrayList<String> resultList, ArrayList<String> dateList, String testType) { GraphCreater chart = new GraphCreater("Sugar levels Vs testing dates", "last 10 " + testType + " level progress", resultList, dateList); chart.pack();//from ww w .ja va 2 s .c o m RefineryUtilities.centerFrameOnScreen(chart); chart.setVisible(true); chart.setDefaultCloseOperation(DISPOSE_ON_CLOSE); }
From source file:nodeconfig.BarChart_fuzzy.java
public static void putBar() { BarChart_fuzzy chart = new BarChart_fuzzy("Fuzzification", "Fuzzy Values"); chart.pack();// w w w .j a v a 2 s. c o m RefineryUtilities.centerFrameOnScreen(chart); chart.setVisible(true); }
From source file:com.java.reports.ReportGenerator.java
public void showReport(String _name, int width, int height) { JFrame jFrame = new JFrame(_name); if (chart == null) { System.out.println("Please generate chart.."); }/*from w ww .j av a 2 s . co m*/ jFrame.setContentPane(new ChartPanel(chart)); jFrame.setSize(width, height); RefineryUtilities.centerFrameOnScreen(jFrame); jFrame.setVisible(true); }