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 properties, boolean save,
        boolean print, boolean zoom, boolean tooltips) 

Source Link

Document

Constructs a JFreeChart panel.

Usage

From source file:com.bdaum.zoom.report.internal.wizards.ReportComponent.java

public ReportComponent(Composite parent, int style, int preview) {
    super(parent, style);
    this.preview = preview;
    setLayout(new FillLayout());
    stack = new Composite(this, SWT.NONE);
    stackLayout = new StackLayout();
    stack.setLayout(stackLayout);/* w  w  w .  j  av  a  2 s  .co m*/

    chartComposite = new ChartComposite(stack, SWT.NONE, null, preview == Integer.MAX_VALUE,
            preview == Integer.MAX_VALUE, preview == Integer.MAX_VALUE, preview == Integer.MAX_VALUE,
            preview == Integer.MAX_VALUE);
    chartComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

    pendingComp = new Composite(stack, SWT.NONE);
    pendingComp.setLayout(new GridLayout(1, false));
    Label label = new Label(pendingComp, SWT.NONE);
    label.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true));
    label.setText(Messages.ReportPage_pending);
    if (preview == Integer.MAX_VALUE) {
        progressBar = new ProgressIndicator(pendingComp, SWT.BORDER);
        GridData data = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
        data.heightHint = PROGRESS_THICKNESS;
        progressBar.setLayoutData(data);
    }
    stackLayout.topControl = pendingComp;
}