Search in sources :

Example 11 with ChartComposite

use of org.jfree.experimental.chart.swt.ChartComposite in project SIMVA-SoS by SESoS.

the class SWTBarChartDemo1 method main.

/**
 * Starting point for the demonstration application.
 *
 * @param args  ignored.
 */
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();
    }
}
Also used : ChartComposite(org.jfree.experimental.chart.swt.ChartComposite) Shell(org.eclipse.swt.widgets.Shell) FillLayout(org.eclipse.swt.layout.FillLayout) JFreeChart(org.jfree.chart.JFreeChart) Display(org.eclipse.swt.widgets.Display)

Example 12 with ChartComposite

use of org.jfree.experimental.chart.swt.ChartComposite in project SIMVA-SoS by SESoS.

the class SWTMultipleAxisDemo1 method main.

/**
 * Starting point for the demonstration application.
 *
 * @param args  ignored.
 */
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();
    }
}
Also used : ChartComposite(org.jfree.experimental.chart.swt.ChartComposite) Shell(org.eclipse.swt.widgets.Shell) FillLayout(org.eclipse.swt.layout.FillLayout) JFreeChart(org.jfree.chart.JFreeChart) Display(org.eclipse.swt.widgets.Display)

Example 13 with ChartComposite

use of org.jfree.experimental.chart.swt.ChartComposite in project SIMVA-SoS by SESoS.

the class SWTPieChartDemo1 method main.

/**
 * Starting point for the demonstration application.
 *
 * @param args  ignored.
 */
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();
    }
}
Also used : ChartComposite(org.jfree.experimental.chart.swt.ChartComposite) Shell(org.eclipse.swt.widgets.Shell) FillLayout(org.eclipse.swt.layout.FillLayout) JFreeChart(org.jfree.chart.JFreeChart) Display(org.eclipse.swt.widgets.Display)

Example 14 with ChartComposite

use of org.jfree.experimental.chart.swt.ChartComposite in project cubrid-manager by CUBRID.

the class WhiteChart method loadChart.

public void loadChart() {
    ChartComposite frame;
    if (groupName != null) {
        final Group chartGroup = new Group(composite, SWT.RESIZE);
        chartGroup.setText(groupName);
        GridLayout chartGroupLayout = new GridLayout();
        chartGroupLayout.marginHeight = 6;
        chartGroupLayout.marginWidth = 6;
        chartGroup.setLayout(chartGroupLayout);
        chartGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
        frame = new ChartComposite(chartGroup, SWT.NONE, createChart(), false, false, false, false, false);
    } else {
        frame = new ChartComposite(composite, SWT.NONE, createChart(), false, false, false, false, false);
    }
    GridData gdFrame = new GridData(SWT.FILL, SWT.FILL, true, true);
    frame.setLayoutData(gdFrame);
    frame.setLayout(new FillLayout());
    frame.setDomainZoomable(false);
    frame.setRangeZoomable(false);
    frame.addChartMouseListener(new ChartMouseListener() {

        public void chartMouseMoved(ChartMouseEvent event) {
        }

        public void chartMouseClicked(ChartMouseEvent event) {
            if (event.getTrigger().getButton() == 1) {
                editor.openEditStatisticItemDialog();
            }
        }
    });
}
Also used : ChartComposite(org.jfree.experimental.chart.swt.ChartComposite) Group(org.eclipse.swt.widgets.Group) GridLayout(org.eclipse.swt.layout.GridLayout) GridData(org.eclipse.swt.layout.GridData) FillLayout(org.eclipse.swt.layout.FillLayout) ChartMouseEvent(org.jfree.chart.ChartMouseEvent) ChartMouseListener(org.jfree.chart.ChartMouseListener)

Example 15 with ChartComposite

use of org.jfree.experimental.chart.swt.ChartComposite in project cubrid-manager by CUBRID.

the class StatusMonitorViewPart method createPlotTableUnit.

/**
	 * Creates the plot table unit
	 * 
	 * @param composite The composite to contains plot table unit
	 * @param unitNumber the number of unit
	 */
private void createPlotTableUnit(Composite composite, int unitNumber) {
    final JFreeChart chart = createChart(unitNumber);
    ChartComposite frame = new ChartComposite(composite, SWT.NONE, chart, false, true, false, true, true);
    GridData gdFrame = new GridData(SWT.FILL, SWT.FILL, true, true);
    frame.setLayoutData(gdFrame);
    frame.setLayout(new FillLayout());
    createValueDisplay(composite, unitNumber);
}
Also used : ChartComposite(org.jfree.experimental.chart.swt.ChartComposite) GridData(org.eclipse.swt.layout.GridData) FillLayout(org.eclipse.swt.layout.FillLayout) JFreeChart(org.jfree.chart.JFreeChart)

Aggregations

ChartComposite (org.jfree.experimental.chart.swt.ChartComposite)25 GridData (org.eclipse.swt.layout.GridData)17 FillLayout (org.eclipse.swt.layout.FillLayout)11 JFreeChart (org.jfree.chart.JFreeChart)9 TalendChartComposite (org.talend.dataprofiler.chart.util.TalendChartComposite)8 ChartMouseEvent (org.jfree.chart.ChartMouseEvent)7 ChartMouseListener (org.jfree.chart.ChartMouseListener)7 Display (org.eclipse.swt.widgets.Display)4 Group (org.eclipse.swt.widgets.Group)4 Shell (org.eclipse.swt.widgets.Shell)4 DisposeEvent (org.eclipse.swt.events.DisposeEvent)3 DisposeListener (org.eclipse.swt.events.DisposeListener)3 GridLayout (org.eclipse.swt.layout.GridLayout)3 Menu (org.eclipse.swt.widgets.Menu)3 CategoryItemEntity (org.jfree.chart.entity.CategoryItemEntity)3 ChartEntity (org.jfree.chart.entity.ChartEntity)3 Color (java.awt.Color)2 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)2 SelectionEvent (org.eclipse.swt.events.SelectionEvent)2 MenuItem (org.eclipse.swt.widgets.MenuItem)2