Search in sources :

Example 1 with TemplateGraphLabelProvider

use of org.netxms.ui.eclipse.perfview.views.helpers.TemplateGraphLabelProvider in project netxms by netxms.

the class TemplateGraphView method createPartControl.

/* (non-Javadoc)
	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
	 */
@Override
public void createPartControl(Composite parent) {
    final String[] names = { "Graph name", "DCI names", "DCI descriptions" };
    final int[] widths = { 150, 400, 400 };
    viewer = new SortableTableViewer(parent, names, widths, 0, SWT.DOWN, SWT.FULL_SELECTION | SWT.MULTI);
    viewer.setContentProvider(new ArrayContentProvider());
    viewer.setLabelProvider(new TemplateGraphLabelProvider());
    viewer.addDoubleClickListener(new IDoubleClickListener() {

        @Override
        public void doubleClick(DoubleClickEvent event) {
            actionEdit.run();
        }
    });
    createActions();
    contributeToActionBars();
    createPopupMenu();
    refreshData();
    session.addListener(this);
}
Also used : IDoubleClickListener(org.eclipse.jface.viewers.IDoubleClickListener) ArrayContentProvider(org.eclipse.jface.viewers.ArrayContentProvider) SortableTableViewer(org.netxms.ui.eclipse.widgets.SortableTableViewer) TemplateGraphLabelProvider(org.netxms.ui.eclipse.perfview.views.helpers.TemplateGraphLabelProvider) DoubleClickEvent(org.eclipse.jface.viewers.DoubleClickEvent)

Aggregations

ArrayContentProvider (org.eclipse.jface.viewers.ArrayContentProvider)1 DoubleClickEvent (org.eclipse.jface.viewers.DoubleClickEvent)1 IDoubleClickListener (org.eclipse.jface.viewers.IDoubleClickListener)1 TemplateGraphLabelProvider (org.netxms.ui.eclipse.perfview.views.helpers.TemplateGraphLabelProvider)1 SortableTableViewer (org.netxms.ui.eclipse.widgets.SortableTableViewer)1