use of org.eclipse.jface.action.IMenuListener in project netxms by netxms.
the class ReportExecutionForm method createResultsContextMenu.
/**
* Create results context menu
*/
private void createResultsContextMenu() {
MenuManager menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager mgr) {
fillResultsContextMenu(mgr);
}
});
// Create menu.
Menu menu = menuMgr.createContextMenu(resultList.getControl());
resultList.getControl().setMenu(menu);
}
use of org.eclipse.jface.action.IMenuListener in project netxms by netxms.
the class SoftwareInventoryView method createPopupMenu.
/**
* Create pop-up menu
*/
private void createPopupMenu() {
// Create menu manager.
MenuManager menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager mgr) {
fillContextMenu(mgr);
}
});
inventoryWidget.setViewerMenu(menuMgr);
}
use of org.eclipse.jface.action.IMenuListener in project netxms by netxms.
the class TableToolResults method createPopupMenu.
/**
* Create pop-up menu
*/
private void createPopupMenu() {
// Create menu manager.
MenuManager menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager mgr) {
fillContextMenu(mgr);
}
});
// Create menu.
Menu menu = menuMgr.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
}
use of org.eclipse.jface.action.IMenuListener in project netxms by netxms.
the class AbstractCommandResults method createPopupMenu.
/**
* Create pop-up menu
*/
private void createPopupMenu() {
// Create menu manager
MenuManager menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager mgr) {
fillContextMenu(mgr);
}
});
// Create menu
Menu menu = menuMgr.createContextMenu(console);
console.setMenu(menu);
}
use of org.eclipse.jface.action.IMenuListener in project netxms by netxms.
the class ReportNavigator method createPopupMenu.
/**
* Create popup menu for report list
*/
private void createPopupMenu() {
// Create menu manager.
MenuManager manager = new MenuManager();
manager.setRemoveAllWhenShown(true);
manager.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager mgr) {
fillContextMenu(mgr);
}
});
// Create menu.
Menu menu = manager.createContextMenu(reportTree.getTree());
reportTree.getTree().setMenu(menu);
// Register menu for extension.
getSite().registerContextMenu(manager, reportTree);
}
Aggregations