List of usage examples for org.jfree.ui RefineryUtilities centerFrameOnScreen
public static void centerFrameOnScreen(final Window frame)
From source file:Diagramas.PieChart_AWT.java
public static void main(String[] args) throws IOException { PieChart_AWT demo = new PieChart_AWT("Mobile Sales"); demo.setSize(560, 367);//from w w w . j av a2 s . co m RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); JFreeChart chart = createChart(createDataset()); OutputStream output = new FileOutputStream("img.png"); ChartUtilities.writeChartAsPNG(output, chart, 500, 600); output.close(); }
From source file:org.jfree.chart.demo.RingChartDemo1.java
public static void main(String args[]) { RingChartDemo1 ringchartdemo1 = new RingChartDemo1("Ring Chart Demo 1"); ringchartdemo1.pack();//from ww w . j av a 2s . c o m RefineryUtilities.centerFrameOnScreen(ringchartdemo1); ringchartdemo1.setVisible(true); }
From source file:org.jfree.chart.demo.JDBCXYChartDemo.java
public static void main(String args[]) { JDBCXYChartDemo jdbcxychartdemo = new JDBCXYChartDemo("JDBC XY Chart Demo"); jdbcxychartdemo.pack();//from w w w .j a va2 s . c om RefineryUtilities.centerFrameOnScreen(jdbcxychartdemo); jdbcxychartdemo.setVisible(true); }
From source file:com.basingwerk.utilisation.Utilisation.java
public static void main(final String[] args) { String dataFile = null;/* w w w .j av a2 s .c o m*/ Options options = new Options(); Option helpOption = new Option("h", "help", false, "print this help"); Option serverURLOption = new Option("l", "logfile", true, "log file"); options.addOption(helpOption); options.addOption(serverURLOption); CommandLineParser argsParser = new PosixParser(); try { CommandLine commandLine = argsParser.parse(options, args); if (commandLine.hasOption(helpOption.getOpt())) { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("Usage grapher", options); System.exit(0); } dataFile = commandLine.getOptionValue(serverURLOption.getOpt()); String[] otherArgs = commandLine.getArgs(); if (dataFile == null || otherArgs.length > 1) { System.out.println("Please specify a logfile"); HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("Usage grapher", options); System.exit(0); } } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { } final UsagePlotter demo = new UsagePlotter("Usage", new File(dataFile)); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
From source file:chart.BarChart_AWT.java
public static void main(String[] args) { BarChart_AWT chart = new BarChart_AWT("Car Usage Statistics", "Which car do you like?"); chart.pack();// w ww .ja v a 2s . c o m RefineryUtilities.centerFrameOnScreen(chart); chart.setVisible(true); }
From source file:DAO.graphics.StatGRH.java
public static void main(String[] args) { StatGRH dem = new StatGRH("Ressouces humaines"); dem.setSize(560, 367);/*from w w w . j av a 2 s . co m*/ RefineryUtilities.centerFrameOnScreen(dem); dem.setVisible(true); }
From source file:org.jfree.chart.demo.MouseListenerDemo1.java
public static void main(String args[]) { MouseListenerDemo1 mouselistenerdemo1 = new MouseListenerDemo1("Mouse Listener Demo"); mouselistenerdemo1.pack();//ww w.ja v a2 s. c o m RefineryUtilities.centerFrameOnScreen(mouselistenerdemo1); mouselistenerdemo1.setVisible(true); }
From source file:org.jfree.chart.demo.LogAxisDemo1.java
public static void main(String args[]) { LogAxisDemo1 logaxisdemo1 = new LogAxisDemo1("Log Axis Demo 1"); logaxisdemo1.pack();/*from ww w. j ava2 s. c o m*/ RefineryUtilities.centerFrameOnScreen(logaxisdemo1); logaxisdemo1.setVisible(true); }
From source file:views.SentimentGraph.java
public static void main(String[] args) throws ParseException { SentimentGraph chart = new SentimentGraph("Sentiment Chart", "Sentiment"); chart.pack();/*from w ww .j a va 2 s .co m*/ RefineryUtilities.centerFrameOnScreen(chart); chart.setVisible(true); JScrollPane pane = new JScrollPane(); }
From source file:views.StockGraph.java
public static void main(String[] args) { StockGraph chart = new StockGraph("Price Chart", "Historical prices for :Apple"); chart.pack();/*from w w w . j a va 2 s . com*/ RefineryUtilities.centerFrameOnScreen(chart); chart.setVisible(true); JScrollPane pane = new JScrollPane(); // pane.add(chart); // pane.setVisible(true); }