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


Java Form.getBody方法代码示例

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


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

示例1: createFigure

import org.eclipse.ui.forms.widgets.Form; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
 *  createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
 * 
 */
public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
	ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
	Form form = scrolledForm.getForm();
	view = form.getBody();
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	view.setLayout(layout);
	createControls(widgetFactory, view);
	return scrolledForm;
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:18,代码来源:PoissonPropertiesEditionPartForm.java

示例2: createFigure

import org.eclipse.ui.forms.widgets.Form; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
 *  createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
 * @generated
 */
public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
	ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
	Form form = scrolledForm.getForm();
	view = form.getBody();
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	view.setLayout(layout);
	createControls(widgetFactory, view);
	return scrolledForm;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:18,代码来源:RequiredSchedulingParameterPropertiesEditionPartForm.java

示例3: createFigure

import org.eclipse.ui.forms.widgets.Form; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
 *      createFigure(org.eclipse.swt.widgets.Composite,
 *      org.eclipse.ui.forms.widgets.FormToolkit)
 * 
 */
public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
	ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
	Form form = scrolledForm.getForm();
	view = form.getBody();
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	view.setLayout(layout);
	createControls(widgetFactory, view);
	return scrolledForm;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:19,代码来源:OtherPropertiesEditionPartForm.java

示例4: createControls

import org.eclipse.ui.forms.widgets.Form; //导入方法依赖的package包/类
@Override
public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
	super.createControls(parent, aTabbedPropertySheetPage);

	widgetFactory = getWidgetFactory();

	final Form form = widgetFactory.createForm(parent);
	form.setText(getFormText());
	widgetFactory.decorateFormHeading(form);
	formBody = form.getBody();
}
 
开发者ID:turnus,项目名称:turnus,代码行数:12,代码来源:AbstractDiagramSection.java

示例5: createContainer

import org.eclipse.ui.forms.widgets.Form; //导入方法依赖的package包/类
public Composite createContainer(final Composite parent, final ITextPlugin.ICallback h){
	parent.setLayout(new FillLayout());
	// Composite ret=new Composite(parent,SWT.BORDER);
	Form form = UiDesk.getToolkit().createForm(parent);
	form.setText(Messages.TextContainer_NoPluginCaption);
	form.getBody().setLayout(new FillLayout());
	FormText ft = UiDesk.getToolkit().createFormText(form.getBody(), false);
	ft.setText(expl, true, false);
	return form.getBody();
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:11,代码来源:TextContainer.java

示例6: createToolTipContentArea

import org.eclipse.ui.forms.widgets.Form; //导入方法依赖的package包/类
protected Composite createToolTipContentArea(Event event, Composite parent) {

		FormToolkit toolkit = new FormToolkit(parent.getDisplay());
		FormColors colors = toolkit.getColors();
		Color top = colors.getColor(IFormColors.H_GRADIENT_END);
		Color bot = colors.getColor(IFormColors.H_GRADIENT_START);

		// create the base form
		Form form = toolkit.createForm(parent);
		form.setText(title);
		form.setTextBackground(new Color[] { top, bot }, new int[] { 100 }, true);
		FormLayout layout = new FormLayout();
		layout.marginTop = 10;
		layout.marginBottom = 10;
		layout.marginLeft = 10;
		layout.marginRight = 10;
		form.getBody().setLayout(layout);

		// Scrolled text
		ScrolledFormText scrolledFormText = new ScrolledFormText(form.getBody(), true);
		FormText text = toolkit.createFormText(scrolledFormText, true);

		scrolledFormText.setAlwaysShowScrollBars(false);

		StringBuilder builder = new StringBuilder();
		for (final String currentText : texts) {
			builder.append("<p>").append(currentText).append("</p>");
		}

		text.setText(String.format("<form>%s</form>", builder.toString()), true, false);

		FormData data = new FormData();
		data.left = new FormAttachment(0, 0);
		data.right = new FormAttachment(100);
		scrolledFormText.setLayoutData(data);

		scrolledFormText.setFormText(text);
		scrolledFormText.setBackground(ColorConstants.white);

		return parent;
	}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:42,代码来源:FormToolTip.java

示例7: createControl

import org.eclipse.ui.forms.widgets.Form; //导入方法依赖的package包/类
public void createControl(Composite parent){
	DBImportWizard wiz = (DBImportWizard) getWizard();
	
	FormToolkit tk = UiDesk.getToolkit();
	Form form = tk.createForm(parent);
	form.setText(Messages.DBImportFirstPage_Connection); //$NON-NLS-1$
	Composite body = form.getBody();
	body.setLayout(new TableWrapLayout());
	tk.createLabel(body, Messages.DBImportFirstPage_EnterType); //$NON-NLS-1$
	dbTypes = new List(body, SWT.BORDER);
	dbTypes.setItems(supportedDB);
	dbTypes.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e){
			int it = dbTypes.getSelectionIndex();
			switch (it) {
			case MYSQL:
			case POSTGRESQL:
				server.setEnabled(true);
				dbName.setEnabled(true);
				defaultUser = ""; //$NON-NLS-1$
				defaultPassword = ""; //$NON-NLS-1$
				break;
			case H2:
				server.setEnabled(false);
				dbName.setEnabled(true);
				defaultUser = "sa";
				defaultPassword = "";
				break;
			case ODBC:
				server.setEnabled(false);
				dbName.setEnabled(true);
				defaultUser = "sa"; //$NON-NLS-1$
				defaultPassword = ""; //$NON-NLS-1$
				break;
			default:
				break;
			}
			DBImportSecondPage sec = (DBImportSecondPage) getNextPage();
			sec.name.setText(defaultUser);
			sec.pwd.setText(defaultPassword);
			
		}
		
	});
	
	tk.adapt(dbTypes, true, true);
	tk.createLabel(body, Messages.DBImportFirstPage_serverAddress); //$NON-NLS-1$
	server = tk.createText(body, "", SWT.BORDER); //$NON-NLS-1$
	
	TableWrapData twr = new TableWrapData(TableWrapData.FILL_GRAB);
	server.setLayoutData(twr);
	tk.createLabel(body, Messages.DBImportFirstPage_databaseName); //$NON-NLS-1$
	dbName = tk.createText(body, "", SWT.BORDER); //$NON-NLS-1$
	TableWrapData twr2 = new TableWrapData(TableWrapData.FILL_GRAB);
	dbName.setLayoutData(twr2);
	if (wiz.preset != null && wiz.preset.length > 1) {
		int idx = StringTool.getIndex(supportedDB, wiz.preset[0]);
		if (idx < dbTypes.getItemCount()) {
			dbTypes.select(idx);
		}
		server.setText(wiz.preset[1]);
		dbName.setText(wiz.preset[2]);
	}
	setControl(form);
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:67,代码来源:DBImportFirstPage.java


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