本文整理匯總了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);
}
示例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});
}
示例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);
}
示例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();
}
}
示例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();
}
}