Example usage for org.jfree.chart ChartFrame setBounds

List of usage examples for org.jfree.chart ChartFrame setBounds

Introduction

In this page you can find the example usage for org.jfree.chart ChartFrame setBounds.

Prototype

public void setBounds(int x, int y, int width, int height) 

Source Link

Document

The width or height values are automatically enlarged if either is less than the minimum size as specified by previous call to setMinimumSize .

Usage

From source file:control.JGeraGraficos.java

public void PrintGraficoSegundoExemplo() {
    String valorJava = getValorArquivoTxt("c:\\AppsPrjFinal\\ESTOUROJVMJAVA.txt");
    String valorJavaThRead = getValorArquivoTxt("c:\\AppsPrjFinal\\ESTOUROJVMJAVATHREAD.txt");
    String valorJOCL = getValorArquivoTxt("c:\\AppsPrjFinal\\ESTOUROJVMJOCL.txt");
    if (valorJava.isEmpty()) {
        JOptionPane.showMessageDialog(new JPanel(), "Processo Java No Executado", "Executar Processo",
                JOptionPane.INFORMATION_MESSAGE);
    } else if (valorJavaThRead.isEmpty()) {
        JOptionPane.showMessageDialog(new JPanel(), "Processo Java ThRead No Executado", "Executar Processo",
                JOptionPane.INFORMATION_MESSAGE);
    } else if (valorJOCL.isEmpty()) {
        JOptionPane.showMessageDialog(new JPanel(), "Processo JOCL No Executado", "Executar Processo",
                JOptionPane.INFORMATION_MESSAGE);
    } else {/*  www .j a v a  2s. co  m*/
        DefaultCategoryDataset dataset = new DefaultCategoryDataset();
        dataset.clear();
        dataset.addValue(Float.parseFloat(valorJava), "Java", "Java");
        dataset.addValue(Float.parseFloat(valorJavaThRead), "Java ThRead", "Java ThRead");
        dataset.addValue(Float.parseFloat(valorJOCL), "JOCL", "JOCL");
        JFreeChart chart = ChartFactory.createBarChart("Grafio de Performance", null, "Tempo(ms)", dataset,
                PlotOrientation.VERTICAL, true, true, true);
        ChartFrame frame = new ChartFrame("Grafio de Performance", chart);

        frame.setBounds(300, 78, 800, 620);
        frame.setVisible(true);
    }
}

From source file:org.activequant.tradesystem.system.integration.VolatilityCharterTradeSystem.java

private CandlestickChart chartIt(CandleSeries tempSeries) {
    // simply chart it. 
    CandlestickChart chart = new CandlestickChart();
    chart.setCandleSeries(tempSeries);/* w ww  .j  av  a 2  s .  com*/
    ChartFrame cf = new ChartFrame("" + tempSeries.getSeriesSpecification().toString(), chart.getChart());
    cf.setBounds(window * 400, 0, 400, 300);
    cf.setVisible(true);
    charts.add(cf);
    window++;
    return chart;
}