本文整理了Java中org.eclipse.swt.widgets.ToolBar.getData()
方法的一些代码示例,展示了ToolBar.getData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ToolBar.getData()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.ToolBar
类名称:ToolBar
方法名:getData
暂无
代码示例来源:origin: com.diffplug.durian/durian-swt
private ToolBarDrop(ToolBar toolbar) {
this.toolbar = toolbar;
Object obj = toolbar.getData(DND.DROP_TARGET_KEY);
if (obj != null) {
// CoolBars might add a drop listener, but we don't want their behavior.
// Clobber the existing DropTarget.
((DropTarget) obj).dispose();
}
target = new DropTarget(toolbar, DndOp.dropAll());
target.addDropListener(delegateListener);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
&& widget.getData(AbstractPartRenderer.OWNING_ME) == null) {
widget.setData(AbstractPartRenderer.OWNING_ME, mToolBar);
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.renderers.swt
@Override
public Object createWidget(final MUIElement element, Object parent) {
if (!(element instanceof MToolBar) || !(parent instanceof Composite)) {
return null;
}
final MToolBar toolbarModel = (MToolBar) element;
ToolBar newTB = createToolbar(toolbarModel, (Composite) parent);
bindWidget(element, newTB);
processContribution(toolbarModel, toolbarModel.getElementId());
Control renderedCtrl = newTB;
MUIElement parentElement = element.getParent();
if (parentElement instanceof MTrimBar) {
if (!element.getTags().contains(IPresentationEngine.NO_MOVE)) {
element.getTags().add(IPresentationEngine.DRAGGABLE);
}
setCSSInfo(element, newTB);
boolean vertical = false;
MTrimBar bar = (MTrimBar) parentElement;
vertical = bar.getSide() == SideValue.LEFT || bar.getSide() == SideValue.RIGHT;
IEclipseContext parentContext = getContextForParent(element);
CSSRenderingUtils cssUtils = parentContext.get(CSSRenderingUtils.class);
if (cssUtils != null) {
MUIElement modelElement = (MUIElement) newTB.getData(AbstractPartRenderer.OWNING_ME);
boolean draggable = ((modelElement != null) && (modelElement.getTags().contains(IPresentationEngine.DRAGGABLE)));
renderedCtrl = cssUtils.frameMeIfPossible(newTB, null, vertical, draggable);
}
}
return renderedCtrl;
}
内容来源于网络,如有侵权,请联系作者删除!