org.eclipse.swt.widgets.ToolBar.setData()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(96)

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

ToolBar.setData介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt

@Override
public void disposeWidget(MUIElement element) {
  ToolBar tb = (ToolBar) element.getWidget();
  tb.setVisible(false);
  unbindWidget(element);
  tb.setData(AbstractPartRenderer.OWNING_ME, element);
}

代码示例来源:origin: com.eclipsesource.tabris/tabris

private void createPageSwitcher() {
 pageSwitcher = new ToolBar( uiParent, SWT.NONE );
 pageSwitcher.setData( RWT.CUSTOM_VARIANT, CUSTOM_VARIANT_TABRIS_UI );
 pageSwitcher.setLayoutData( new GridData( GridData.FILL, GridData.CENTER, false, false ) );
 ToolItem pageSwitcherDropDown = new ToolItem( pageSwitcher, SWT.DROP_DOWN );
 pageSwitcherDropDown.setData( RWT.CUSTOM_VARIANT, CUSTOM_VARIANT_TABRIS_UI );
 pageSwitcherDropDown.addListener( SWT.Selection, new PageSwitcherSelectionListener() );
 pageSwitcherMenu = new Menu( uiParent.getShell(), SWT.POP_UP );
 pageSwitcherMenu.setData( RWT.CUSTOM_VARIANT, CUSTOM_VARIANT_TABRIS_UI );
}

代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt

bar.setData(manager);
bar.setData(AbstractPartRenderer.OWNING_ME, element);
bar.getShell().layout(new Control[] { bar }, SWT.DEFER);
bar.addDisposeListener(new DisposeListener() {

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

if (widget != null && !widget.isDisposed()
    && widget.getData(AbstractPartRenderer.OWNING_ME) == null) {
  widget.setData(AbstractPartRenderer.OWNING_ME, mToolBar);

代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.renderers.swt

private ToolBar createToolbar(final MUIElement element, Composite parent) {
  int orientation = getOrientation(element);
  int style = orientation | SWT.WRAP | SWT.FLAT | SWT.RIGHT;
  ToolBarManager manager = getManager((MToolBar) element);
  if (manager == null) {
    manager = new ToolBarManager(style);
    IContributionManagerOverrides overrides = null;
    MApplicationElement parentElement = element.getParent();
    if (parentElement == null) {
      parentElement = modelService.getContainer(element);
    }
    if (parentElement != null) {
      overrides = (IContributionManagerOverrides) parentElement.getTransientData().get(
          IContributionManagerOverrides.class.getName());
    }
    manager.setOverrides(overrides);
    linkModelToManager((MToolBar) element, manager);
  } else {
    ToolBar toolBar = manager.getControl();
    if (toolBar != null && !toolBar.isDisposed() && (toolBar.getStyle() & orientation) == 0) {
      toolBar.dispose();
    }
    manager.setStyle(style);
  }
  ToolBar btoolbar = manager.createControl(parent);
  btoolbar.setData(manager);
  btoolbar.setData(AbstractPartRenderer.OWNING_ME, element);
  btoolbar.requestLayout();
  return btoolbar;
}

代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt

public Object createWidget(final MUIElement element, Object parent) {
  if (!(element instanceof MRenderedToolBar)
      || !(parent instanceof Composite))
    return null;
  final MRenderedToolBar toolBar = (MRenderedToolBar) element;
  if (!(toolBar.getContributionManager() instanceof ToolBarManager)) {
    return null;
  }
  ToolBarManager tbm = (ToolBarManager) toolBar.getContributionManager();
  ToolBar tb = tbm.createControl((Composite) parent);
  if (tb.getParent() != parent) {
    tb.setParent((Composite) parent);
    tb.setVisible(true);
  }
  tbm.update(true);
  tb.setData(ToolBarManager.class.getName(), tbm);
  tb.addDisposeListener(new DisposeListener() {
    public void widgetDisposed(DisposeEvent e) {
      cleanUp(toolBar);
    }
  });
  tb.getParent().layout(true);
  return tb;
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

fToolBar.setData("org.eclipse.e4.ui.css.id", "BreadcrumbItemDropDownToolBar"); //$NON-NLS-1$ //$NON-NLS-2$

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

fToolBar.setData("org.eclipse.e4.ui.css.id", "DebugBreadcrumbItemDropDownToolBar"); //$NON-NLS-1$ //$NON-NLS-2$

代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.renderers.swt

menuTB.setData(TAG_VIEW_MENU);
RowData rd = new RowData();
menuTB.setLayoutData(rd);

代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt

if (menuTB == null) {
  menuTB = new ToolBar(getTRComposite(ctf), SWT.FLAT | SWT.RIGHT);
  menuTB.setData(TAG_VIEW_MENU);
  ToolItem ti = new ToolItem(menuTB, SWT.PUSH);
  ti.setImage(getViewMenuImage());

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

item.setToolTipText("ToolItem ToolTip" + i);
overrideToolBar.setData("name", "ToolBar");
overrideToolBar.setData("child", "ToolBar Item");
overrideToolBar.getAccessible().addAccessibleListener(overrideAccessibleAdapter);
  item.setToolTipText("Image ToolItem ToolTip" + i);
overrideImageToolBar.setData("name", "Image ToolBar");
overrideImageToolBar.setData("child", "Image ToolBar Item");
overrideImageToolBar.getAccessible().addAccessibleListener(overrideAccessibleAdapter);

相关文章

ToolBar类方法