当前位置: 首页>>代码示例>>Java>>正文


Java IToolBarManager.update方法代码示例

本文整理汇总了Java中org.eclipse.jface.action.IToolBarManager.update方法的典型用法代码示例。如果您正苦于以下问题:Java IToolBarManager.update方法的具体用法?Java IToolBarManager.update怎么用?Java IToolBarManager.update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.action.IToolBarManager的用法示例。


在下文中一共展示了IToolBarManager.update方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createHeaderContents

import org.eclipse.jface.action.IToolBarManager; //导入方法依赖的package包/类
@Override
protected void createHeaderContents(IManagedForm headerForm) {
    super.createHeaderContents(headerForm);

    FormToolkit toolkit = headerForm.getToolkit();
    ScrolledForm scrolledForm = headerForm.getForm();
    Form form = scrolledForm.getForm();
    toolkit.decorateFormHeading(form);

    updateTitle();
    makeActions();

    IToolBarManager toolBarManager = form.getToolBarManager();
    contributeToToolBar(headerForm, toolBarManager);
    toolBarManager.update(true);

}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:18,代码来源:DataModelFormEditor.java

示例2: updateActions

import org.eclipse.jface.action.IToolBarManager; //导入方法依赖的package包/类
public void updateActions(ISelection selection) {
	chooseFolderAction.setEnabled(activePage instanceof FolderViewerPage);
	copyPathAction.setEnabled(activePage instanceof FolderViewerPage);
	showReadOnlyAction.setEnabled(activePage instanceof PlatformViewerPage);
	
	removeAction.setEnabled(!selection.isEmpty()  && activePage.isSelectionEditable());
	copyAction.setEnabled(!selection.isEmpty());
	boolean leafSelected = ((StructuredSelection) selection).getFirstElement() instanceof KeyValue;
	copyValueAction.setEnabled(!selection.isEmpty() && leafSelected);
	editValueAction.setEnabled(!selection.isEmpty() && leafSelected);
	trackAction.setChecked(activePage.isTracking());
	
	exportAction.setEnabled(!selection.isEmpty() && !leafSelected);
	
	IActionBars bars = getViewSite().getActionBars();
	IToolBarManager toolBarManager = bars.getToolBarManager();
	toolBarManager.removeAll();
	fillLocalToolBar(toolBarManager);
	toolBarManager.update(true);
	
	IMenuManager menuManager = bars.getMenuManager();
	menuManager.removeAll();
	fillLocalPullDown(menuManager);
	menuManager.update(true);
}
 
开发者ID:32kda,项目名称:com.onpositive.prefeditor,代码行数:26,代码来源:PreferenceView.java

示例3: createFormContent

import org.eclipse.jface.action.IToolBarManager; //导入方法依赖的package包/类
@Override
protected final void createFormContent(IManagedForm managedForm) {

    makeActions();

    ScrolledForm form = managedForm.getForm();

    form.setText(getTitle());
    form.setImage(getImage());
    FormLayout bodyLayout = new FormLayout();
    bodyLayout.marginWidth = 0;
    bodyLayout.marginHeight = 0;

    Composite body = form.getBody();
    body.setLayout(bodyLayout);
    Dialog.applyDialogFont(body);

    _InfoBar = createInfoBar(body);

    setInfoText(getInfoText());

    _Client = createClient(managedForm, body);

    FormData clientFormData = new FormData();

    if (_InfoBar != null) {
        clientFormData.top = new FormAttachment(_InfoBar, 0, SWT.BOTTOM);
    }
    else {
        clientFormData.top = new FormAttachment(0, 0);
    }
    clientFormData.left = new FormAttachment(0, 0);
    clientFormData.right = new FormAttachment(100, 0);
    clientFormData.bottom = new FormAttachment(100, 0);
    _Client.setLayoutData(clientFormData);

    IToolBarManager toolBarManager = form.getToolBarManager();
    contributeToToolBar(toolBarManager);
    toolBarManager.update(true);

    if (!getModel().isDestroyed()) {
        createModelFormContent(managedForm, _Client);
        initFromModel();
    }

}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:47,代码来源:DataModelFormPage.java


注:本文中的org.eclipse.jface.action.IToolBarManager.update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。