use of org.eclipse.linuxtools.systemtap.graphing.ui.widgets.GraphComposite in project linuxtools by eclipse.
the class GraphDisplaySet method addGraph.
public void addGraph(final GraphData gd) {
CTabItem item = new CTabItem(folder, SWT.CLOSE);
item.setText(// $NON-NLS-1$
MessageFormat.format(// $NON-NLS-1$
Localization.getString("GraphDisplaySet.GraphTabTitle"), gd.title, GraphFactory.getGraphName(gd.graphID)));
final GraphComposite gc = new GraphComposite(folder, SWT.FILL, gd, dataSet);
gc.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
gc.addCheckOption(Messages.GraphCompositeTitle, SelectionListener.widgetSelectedAdapter(e -> {
gc.setTitleVisible(((Button) e.getSource()).getSelection());
}));
gc.addCheckOption(Messages.GraphCompositeLegend, SelectionListener.widgetSelectedAdapter(e -> {
gc.setLegendVisible(((Button) e.getSource()).getSelection());
}));
folder.setSelection(item);
AbstractChartBuilder g = gc.getCanvas();
item.setControl(gc);
if (null != g) {
if (null != updater) {
updater.addUpdateListener(g);
}
builders.add(g);
}
}
Aggregations