org.eclipse.jface.action.ToolBarManager.toolBarExist()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(69)

本文整理了Java中org.eclipse.jface.action.ToolBarManager.toolBarExist()方法的一些代码示例,展示了ToolBarManager.toolBarExist()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ToolBarManager.toolBarExist()方法的具体详情如下:
包路径:org.eclipse.jface.action.ToolBarManager
类名称:ToolBarManager
方法名:toolBarExist

ToolBarManager.toolBarExist介绍

[英]Returns whether the tool bar control is created and not disposed.
[中]返回工具栏控件是否已创建且未被释放。

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

/**
 * Creates a tool bar manager for an existing tool bar control. This manager
 * becomes responsible for the control, and will dispose of it when the
 * manager is disposed. <strong>NOTE</strong> When creating a ToolBarManager
 * from an existing {@link ToolBar} you will not get the accessible listener
 * provided by JFace.
 *
 * @see #ToolBarManager()
 * @see #ToolBarManager(int)
 *
 * @param toolbar
 *            the tool bar control
 */
public ToolBarManager(ToolBar toolbar) {
  this();
  this.toolBar = toolbar;
  if (toolBarExist()) {
    this.itemStyle = toolBar.getStyle();
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

/**
 * Creates a tool bar manager for an existing tool bar control. This manager
 * becomes responsible for the control, and will dispose of it when the
 * manager is disposed. <strong>NOTE</strong> When creating a ToolBarManager
 * from an existing {@link ToolBar} you will not get the accessible listener
 * provided by JFace.
 *
 * @see #ToolBarManager()
 * @see #ToolBarManager(int)
 *
 * @param toolbar
 *            the tool bar control
 */
public ToolBarManager(ToolBar toolbar) {
  this();
  this.toolBar = toolbar;
  if (toolBarExist()) {
    this.itemStyle = toolBar.getStyle();
  }
}

代码示例来源: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.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;
}

代码示例来源: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.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);
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

if (toolBarExist()) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

if (!toolBarExist()) {
  return;

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

if (!toolBarExist()) {
  return;

相关文章