use of org.eclipse.tracecompass.internal.provisional.tmf.chart.ui.dialog.ChartMakerDialog in project tracecompass by tracecompass.
the class LamiReportViewTabPage method createNewCustomChart.
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
/**
* This method is used for creating a chart from the result table of the
* analyse. It uses the custom charts plugin to configure and create the
* chart.
*/
public void createNewCustomChart() {
Shell shell = this.getControl().getShell();
if (shell == null) {
return;
}
/* Open the chart maker dialog */
ChartMakerDialog dialog = new ChartMakerDialog(shell, fResultTable);
if (dialog.open() != Window.OK) {
return;
}
/* Make sure the data for making a chart was generated */
ChartData data = dialog.getDataSeries();
ChartModel model = dialog.getChartModel();
if (data == null || model == null) {
return;
}
/* Make a chart with the factory constructor */
LamiViewerControl viewerControl = new LamiViewerControl(fControl, data, model);
fCustomGraphViewerControls.add(viewerControl);
viewerControl.getToggleAction().run();
/* Signal the current selection to the newly created graph */
ChartSelectionUpdateSignal signal = new ChartSelectionUpdateSignal(LamiReportViewTabPage.this, fResultTable, fSelection);
TmfSignalManager.dispatchSignal(signal);
}
Aggregations