Example usage for org.jfree.chart.swt ChartComposite ChartComposite

List of usage examples for org.jfree.chart.swt ChartComposite ChartComposite

Introduction

In this page you can find the example usage for org.jfree.chart.swt ChartComposite ChartComposite.

Prototype

public ChartComposite(Composite comp, int style, JFreeChart chart, boolean useBuffer) 

Source Link

Document

Constructs a panel containing a chart.

Usage

From source file:org.jfree.chart.swt.demo.SWTPieChartDemo1.java

/**
 * Starting point for the demonstration application.
 *
 * @param args  ignored.//from   w  ww.j av a2s.  co  m
 */
public static void main(String[] args) {
    JFreeChart chart = createChart(createDataset());
    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setSize(600, 400);
    shell.setLayout(new FillLayout());
    shell.setText("Test for jfreechart running with SWT");
    final ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true);
    //frame.setDisplayToolTips(false);
    frame.pack();
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
}

From source file:org.jfree.chart.swt.demo.SWTBarChartDemo1.java

/**
 * Starting point for the demonstration application.
 *
 * @param args  ignored./* www .  j  a  v  a2 s .  c  o  m*/
 */
public static void main(String[] args) {
    JFreeChart chart = createChart(createDataset());
    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setSize(600, 300);
    shell.setLayout(new FillLayout());
    shell.setText("Test for jfreechart running with SWT");
    ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true);
    frame.pack();
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
}

From source file:org.jfree.chart.swt.demo.SWTTimeSeriesDemo1.java

/**
 * Starting point for the demonstration application.
 *
 * @param args  ignored.//from w  w  w .j  a v  a 2  s.com
 */
public static void main(String[] args) {
    final JFreeChart chart = createChart(createDataset());
    final Display display = new Display();
    Shell shell = new Shell(display);
    shell.setSize(600, 300);
    shell.setLayout(new FillLayout());
    shell.setText("Time series demo for jfreechart running with SWT");
    ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true);
    frame.setDisplayToolTips(true);
    frame.setHorizontalAxisTrace(false);
    frame.setVerticalAxisTrace(false);
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
}

From source file:org.jfree.chart.swt.demo.SWTMultipleAxisDemo1.java

/**
 * Starting point for the demonstration application.
 *
 * @param args  ignored.//from  w  w w . j ava 2  s . c om
 */
public static void main(String[] args) {
    final JFreeChart chart = createChart();
    final Display display = new Display();
    Shell shell = new Shell(display);
    shell.setSize(600, 300);
    shell.setLayout(new FillLayout());
    shell.setText("Test for jfreechart running with SWT");
    ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true);
    frame.setDisplayToolTips(false);
    frame.setHorizontalAxisTrace(true);
    frame.setVerticalAxisTrace(true);
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
            display.sleep();
    }
}