本文整理汇总了Java中org.eclipse.jface.action.ControlContribution类的典型用法代码示例。如果您正苦于以下问题:Java ControlContribution类的具体用法?Java ControlContribution怎么用?Java ControlContribution使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ControlContribution类属于org.eclipse.jface.action包,在下文中一共展示了ControlContribution类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addResourcesArea
import org.eclipse.jface.action.ControlContribution; //导入依赖的package包/类
private void addResourcesArea(Composite composite) {
ResourceSelectionTree.IToolbarControlCreator toolbarControlCreator = new ResourceSelectionTree.IToolbarControlCreator() {
public void createToolbarControls(ToolBarManager toolbarManager) {
toolbarManager.add(new ControlContribution("stealLock") {
protected Control createControl(Composite parent) {
stealButton = new Button(parent, SWT.CHECK);
stealButton.setText(Policy.bind("LockDialog.stealLock")); //$NON-NLS-1$
return stealButton;
}
});
}
public int getControlCount() {
return 1;
}
};
resourceSelectionTree = new ResourceSelectionTree(composite, SWT.NONE, "These files will be locked:", files, new HashMap(), null, false, toolbarControlCreator, null); //$NON-NLS-1$
resourceSelectionTree.setShowRemoveFromViewAction(false);
}
开发者ID:subclipse,项目名称:subclipse,代码行数:19,代码来源:SvnWizardLockPage.java
示例2: fillLocalToolBar
import org.eclipse.jface.action.ControlContribution; //导入依赖的package包/类
private void fillLocalToolBar(IToolBarManager manager) {
manager.add(new ControlContribution("connection status") {
@Override
protected Control createControl(Composite parent) {
connectionLabel = new Label(parent, SWT.NONE);
connectionLabel.setImage(redIcon);
return connectionLabel;
}
});
manager.add(autoReconnectAction);
manager.add(new Separator());
manager.add(pauseAction);
manager.add(discardAction);
manager.add(showWarningAction);
manager.add(showPrintAction);
manager.add(showTimestampAction);
manager.add(new Separator());
manager.add(clearAction);
}
开发者ID:wpilibsuite,项目名称:EclipsePlugins,代码行数:20,代码来源:RiologView.java
示例3: contributeToToolBar
import org.eclipse.jface.action.ControlContribution; //导入依赖的package包/类
@Override
protected void contributeToToolBar(IToolBarManager toolBarManager) {
super.contributeToToolBar(toolBarManager);
ControlContribution toolBarCompositeContribution = new ControlContribution(getToolBarCompositeContributionId()) {
@Override
protected Control createControl(Composite parent) {
FormToolkit toolkit = getManagedForm().getToolkit();
Composite toolBarComposite = toolkit.createComposite(parent);
FormLayout toolBarCompositeLayout = new FormLayout();
toolBarCompositeLayout.marginTop = 0;
toolBarCompositeLayout.marginBottom = 0;
toolBarCompositeLayout.marginLeft = 4;
toolBarCompositeLayout.marginRight = 4;
toolBarCompositeLayout.spacing = 4;
toolBarComposite.setLayout(toolBarCompositeLayout);
_ToolBarLabel = toolkit.createLabel(toolBarComposite, "", SWT.RIGHT);
FormData toolBarLabelFormData = new FormData();
toolBarLabelFormData.top = new FormAttachment(0, 0);
toolBarLabelFormData.left = new FormAttachment(0, 0);
toolBarLabelFormData.right = new FormAttachment(100, 0);
// HACK: I really struggled to get this label to show up.
toolBarLabelFormData.width = 100;
_ToolBarLabel.setLayoutData(toolBarLabelFormData);
return toolBarComposite;
}
};
toolBarManager.add(toolBarCompositeContribution);
}
开发者ID:baloise,项目名称:eZooKeeper,代码行数:39,代码来源:BaseZnodeModelFormPage.java
注:本文中的org.eclipse.jface.action.ControlContribution类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论