Search in sources :

Example 6 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 7 with ChartComposite

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

the class ReplicationMonitorViewPart method createPlotTableUnit.

/**
	 * Creates the plot table unit
	 * 
	 * @param composite Composite
	 */
private void createPlotTableUnit(Composite composite) {
    final JFreeChart chart = createChart();
    ChartComposite chartFrame = new ChartComposite(composite, SWT.NONE, chart, false, true, false, true, true);
    GridData gdFrame = new GridData(SWT.FILL, SWT.FILL, true, true);
    chartFrame.setLayoutData(gdFrame);
    chartFrame.setLayout(new FillLayout());
}
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)

Example 8 with ChartComposite

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

the class VolumeFolderInfoEditor method paintComp1.

/**
	 * paint the composite
	 *
	 */
public void paintComp1() {
    for (DbSpaceInfo dbSpaceInfo : dbSpaceList) {
        JFreeChart chart = createChart(createDataset(dbSpaceInfo), dbSpaceInfo);
        final ChartComposite frame = new ChartComposite(chartComp, SWT.NONE, chart, false, true, false, true, true);
        GridData gdDescGroup = new GridData();
        gdDescGroup.widthHint = 350;
        gdDescGroup.heightHint = 250;
        frame.setLayoutData(gdDescGroup);
    }
}
Also used : ChartComposite(org.jfree.experimental.chart.swt.ChartComposite) DbSpaceInfo(com.cubrid.cubridmanager.core.cubrid.dbspace.model.DbSpaceInfo) GridData(org.eclipse.swt.layout.GridData) JFreeChart(org.jfree.chart.JFreeChart)

Example 9 with ChartComposite

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

the class VolumeInformationEditor method paintComp.

/**
	 * paint composite
	 *
	 */
public void paintComp() {
    if (chartComp == null || chartComp.isDisposed()) {
        return;
    }
    Control[] controls = chartComp.getChildren();
    for (Control control : controls) {
        control.dispose();
    }
    JFreeChart chart = createChart(createDataset());
    final ChartComposite frame = new ChartComposite(chartComp, SWT.NONE, chart, false, true, false, true, true);
    GridData gdDescGroup = new GridData(GridData.FILL_HORIZONTAL);
    gdDescGroup.widthHint = 600;
    gdDescGroup.heightHint = 400;
    frame.setLayoutData(gdDescGroup);
}
Also used : ChartComposite(org.jfree.experimental.chart.swt.ChartComposite) Control(org.eclipse.swt.widgets.Control) GridData(org.eclipse.swt.layout.GridData) JFreeChart(org.jfree.chart.JFreeChart)

Example 10 with ChartComposite

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

the class DatabaseStatusEditor method paintOnePie.

/**
	 *
	 * Paint the pie chart
	 *
	 * @param dbSpaceInfo the DbSpace information
	 */
public void paintOnePie(DbSpaceInfo dbSpaceInfo) {
    JFreeChart chart = createChart(createDataset(dbSpaceInfo), dbSpaceInfo);
    final ChartComposite frame = new ChartComposite(chartComp, SWT.NONE, chart, false, true, false, true, true);
    GridData gdDescGroup = new GridData(GridData.FILL_HORIZONTAL);
    gdDescGroup.heightHint = 220;
    frame.setLayoutData(gdDescGroup);
}
Also used : ChartComposite(org.jfree.experimental.chart.swt.ChartComposite) GridData(org.eclipse.swt.layout.GridData) JFreeChart(org.jfree.chart.JFreeChart)

Aggregations

GridData (org.eclipse.swt.layout.GridData)10 ChartComposite (org.jfree.experimental.chart.swt.ChartComposite)10 FillLayout (org.eclipse.swt.layout.FillLayout)7 JFreeChart (org.jfree.chart.JFreeChart)5 Group (org.eclipse.swt.widgets.Group)4 GridLayout (org.eclipse.swt.layout.GridLayout)3 Color (java.awt.Color)2 ChartMouseEvent (org.jfree.chart.ChartMouseEvent)2 ChartMouseListener (org.jfree.chart.ChartMouseListener)2 CommonUITool.trimPaintColor (com.cubrid.common.ui.spi.util.CommonUITool.trimPaintColor)1 DbSpaceInfo (com.cubrid.cubridmanager.core.cubrid.dbspace.model.DbSpaceInfo)1 Font (java.awt.Font)1 GradientPaint (java.awt.GradientPaint)1 Paint (java.awt.Paint)1 Control (org.eclipse.swt.widgets.Control)1 XYPlot (org.jfree.chart.plot.XYPlot)1 TextTitle (org.jfree.chart.title.TextTitle)1