use of org.eclipse.jface.action.IMenuListener in project netxms by netxms.
the class HistoricalGraphView 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((Control) chart);
((Control) chart).setMenu(menu);
for (Control ch : ((Composite) chart).getChildren()) {
ch.setMenu(menu);
}
}
use of org.eclipse.jface.action.IMenuListener in project netxms by netxms.
the class MibExplorer method createTreePopupMenu.
/**
* Create popup menu for MIB tree
*/
private void createTreePopupMenu() {
// Create menu manager
MenuManager menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager mgr) {
fillTreeContextMenu(mgr);
}
});
// Create menu
Menu menu = menuMgr.createContextMenu(mibBrowser.getTreeControl());
mibBrowser.getTreeControl().setMenu(menu);
// Register menu for extension.
getSite().registerContextMenu(menuMgr, mibBrowser.getTreeViewer());
}
use of org.eclipse.jface.action.IMenuListener in project netxms by netxms.
the class MibExplorer method createResultsPopupMenu.
/**
* Create popup menu for results table
*/
private void createResultsPopupMenu() {
// Create menu manager
MenuManager menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager mgr) {
fillResultsContextMenu(mgr);
}
});
// Create menu
Menu menu = menuMgr.createContextMenu(viewer.getTable());
viewer.getTable().setMenu(menu);
// Register menu for extension.
getSite().registerContextMenu(menuMgr, viewer);
}
use of org.eclipse.jface.action.IMenuListener in project netxms by netxms.
the class SnmpTrapEditor method createPopupMenu.
/**
* Create pop-up menu for user list
*/
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);
// Register menu for extension.
getSite().registerContextMenu(menuMgr, viewer);
}
use of org.eclipse.jface.action.IMenuListener in project netxms by netxms.
the class ScheduledTaskView method createPopupMenu.
/**
* Create pop-up menu for variable list
*/
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);
// Register menu for extension.
getSite().registerContextMenu(menuMgr, viewer);
}
Aggregations