本文整理了Java中org.eclipse.jface.action.ToolBarManager.setContextMenuManager()
方法的一些代码示例,展示了ToolBarManager.setContextMenuManager()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ToolBarManager.setContextMenuManager()
方法的具体详情如下:
包路径:org.eclipse.jface.action.ToolBarManager
类名称:ToolBarManager
方法名:setContextMenuManager
[英]Sets the context menu manager for this tool bar manager to the given menu manager. If the tool bar control exists, it also adds the menu control to the tool bar.
[中]将此工具栏管理器的上下文菜单管理器设置为给定的菜单管理器。如果工具栏控件存在,它还会将菜单控件添加到工具栏。
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* Disposes of this tool bar manager and frees all allocated SWT resources.
* Notifies all contribution items of the dispose. Note that this method
* does not clean up references between this tool bar manager and its
* associated contribution items. Use <code>removeAll</code> for that
* purpose.
*/
public void dispose() {
if (toolBarExist()) {
toolBar.dispose();
}
toolBar = null;
IContributionItem[] items = getItems();
for (int i = 0; i < items.length; i++) {
items[i].dispose();
}
if (getContextMenuManager() != null) {
getContextMenuManager().dispose();
setContextMenuManager(null);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* Disposes of this tool bar manager and frees all allocated SWT resources.
* Notifies all contribution items of the dispose. Note that this method
* does not clean up references between this tool bar manager and its
* associated contribution items. Use <code>removeAll</code> for that
* purpose.
*/
public void dispose() {
if (toolBarExist()) {
toolBar.dispose();
}
toolBar = null;
IContributionItem[] items = getItems();
for (IContributionItem item : items) {
item.dispose();
}
if (getContextMenuManager() != null) {
getContextMenuManager().dispose();
setContextMenuManager(null);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* Disposes of this tool bar manager and frees all allocated SWT resources.
* Notifies all contribution items of the dispose. Note that this method
* does not clean up references between this tool bar manager and its
* associated contribution items. Use <code>removeAll</code> for that
* purpose.
*/
public void dispose() {
if (toolBarExist()) {
toolBar.dispose();
}
toolBar = null;
IContributionItem[] items = getItems();
for (IContributionItem item : items) {
item.dispose();
}
if (getContextMenuManager() != null) {
getContextMenuManager().dispose();
setContextMenuManager(null);
}
super.setOverrides(null);
}
内容来源于网络,如有侵权,请联系作者删除!