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


Java WizardPageSupport.create方法代码示例

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


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

示例1: createControl

import org.eclipse.jface.databinding.wizard.WizardPageSupport; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 *
 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
 */
@Override
public void createControl(final Composite parent) {
    setDescription("Supply the ID, project, and path for the the new transformation.\n"
            + "Optionally, supply the source and target files for the transformation.");

    observablesManager.runAndCollect(new Runnable() {

        @Override
        public void run() {
            createPage(parent);
        }
    });

    WizardPageSupport.create(this, context);
    setErrorMessage(null);
}
 
开发者ID:fabric8io,项目名称:data-mapper,代码行数:22,代码来源:FirstPage.java

示例2: createControl

import org.eclipse.jface.databinding.wizard.WizardPageSupport; //导入方法依赖的package包/类
public void createControl(Composite parent) {
	tabFolder = new TabFolder(parent, SWT.TOP);
	tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));

	DataBindingContext bindingContext = new DataBindingContext();
	WizardPageSupport.create(this, bindingContext);
	helpContexts = new ArrayList<String>();
	for (APageContent pc : rcontent) {
		Control cmp = pc.createContent(tabFolder);
		if (cmp == null)
			continue;
		pc.setBindingContext(bindingContext);

		TabItem item = new TabItem(tabFolder, SWT.NONE);
		item.setText(pc.getName());
		helpContexts.add(pc.getHelpContext());
		item.setControl(cmp);
	}
	tabFolder.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			selectHelpByTab(tabFolder.getSelectionIndex());
		}
	});
	setControl(tabFolder);
	selectHelpByTab(1);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:28,代码来源:EditResourcePage.java

示例3: createControl

import org.eclipse.jface.databinding.wizard.WizardPageSupport; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {
	DataBindingContext dbc = new DataBindingContext();
	WizardPageSupport.create(this, dbc);
	
	Composite composite = new Composite(parent, SWT.NONE);
	setControl(composite);
	composite.setLayout(new GridLayout(2, false));
	
	new Label(composite, SWT.NONE).setText(Messages.ImportSamplesWizardHandler_name_label);
	
	Text tname = new Text(composite, SWT.BORDER);
	tname.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	
	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	gd.horizontalSpan = 2;
	new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL).setLayoutData(gd);
	
	dbc.bindValue(SWTObservables.observeText(tname, SWT.Modify),PojoObservables.observeValue(this, "name"), 				
			new UpdateValueStrategy().setAfterConvertValidator(new EmptyStringValidator() {
						@Override
						public IStatus validate(Object value) {
							IStatus s = super.validate(value);
							if (s.equals(Status.OK_STATUS)) {
									if (isProjectPresent(value)){
										return ValidationStatus.error(Messages.ImportSamplesWizardHandler_plugin_exist);
									} else if (value.equals(defaultName))
										return ValidationStatus.info(Messages.ImportSamplesWizardHandler_suggested_name);
							}
							return s;
						}
					}), null);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:34,代码来源:ImportSamplesWizardHandler.java

示例4: createControl

import org.eclipse.jface.databinding.wizard.WizardPageSupport; //导入方法依赖的package包/类
public void createControl(Composite parent) {
	DataBindingContext dbc = new DataBindingContext();
	WizardPageSupport.create(this, dbc);

	Composite composite = new Composite(parent, SWT.NONE);
	setControl(composite);
	composite.setLayout(new GridLayout(2, false));

	new Label(composite, SWT.NONE).setText(Messages.JRProjectPage_LblName);

	Text tname = new Text(composite, SWT.BORDER);
	tname.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	gd.horizontalSpan = 2;
	new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL).setLayoutData(gd);

	dbc.bindValue(SWTObservables.observeText(tname, SWT.Modify),
			PojoObservables.observeValue(this, "name"), //$NON-NLS-1$
			new UpdateValueStrategy()
					.setAfterConvertValidator(new EmptyStringValidator() {
						@Override
						public IStatus validate(Object value) {
							IStatus s = super.validate(value);
							if (s.equals(Status.OK_STATUS)) {
								IProject[] prjs = ResourcesPlugin
										.getWorkspace().getRoot()
										.getProjects();
								for (IProject p : prjs) {
									if (p.getName().equals(value))
										return ValidationStatus
												.error(Messages.JRProjectPage_ErrorExistingProject);
								}
							}
							return s;
						}
					}), null);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:39,代码来源:JRProjectPage.java

示例5: createControl

import org.eclipse.jface.databinding.wizard.WizardPageSupport; //导入方法依赖的package包/类
public void createControl(Composite parent) {
final Composite area = new Composite(parent, SWT.NONE);
setControl(area);
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
area.setLayoutData(gridData);
GridLayout layoutData = new GridLayout(2, false);
area.setLayout(layoutData);

Label nameLabel = new Label(area, SWT.NONE);
nameLabel.setText("Name:");

nameText = new Text(area, SWT.BORDER);
createControlDecoration(nameText);

gridData = new GridData();
gridData.horizontalAlignment = SWT.FILL;
gridData.grabExcessHorizontalSpace = true;
nameText.setLayoutData(gridData);

Label detailsLabel = new Label(area, SWT.NONE);
detailsLabel.setText("Details:");
gridData = new GridData();
gridData.verticalAlignment = SWT.TOP;
detailsLabel.setLayoutData(gridData);

detailsText = new Text(area, SWT.BORDER | SWT.WRAP | SWT.MULTI);
createControlDecoration(detailsText);
gridData = new GridData();
gridData.horizontalAlignment = SWT.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.verticalAlignment = SWT.FILL;
gridData.grabExcessVerticalSpace = true;
detailsText.setLayoutData(gridData);

bindValues();
WizardPageSupport.create(this, dbc);

   }
 
开发者ID:synergynet,项目名称:synergyview,代码行数:39,代码来源:NewCollectionWizardPage.java

示例6: bindValue

import org.eclipse.jface.databinding.wizard.WizardPageSupport; //导入方法依赖的package包/类
/**
 * 对 UI 和 View Model 进行绑定 ;
 */
private void bindValue() {
	DataBindingContext dbc = new DataBindingContext();
	WizardPageSupport.create(this, dbc);
	ConversionConfigBean configBean = conversionConfigBeans.get(0);

	// bind the format
	dbc.bindList(SWTObservables.observeItems(formatCombo), BeansObservables.observeList(configBean, "fileFormats")); //$NON-NLS-1$
	// final IObservableValue format = BeansObservables.observeValue(selectedModel, "selectedType");
	// dbc.bindValue(SWTObservables.observeSelection(formatCombo), format);

	// bind the source encoding
	dbc.bindList(SWTObservables.observeItems(srcEncCombo), BeansObservables.observeList(configBean, "pageEncoding")); //$NON-NLS-1$

}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:18,代码来源:ConversionWizardPage.java

示例7: bindValue

import org.eclipse.jface.databinding.wizard.WizardPageSupport; //导入方法依赖的package包/类
/**
 * 对 UI 和 View Model 进行绑定 ;
 */
private void bindValue() {
	DataBindingContext dbc = new DataBindingContext();
	WizardPageSupport.create(this, dbc);
	ConversionConfigBean configBean = conversionConfigBeans.get(0);

	// bind the target encoding
	dbc.bindList(SWTObservables.observeItems(tgtEncCombo), BeansObservables.observeList(configBean, "pageEncoding")); //$NON-NLS-1$
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:12,代码来源:ReverseConversionWizardPage.java

示例8: createControl

import org.eclipse.jface.databinding.wizard.WizardPageSupport; //导入方法依赖的package包/类
public void createControl(Composite parent) {
	Composite composite = new Composite(parent, SWT.NONE);
	GridLayoutFactory.fillDefaults().numColumns(2).spacing(10, LayoutConstants.getSpacing().y).applyTo(composite);

	Label label = new Label(composite, SWT.NONE);
	label.setText(Messages.COMMONTXT_NAME_WITH_COLON);

	nameText = new Text(composite, SWT.BORDER);
	GridDataFactory.fillDefaults().grab(true, false).applyTo(nameText);
	nameText.addModifyListener(new ModifyListener() {
		public void modifyText(ModifyEvent e) {
			service.setName(nameText.getText());
		}
	});

	bindingContext = new DataBindingContext();
	map = new WritableMap();

	WizardPageSupport.create(this, bindingContext);

	bindingContext.bindValue(SWTObservables.observeText(nameText, SWT.Modify),
			Observables.observeMapEntry(map, "name"), //$NON-NLS-1$
			new UpdateValueStrategy().setAfterConvertValidator(new StringValidator()), null);

	label = new Label(composite, SWT.NONE);
	label.setText(Messages.CloudFoundryServicePlanWizardPage_LABEL_TYPE);

	typeCombo = new Combo(composite, SWT.READ_ONLY | SWT.BORDER);
	GridDataFactory.fillDefaults().grab(true, false).applyTo(typeCombo);
	typeCombo.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent event) {
			int index = typeCombo.getSelectionIndex();
			if (index != -1) {
				CFServiceOffering configuration = serviceOfferings.get(index);
				setCloudService(service, configuration);
			}
			refreshPlan();
		}
	});

	bindingContext.bindValue(SWTObservables.observeSelection(typeCombo), Observables.observeMapEntry(map, "type"), //$NON-NLS-1$
			new UpdateValueStrategy().setAfterConvertValidator(new ComboValidator(Messages.CloudFoundryServicePlanWizardPage_TEXT_SELECT_TYPE)), null);

	pageBook = new PageBook(composite, SWT.NONE);
	GridDataFactory.fillDefaults().grab(true, true).span(2, 1).applyTo(pageBook);

	planGroup = new Group(pageBook, SWT.BORDER);
	GridDataFactory.fillDefaults().grab(true, true).applyTo(planGroup);
	planGroup.setLayout(new GridLayout());
	planGroup.setVisible(false);
	planGroup.setText(getPlanLabel());

	MultiValidator validator = new MultiValidator() {
		protected IStatus validate() {
			// access plan value to bind validator
			if (planObservable.getValue() == null) {
				return ValidationStatus.cancel(getValidationErrorMessage());
			}
			return ValidationStatus.ok();
		}
	};
	bindingContext.addValidationStatusProvider(validator);

	Dialog.applyDialogFont(composite);
	setControl(composite);
}
 
开发者ID:eclipse,项目名称:cft,代码行数:67,代码来源:CloudFoundryServicePlanWizardPage.java

示例9: createControl

import org.eclipse.jface.databinding.wizard.WizardPageSupport; //导入方法依赖的package包/类
public void createControl(Composite parent) {
	setControl(rcontent.createContent(parent));

	WizardPageSupport.create(this, rcontent.getBindingContext());
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:6,代码来源:NewResourcePage.java

示例10: createControl

import org.eclipse.jface.databinding.wizard.WizardPageSupport; //导入方法依赖的package包/类
public void createControl(Composite arg0) {
final Composite composite = new Composite(arg0, SWT.NULL);
GridData gridData = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
composite.setLayoutData(gridData);
GridLayout layoutData = new GridLayout(3, false);
composite.setLayout(layoutData);

Label nameLabel = new Label(composite, SWT.NONE);
nameLabel.setText("Name:");

_nameText = new Text(composite, SWT.BORDER);
createControlDecoration(_nameText);

gridData = new GridData();
gridData.horizontalAlignment = SWT.FILL;
gridData.horizontalSpan = 2;
gridData.grabExcessHorizontalSpace = true;
_nameText.setLayoutData(gridData);

Label detailsLabel = new Label(composite, SWT.NONE);
detailsLabel.setText("Details:");
gridData = new GridData();
gridData.verticalAlignment = SWT.TOP;
detailsLabel.setLayoutData(gridData);

_detailsText = new Text(composite, SWT.BORDER | SWT.WRAP | SWT.MULTI);
createControlDecoration(_detailsText);
gridData = new GridData();
gridData.horizontalSpan = 2;
gridData.horizontalAlignment = SWT.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.verticalAlignment = SWT.FILL;
gridData.grabExcessVerticalSpace = true;
_detailsText.setLayoutData(gridData);

final Label colorLabel = new Label(composite, SWT.NONE);
colorLabel.setText("Color:");
final Label colorLabelColor = new Label(composite, SWT.NONE);
colorLabelColor.setText("                              ");
_color = new Color(composite.getDisplay(), new RGB(0, 0, 0));
colorLabelColor.setBackground(_color);
_attribute.setColorName(String.format("%d,%d,%d", 0, 0, 0));
final Button changeColourButton = new Button(composite, SWT.PUSH | SWT.BORDER);
changeColourButton.setText("Change Colour");
changeColourButton.addSelectionListener(new SelectionAdapter() {
    public void widgetSelected(SelectionEvent e) {
	ColorDialog cd = new ColorDialog(composite.getShell());
	cd.setText("Attribute Colour Dialog");
	cd.setRGB(new RGB(255, 255, 255));
	RGB newColor = cd.open();
	if (newColor != null) {
	    _color.dispose();
	    _color = new Color(composite.getDisplay(), newColor);
	    colorLabelColor.setBackground(_color);
	    _attribute.setColorName(String.format("%d,%d,%d", newColor.red, newColor.green, newColor.blue));
	}
    }
});

setControl(composite);
bindValues();
WizardPageSupport.create(this, _dbc);
   }
 
开发者ID:synergynet,项目名称:synergyview,代码行数:64,代码来源:NewAttributeWizardPage.java

示例11: initDataBindings

import org.eclipse.jface.databinding.wizard.WizardPageSupport; //导入方法依赖的package包/类
protected void initDataBindings() {
	DataBindingContext bindingContext = new DataBindingContext();
	WizardPageSupport.create(this, bindingContext);

	IObservableValue widgetValue = WidgetProperties.text(SWT.Modify).observe(dbNameText);
	final IObservableValue dbNameModelValue = BeanProperties.value("dbName").observe(dbModel);
	bindingContext.bindValue(widgetValue, dbNameModelValue, null, null);

	widgetValue = WidgetProperties.text(SWT.Modify).observe(instanceText);
	final IObservableValue instanceModelValue = BeanProperties.value("instance").observe(dbModel);
	bindingContext.bindValue(widgetValue, instanceModelValue, null, null);

	widgetValue = WidgetProperties.text(SWT.Modify).observe(hostText);
	final IObservableValue hostModelValue = BeanProperties.value("host").observe(dbModel);
	bindingContext.bindValue(widgetValue, hostModelValue, null, null);

	widgetValue = WidgetProperties.text(SWT.Modify).observe(portText);
	final IObservableValue protModelValue = BeanProperties.value("port").observe(dbModel);
	bindingContext.bindValue(widgetValue, protModelValue, null, null);

	widgetValue = WidgetProperties.text(SWT.Modify).observe(locationText);
	final IObservableValue locationModelValue = BeanProperties.value("itlDBLocation").observe(dbModel);
	bindingContext.bindValue(widgetValue, locationModelValue, null, null);
	//
	widgetValue = WidgetProperties.text(SWT.Modify).observe(usernameText);
	final IObservableValue usernameModelValue = BeanProperties.value("userName").observe(dbModel);
	bindingContext.bindValue(widgetValue, usernameModelValue, null, null);

	widgetValue = WidgetProperties.text(SWT.Modify).observe(passwordText);
	final IObservableValue passwordModelValue = BeanProperties.value("password").observe(dbModel);
	bindingContext.bindValue(widgetValue, passwordModelValue, null, null);

	MultiValidator myValidator = new MultiValidator() {

		@Override
		protected IStatus validate() {
			dbNameModelValue.getValue();
			instanceModelValue.getValue();
			hostModelValue.getValue();
			protModelValue.getValue();
			locationModelValue.getValue();
			usernameModelValue.getValue();
			passwordModelValue.getValue();
			return validator();
		}
	};
	bindingContext.addValidationStatusProvider(myValidator);
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:49,代码来源:NewTermDbBaseInfoPage.java


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