本文整理了Java中org.eclipse.jface.action.ToolBarManager.getContextMenuControl()
方法的一些代码示例,展示了ToolBarManager.getContextMenuControl()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ToolBarManager.getContextMenuControl()
方法的具体详情如下:
包路径:org.eclipse.jface.action.ToolBarManager
类名称:ToolBarManager
方法名:getContextMenuControl
[英]Returns the control of the Menu Manager. If the menu manager does not have a control then one is created.
[中]返回菜单管理器的控件。如果菜单管理器没有控件,则会创建一个控件。
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* 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.
*
* @param contextMenuManager
* the context menu manager, or <code>null</code> if none
*/
public void setContextMenuManager(MenuManager contextMenuManager) {
this.contextMenuManager = contextMenuManager;
if (toolBar != null) {
toolBar.setMenu(getContextMenuControl());
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* 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.
*
* @param contextMenuManager
* the context menu manager, or <code>null</code> if none
* @since 3.0
*/
public void setContextMenuManager(MenuManager contextMenuManager) {
this.contextMenuManager = contextMenuManager;
if (toolBar != null) {
toolBar.setMenu(getContextMenuControl());
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* 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.
*
* @param contextMenuManager
* the context menu manager, or <code>null</code> if none
* @since 3.0
*/
public void setContextMenuManager(MenuManager contextMenuManager) {
this.contextMenuManager = contextMenuManager;
if (toolBar != null) {
toolBar.setMenu(getContextMenuControl());
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* Creates and returns this manager's tool bar control. Does not create a
* new control if one already exists.
* <!-- Also create an @link AccessibleListener for the {@link ToolBar}. -->
*
*
* @param parent
* the parent control
* @return the tool bar control
*/
public ToolBar createControl(Composite parent) {
if (!toolBarExist() && parent != null) {
toolBar = new ToolBar(parent, itemStyle);
toolBar.setMenu(getContextMenuControl());
update(true);
// RAP [bm]: no accessible support
// toolBar.getAccessible().addAccessibleListener(getAccessibleListener());
}
return toolBar;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* Creates and returns this manager's tool bar control. Does not create
* a new control if one already exists and is not disposed.
* Also create an {@link AccessibleListener} for the {@link ToolBar}.
*
* @param parent
* the parent control
* @return the tool bar control
*/
public ToolBar createControl(Composite parent) {
if (!toolBarExist() && parent != null) {
toolBar = new ToolBar(parent, itemStyle);
toolBar.setMenu(getContextMenuControl());
update(true);
toolBar.getAccessible().addAccessibleListener(getAccessibleListener());
}
return toolBar;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* Creates and returns this manager's tool bar control. Does not create
* a new control if one already exists and is not disposed.
* Also create an {@link AccessibleListener} for the {@link ToolBar}.
*
* @param parent
* the parent control
* @return the tool bar control
*/
public ToolBar createControl(Composite parent) {
if (!toolBarExist() && parent != null) {
toolBar = new ToolBar(parent, itemStyle);
toolBar.setMenu(getContextMenuControl());
update(true);
toolBar.getAccessible().addAccessibleListener(getAccessibleListener());
}
return toolBar;
}
内容来源于网络,如有侵权,请联系作者删除!