Examples of ChartPanel


Examples of org.jfree.chart.ChartPanel

    private ChartPanel buildChart(XYDataset data) {
        JFreeChart chart = createChart(data);
        charts[numCharts]    = chart;
        legends[numCharts++] = chart.getLegend();
        ChartPanel panel = new ChartPanel(chart);
        return panel;
    }
View Full Code Here

Examples of org.jfree.chart.ChartPanel

    this.permitLogarithmic = permitLogarithmic;

    this.setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
    this.setBorder(BorderFactory.createEtchedBorder());

    chartPanel = new ChartPanel(chart);
    this.add(chartPanel);

    this.add(createControlPanel());

    configureChart();
View Full Code Here

Examples of org.jfree.chart.ChartPanel

                .getString("Chart.No_Data_Message"));

        // create a chart and a chart panel
        JFreeChart chart = new JFreeChart(plot);
        chart.removeLegend();
        ChartPanel chartPanel = new ChartPanel(chart);
        chartPanel.setInitialDelay(50);
        chartPanel.setDismissDelay(60000);
        chartPanel.setMinimumDrawHeight(40);
        chartPanel.setMinimumDrawWidth(40);
        chartPanel.setMaximumDrawHeight(3000);
        chartPanel.setMaximumDrawWidth(3000);
        chartPanel.setPreferredSize(new Dimension(300, gridY * 25));

        // add the chart to the dialog content pane
        GridBagConstraints c = new GridBagConstraints();
        c.gridy = gridY;
        c.gridwidth = 4;
View Full Code Here

Examples of org.jfree.chart.ChartPanel

        if (chart != null) {
            chart.getPlot().setNoDataMessage(resources.getString("No_Data_Message"));
            adjustPlot((P) chart.getPlot(), data, environment, parameters);
        }
       
        ChartPanel panel = getChartPanel(chart, data);
        panel.setInitialDelay(50);
        panel.setDismissDelay(60000);
       
        return panel;
    }
View Full Code Here

Examples of org.jfree.chart.ChartPanel

    protected D getAdjustedData(D data) { return data; }
   
    protected void adjustPlot(P plot, D data, Map environment, Map parameters) { }
   
    protected ChartPanel getChartPanel(JFreeChart chart, D data) {
        return new ChartPanel(chart);
    }
View Full Code Here

Examples of org.jfree.chart.ChartPanel

    public void writeChartAsHtml(Writer out, Map environment, Map parameters)
            throws IOException {
        Map htmlEnv = new HashMap(environment);
        htmlEnv.put(EVSnippetEnvironment.HTML_OUTPUT_KEY, Boolean.TRUE);
        D dataset = createDataset(htmlEnv, parameters);
        ChartPanel chartPanel = buildChart(dataset, htmlEnv, parameters);
        JFreeChart chart = chartPanel.getChart();
        if (chart != null) {
            new HtmlWriter(out, parameters, chart).writeChartHtml();
        }
    }
View Full Code Here

Examples of org.jfree.chart.ChartPanel

    this.maxRange = maxRange;

    this.setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
    this.setBorder(BorderFactory.createEtchedBorder());

    ChartPanel chartPanel = new ChartPanel(chart);
    this.add(chartPanel);

    configureChart();

    chartPanel.addChartMouseListener(this);
    model.addChangeListener(this);
  }
View Full Code Here

Examples of org.jfree.chart.ChartPanel

    this.showErrorBars = true;
    this.showCrossHairs = true;

    // Create a chart with legend, tooltips, and URLs showing
    // and add it to the panel.
    this.chartPanel = new ChartPanel(ChartFactory.createScatterPlot(title,
        domainTitle, rangeTitle, obsModel, PlotOrientation.VERTICAL,
        true, true, true));

    this.chartPanel.setPreferredSize(bounds);
View Full Code Here

Examples of org.jfree.chart.ChartPanel

   *            The desired width of the image.
   * @param height
   *            The desired height of the image.
   */
  public void saveCurrentPlotToFile(File file, int width, int height) {
    ChartPanel chart = analysisTypeMap.get(analysisType)
        .getObsAndMeanChartPane().getChartPanel();

    try {
      ChartUtilities
          .saveChartAsPNG(file, chart.getChart(), width, height);
    } catch (IOException e) {
      MessageBox.showErrorDialog("Save plot to file",
          "Cannot save plot to " + "'" + file.getPath() + "'.");
    }
  }
View Full Code Here

Examples of org.jfree.chart.ChartPanel

   * @param parent
   *            The parent component of the file dialog.
   */
  private void savePlotToFile(Component parent) {
    try {
      ChartPanel chartPanel = analysisTypeMap.get(analysisType)
          .getObsAndMeanChartPane().getChartPanel();

      if (imageSaveDialog.showDialog(parent)) {
        File path = imageSaveDialog.getSelectedFile();
        JFreeChart chart = chartPanel.getChart();
        int width = chartPanel.getWidth();
        int height = chartPanel.getHeight();

        ChartUtilities.saveChartAsPNG(path, chart, width, height);
      }
    } catch (IOException ex) {
      MessageBox.showErrorDialog(parent,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.