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);
}
}
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);
}
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);
}
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());
}
use of org.jfree.experimental.chart.swt.ChartComposite in project tdq-studio-se by Talend.
the class TOPChartService method addListenerToChartComp.
@Override
public void addListenerToChartComp(Object chartComposite, final String referenceLink, final String menuText) {
final ChartComposite chartComp = (ChartComposite) chartComposite;
final ChartMouseListener listener = new ChartMouseListener() {
@Override
public void chartMouseClicked(ChartMouseEvent event) {
if (event.getTrigger().getButton() == 1 && referenceLink != null) {
Menu menu = new Menu(chartComp.getShell(), SWT.POP_UP);
chartComp.setMenu(menu);
MenuItem item = new MenuItem(menu, SWT.PUSH);
item.setText(menuText);
item.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
ChartUtils.openReferenceLink(referenceLink);
}
});
menu.setVisible(true);
}
}
@Override
public void chartMouseMoved(ChartMouseEvent event) {
// no need to implement
}
};
chartComp.addChartMouseListener(listener);
chartComp.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
chartComp.removeChartMouseListener(listener);
chartComp.dispose();
}
});
}
Aggregations