當前位置: 首頁>>代碼示例>>Java>>正文


Java ScrolledForm.getToolBarManager方法代碼示例

本文整理匯總了Java中org.eclipse.ui.forms.widgets.ScrolledForm.getToolBarManager方法的典型用法代碼示例。如果您正苦於以下問題:Java ScrolledForm.getToolBarManager方法的具體用法?Java ScrolledForm.getToolBarManager怎麽用?Java ScrolledForm.getToolBarManager使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.ui.forms.widgets.ScrolledForm的用法示例。


在下文中一共展示了ScrolledForm.getToolBarManager方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createFormContent

import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
protected void createFormContent(IManagedForm managedForm) {
	final ScrolledForm form = managedForm.getForm();
	FormToolkit toolkit = managedForm.getToolkit();
	toolkit.decorateFormHeading(form.getForm());

	IToolBarManager manager = form.getToolBarManager();
	if (contributeToToolbar(manager)) {
		form.updateToolBar();
	}
	String titleText = getFormTitleText();
	if (titleText != null) {
		form.setText(titleText);
	}
	Image titleImage = getFormTitleImage();
	if (titleImage != null) {
		form.setImage(titleImage);
	}
	toolkit.decorateFormHeading(form.getForm());
	createUI(managedForm);
}
 
開發者ID:angelozerr,項目名稱:typescript.java,代碼行數:22,代碼來源:AbstractFormPage.java

示例2: createToolBarActions

import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
protected void createToolBarActions(IManagedForm managedForm) {
	ScrolledForm form = managedForm.getForm();
	IToolBarManager manager = form.getToolBarManager();
	manager.add(runAction);
	manager.add(stopAction);
	sashForm.setWeights(new int[] {2,1});
}
 
開發者ID:AlexWengh,項目名稱:HMM,代碼行數:9,代碼來源:AutomationBlock.java

示例3: addRefresh

import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
/**
 * Adds a refresh function to the tool-bar of the given form (content of a
 * editor page). When this function is executed the given editor is closed
 * and opened again.
 */
public static void addRefresh(ScrolledForm form, ModelEditor<?> editor) {
	if (form == null || editor == null)
		return;
	CategorizedEntity model = editor.getModel();
	Action refresh = Actions.create(M.Reload, Icon.REFRESH.descriptor(),
			() -> {
				App.closeEditor(model);
				App.openEditor(model);
			});
	IToolBarManager toolbar = form.getToolBarManager();
	toolbar.add(refresh);
}
 
開發者ID:GreenDelta,項目名稱:olca-app,代碼行數:18,代碼來源:Editors.java

示例4: createFormContent

import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
protected void createFormContent(IManagedForm managedForm) {
		final ScrolledForm form = managedForm.getForm();
		//form.setBackgroundImage(PDEPlugin.getDefault().getLabelProvider().get(
		//		PDEPluginImages.DESC_FORM_BANNER));
		FormToolkit toolkit = managedForm.getToolkit();
		FormColors colors = toolkit.getColors();
		form.getForm().setSeparatorColor(colors.getColor(FormColors.TB_BORDER));
		if (newStyleHeader) {
			colors.initializeSectionToolBarColors();
			Color gbg = colors.getColor(FormColors.TB_GBG);
			Color bg = colors.getBackground();
			form.getForm().setTextBackground(new Color[]{bg, gbg}, new int [] {100}, true);
			form.getForm().setSeparatorVisible(true);
		}
		final String href = getHelpResource();
		if (href != null) {
			IToolBarManager manager = form.getToolBarManager();
			Action helpAction = new Action("help") { //$NON-NLS-1$
				public void run() {
					BusyIndicator.showWhile(form.getDisplay(), new Runnable() {
						public void run() {
							PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(href);
						}
					});
				}
			};
			helpAction.setToolTipText("Help"); 
//			helpAction.setImageDescriptor(PDEPluginImages.DESC_HELP);
			manager.add(helpAction);
			form.updateToolBar();
		}
	}
 
開發者ID:chrisGerken,項目名稱:transformAuthoring,代碼行數:33,代碼來源:AbstractFormPage.java

示例5: createFormContent

import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的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.ui.forms.widgets.ScrolledForm.getToolBarManager方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。