本文整理汇总了Java中org.eclipse.ui.forms.IManagedForm.getForm方法的典型用法代码示例。如果您正苦于以下问题:Java IManagedForm.getForm方法的具体用法?Java IManagedForm.getForm怎么用?Java IManagedForm.getForm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.forms.IManagedForm
的用法示例。
在下文中一共展示了IManagedForm.getForm方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createHeaderContents
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的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);
}
示例2: modelDestroyed
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的package包/类
protected void modelDestroyed(GenericDataModelEvent event) {
if (getContainer().isDisposed()) {
return;
}
updateTitle();
editorDirtyStateChanged();
String modelDestroyedMessage = getModelDestroyedMessage();
if (modelDestroyedMessage != null) {
IManagedForm headerForm = getHeaderForm();
ScrolledForm scrolledForm = headerForm.getForm();
Form form = scrolledForm.getForm();
form.setMessage(modelDestroyedMessage, IMessageProvider.ERROR);
}
for (DataModelFormPage<M> page : _Pages) {
page.modelDestroyed(event);
}
}
示例3: updateTitle
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的package包/类
protected void updateTitle() {
M model = getModel();
if (model == null) {
return;
}
setPartName(getPartName(model));
setTitleToolTip(getTitleToolTip(model));
setTitleImage(getTitleImage(model));
IManagedForm headerForm = getHeaderForm();
if (headerForm != null) {
ScrolledForm scrolledForm = headerForm.getForm();
Form form = scrolledForm.getForm();
form.setText(getFormText(model));
form.setImage(getFormImage(model));
}
}
示例4: createModelFormContent
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的package包/类
@Override
protected void createModelFormContent(IManagedForm managedForm, Composite client) {
final ScrolledForm form = managedForm.getForm();
FormToolkit toolkit = managedForm.getToolkit();
_EditSection = createEditSection(form, client, toolkit);
GridData editSectionGridData = new GridData(GridData.FILL_HORIZONTAL);
_EditSection.setLayoutData(editSectionGridData);
_PropertiesSection = createPropertiesTableSection(form, client, toolkit);
GridData propertiesSectionGridData = new GridData(GridData.FILL_HORIZONTAL);
_PropertiesSection.setLayoutData(propertiesSectionGridData);
_ZnodeSection = createZnodeSection(form, client, toolkit);
GridData znodeSectionGridData = new GridData(GridData.FILL_HORIZONTAL);
_ZnodeSection.setLayoutData(znodeSectionGridData);
Table propertiesSectionTable = getPropertiesSectionTable();
initTableEdit(propertiesSectionTable, null, 1);
}
示例5: createModelFormContent
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的package包/类
@Override
protected void createModelFormContent(IManagedForm managedForm, Composite client) {
final ScrolledForm form = managedForm.getForm();
FormToolkit toolkit = managedForm.getToolkit();
_EditSection = createEditSection(form, client, toolkit);
GridData editSectionGridData = new GridData(GridData.FILL_HORIZONTAL);
_EditSection.setLayoutData(editSectionGridData);
_PropertiesSection = createPropertiesTableSection(form, client, toolkit);
GridData propertiesSectionGridData = new GridData(GridData.FILL_HORIZONTAL);
_PropertiesSection.setLayoutData(propertiesSectionGridData);
Table propertiesSectionTable = getPropertiesSectionTable();
initTableEdit(propertiesSectionTable, null, 1);
}
示例6: createFormContent
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的package包/类
@Override
protected void createFormContent(IManagedForm managedForm) {
FormToolkit toolkit=managedForm.getToolkit();
ScrolledForm form=managedForm.getForm();
form.setText("流程模版导出与部署");
ColumnLayout layout=new ColumnLayout();
layout.topMargin=0;
layout.bottomMargin=0;
layout.leftMargin=0;
layout.rightMargin=0;
layout.maxNumColumns=1;
layout.horizontalSpacing=5;
layout.verticalSpacing=5;
form.getBody().setLayout(layout);
this.createExportSection(toolkit, form);
this.createOnlineDeploymentSection(toolkit, form);
}
示例7: createFormContent
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的package包/类
/**
* @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
*/
@Override
protected void createFormContent(final IManagedForm managedForm) {
final FormToolkit toolkit = managedForm.getToolkit();
final ScrolledForm scrolledForm = managedForm.getForm();
scrolledForm.setText(Messages.GeneratorEntryFormPage_formPageHeaderPrefix + getStatechartName());
final Form form = scrolledForm.getForm();
toolkit.decorateFormHeading(form);
final IToolBarManager toolBarManager = form.getToolBarManager();
toolBarManager.add(createGenerateAction());
form.updateToolBar();
final Composite body = scrolledForm.getBody();
body.setLayout(new TableWrapLayout());
createSections(toolkit, body);
startListeningToModelChanges();
}
示例8: createFormContent
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的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);
}
示例9: initialize
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的package包/类
@Override
public void initialize(IManagedForm mform) {
super.initialize(mform);
FormToolkit toolkit = mform.getToolkit();
ScrolledForm sform = mform.getForm();
titleComposite = toolkit.createComposite(sform.getBody());
titleComposite.setLayout(new GridLayout(getNumTitleComponents(), false));
titleComposite.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
populateTitleComposite(toolkit, sform, titleComposite);
Composite separator = toolkit.createCompositeSeparator(sform.getBody());
TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP);
data.maxHeight = 2;
separator.setLayoutData(data);
}
示例10: createFormContent
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的package包/类
protected void createFormContent(IManagedForm managedForm) {
// 通过managedForm对象获得表单工具对象
toolkit = managedForm.getToolkit();
// 通过managedForm对象获得ScrolledForm可滚动的表单对象
ScrolledForm form = managedForm.getForm();
// 设置表单文本
form.setText("这是第一页,Hello, Eclipse 表单");
// 创建表格布局
TableWrapLayout layout = new TableWrapLayout();
layout.numColumns = 1;// 表格的列数
layout.bottomMargin = 0;// 下补白
layout.topMargin = 0;// 上补白
layout.leftMargin = 0;// 左补白
layout.rightMargin = 0;// 右补白
form.getBody().setLayout(layout);// 设置表格的布局
form.getBody().setBackground(
form.getBody().getDisplay()
.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
}
示例11: createFormContent
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的package包/类
@Override
public void createFormContent(IManagedForm managedForm) {
super.createFormContent(managedForm);
form = managedForm.getForm();
toolkit = managedForm.getToolkit();
editorComposite = form.getBody();
// TODO consider using TableWrapLayout, it makes resizing much faster
GridLayout editorLayout = new GridLayout();
editorComposite.setLayout(editorLayout);
editorComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
Display.getCurrent().asyncExec(new Runnable() {
public void run() {
downloadTicketAndRefresh();
}
});
}
示例12: createToolBarActions
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的package包/类
protected void createToolBarActions(IManagedForm managedForm) {
final ScrolledForm form = managedForm.getForm();
Action haction = new Action("hor", Action.AS_RADIO_BUTTON) { //$NON-NLS-1$
public void run() {
sashForm.setOrientation(SWT.HORIZONTAL);
form.reflow(true);
}
};
haction.setChecked(true);
haction.setToolTipText(Messages.getString("NamespaceDetailsBlock.horizontal")); //$NON-NLS-1$
haction.setImageDescriptor(StudioUIEditorPlugin.getDefault().getImageRegistry().getDescriptor(StudioUIEditorPlugin.IMG_HORIZONTAL));
Action vaction = new Action("ver", Action.AS_RADIO_BUTTON) { //$NON-NLS-1$
public void run() {
sashForm.setOrientation(SWT.VERTICAL);
form.reflow(true);
}
};
vaction.setChecked(false);
vaction.setToolTipText(Messages.getString("NamespaceDetailsBlock.vertical")); //$NON-NLS-1$
vaction.setImageDescriptor(StudioUIEditorPlugin.getDefault().getImageRegistry().getDescriptor(StudioUIEditorPlugin.IMG_VERTICAL));
form.getToolBarManager().add(haction);
form.getToolBarManager().add(vaction);
}
示例13: createFormContent
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的package包/类
@Override
protected void createFormContent(IManagedForm managedForm) {
ScrolledForm form = managedForm.getForm();
form.setText(getTitle());
form.setImage(MuleImages.GLOBALS_TITLE_IMAGE);
//configure the layout of the form
GridLayout layout = new GridLayout();
layout.numColumns = 3;
layout.makeColumnsEqualWidth = true;
GridData configData = new GridData(GridData.FILL_BOTH);
configData.horizontalSpan = 2;
//to be fixed
form.getBody().setLayout(layout);
projectsPart = new DomainProjectsSectionPart(form.getBody(), managedForm.getToolkit(), model.getModules(), model.getProject());
projectsPart.getSection().setLayoutData(new GridData(GridData.FILL_BOTH));
}
示例14: createModelFormContent
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的package包/类
@Override
protected final void createModelFormContent(IManagedForm managedForm, Composite client) {
ScrolledForm form = managedForm.getForm();
FormToolkit toolkit = managedForm.getToolkit();
_PrimarySection = createPrimarySection(form, client, toolkit);
_DetailSection = createDetailSection(form, client, toolkit);
_InfoSection = createInfoSection(form, client, toolkit);
_DescriptorSection = createDescriptorSection(form, client, toolkit);
if (_PrimarySection != null) {
GridData primarySectionGridData = new GridData(GridData.FILL_HORIZONTAL);
_PrimarySection.setLayoutData(primarySectionGridData);
}
if (_DetailSection != null) {
GridData detailSectionGridData = new GridData(GridData.FILL_HORIZONTAL);
_DetailSection.setLayoutData(detailSectionGridData);
}
if (_InfoSection != null) {
Table infoSectionTable = getInfoTable();
initTableEdit(infoSectionTable, null, 1);
GridData infoSectionGridData = new GridData(GridData.FILL_BOTH);
_InfoSection.setLayoutData(infoSectionGridData);
}
if (_DescriptorSection != null) {
Table descriptorSectionTable = getDescriptorTable();
initTableEdit(descriptorSectionTable, null, 1);
GridData descriptorSectionGridData = new GridData(GridData.FILL_BOTH);
_DescriptorSection.setLayoutData(descriptorSectionGridData);
}
}
示例15: createFormContent
import org.eclipse.ui.forms.IManagedForm; //导入方法依赖的package包/类
@Override
protected void createFormContent(IManagedForm managedForm) {
FormToolkit toolkit = managedForm.getToolkit();
ScrolledForm form = managedForm.getForm();
form.setText("Description");
Composite body = form.getBody();
toolkit.decorateFormHeading(form.getForm());
toolkit.paintBordersFor(body);
body.setLayout(new FillLayout());
DescriptionSection detailsSection = new DescriptionSection(managedForm.getForm().getBody(), toolkit, Section.NO_TITLE, site);
detailsSection.setFormInput(solution);
}