use of org.eclipse.jface.action.IMenuListener in project netxms by netxms.
the class LastValues 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);
// Register menu for extension.
getObjectTab().getViewPart().getSite().registerContextMenu(menuMgr, viewer);
}
use of org.eclipse.jface.action.IMenuListener in project netxms by netxms.
the class TableElement method createPopupMenu.
/**
* Create popup menu
*/
private void createPopupMenu() {
MenuManager menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager mgr) {
fillContextMenu(mgr);
}
});
Menu menu = menuMgr.createContextMenu(table);
table.setMenu(menu);
}
use of org.eclipse.jface.action.IMenuListener in project netxms by netxms.
the class RackView 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(rackFrontWidget);
rackFrontWidget.setMenu(menu);
menu = menuMgr.createContextMenu(rackRearWidget);
rackRearWidget.setMenu(menu);
// Register menu for extension.
getSite().registerContextMenu(menuMgr, this);
}
use of org.eclipse.jface.action.IMenuListener in project netxms by netxms.
the class ObjectToolsEditor 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 ServerConfigurationEditor 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