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


Java BeanProperties类代码示例

本文整理汇总了Java中org.eclipse.core.databinding.beans.BeanProperties的典型用法代码示例。如果您正苦于以下问题:Java BeanProperties类的具体用法?Java BeanProperties怎么用?Java BeanProperties使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BeanProperties类属于org.eclipse.core.databinding.beans包,在下文中一共展示了BeanProperties类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupBindings

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
private void setupBindings() {
	// Final property binding

	if (null != finalAnnotationBox) {
		@SuppressWarnings("unchecked")
		IObservableValue<Boolean> finalValue = BeanProperties
				.value(N4JSClassWizardModel.class, N4JSClassWizardModel.FINAL_ANNOTATED_PROPERTY)
				.observe(model);
		@SuppressWarnings("unchecked")
		IObservableValue<Boolean> finalUI = WidgetProperties.selection().observe(finalAnnotationBox);
		getDataBindingContext().bindValue(finalUI, finalValue);
	}

	// n4js annotation property binding

	@SuppressWarnings("unchecked")
	IObservableValue<Boolean> n4jsValue = BeanProperties
			.value(N4JSClassWizardModel.class, N4JSClassifierWizardModel.N4JS_ANNOTATED_PROPERTY)
			.observe(model);
	@SuppressWarnings("unchecked")
	IObservableValue<Boolean> n4jsUI = WidgetProperties.selection().observe(n4jsAnnotationBox);

	getDataBindingContext().bindValue(n4jsUI, n4jsValue);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:25,代码来源:OtherClassifierModifiersComponent.java

示例2: createVendorIdControls

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void createVendorIdControls(DataBindingContext dbc, Composite parent) {
	final Composite composite = new Composite(parent, SWT.NULL);
	composite.setLayout(GridLayoutFactory.swtDefaults().numColumns(2).create());
	composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	final Label vendorIdLabel = new Label(composite, SWT.NONE);
	vendorIdLabel.setText("Vendor id:");

	Text vendorIdText = new Text(composite, SWT.BORDER);
	vendorIdText.setLayoutData(fillDefaults().align(FILL, FILL).grab(true, true).create());

	projectInfo.addPropertyChangeListener(event -> {
		if (event.getPropertyName().equals(N4MFProjectInfo.VENDOR_ID_PROP_NAME)) {
			setPageComplete(validatePage());
		}
	});

	dbc.bindValue(WidgetProperties.text(Modify).observe(vendorIdText),
			BeanProperties.value(N4MFProjectInfo.class, N4MFProjectInfo.VENDOR_ID_PROP_NAME).observe(projectInfo));

}
 
开发者ID:eclipse,项目名称:n4js,代码行数:23,代码来源:N4MFWizardNewProjectCreationPage.java

示例3: initDataBindings

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
protected DataBindingContext initDataBindings() {
		DataBindingContext bindingContext = new DataBindingContext();
		//
		IObservableValue observeSelectionScaleObserveWidget = WidgetProperties.selection().observe(scale);
		IObservableValue observeSelectionSpinnerObserveWidget = WidgetProperties.selection().observe(spinner);
		bindingContext.bindValue(observeSelectionScaleObserveWidget, observeSelectionSpinnerObserveWidget, null, null);
		//
		IObservableValue observeMaxScaleObserveWidget = WidgetProperties.maximum().observe(scale);
		IObservableValue sizeLogObserveValue = BeanProperties.value("size").observe(log);
		bindingContext.bindValue(observeMaxScaleObserveWidget, sizeLogObserveValue, null,
				new UpdateValueStrategy(UpdateValueStrategy.POLICY_UPDATE));
		//
		
		IObservableValue observeMaxSpinnerObserveWidget = WidgetProperties.maximum().observe(spinner);
//		IObservableValue sizeLogObserveValue = BeanProperties.value("size").observe(log);
		bindingContext.bindValue(observeMaxSpinnerObserveWidget, sizeLogObserveValue, null,
				new UpdateValueStrategy(UpdateValueStrategy.POLICY_UPDATE));
		return bindingContext;
	}
 
开发者ID:fp7-netide,项目名称:IDE,代码行数:20,代码来源:ReplayPanel.java

示例4: createDialogArea

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
	Composite area = (Composite) super.createDialogArea(parent);
	
	TableViewer tableViewer = new TableViewer(area, SWT.BORDER | SWT.FULL_SELECTION);
	table = tableViewer.getTable();
	table.setLinesVisible(true);
	table.setHeaderVisible(true);
	table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	TableColumn tblColumnDate = new TableColumn(table, SWT.NONE);
	tblColumnDate.setWidth(150);
	tblColumnDate.setText("Date");
	
	TableColumn tblColumnMsg = new TableColumn(table, SWT.NONE);
	tblColumnMsg.setWidth(300);
	tblColumnMsg.setText("Message");
	
	ViewerSupport.bind(tableViewer, hub.getLog(), BeanProperties.values(new String[] {"date", "msg"}));
			
	setHelpAvailable(false);
	setTitle(hub.getName());
	setMessage(hub.getAddress());

	return area;
}
 
开发者ID:fp7-netide,项目名称:IDE,代码行数:27,代码来源:ZmqLogDialog.java

示例5: addSshComboDataBinding

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
private void addSshComboDataBinding(ArrayList<SshProfileModel> profileList) {

		// bind sshmodellist to combobox content
		WritableList input = new WritableList(profileList, SshProfileModel.class);
		this.statusModel.setWritableProfileList(input);

		ComboViewer cv = this.editor.getSshComboViewer();
		ViewerSupport.bind(cv, input, BeanProperties.values(new String[] { Constants.PROFILE_NAME_MODEL }));

		// bind selectionIndex to model
		// selectionIndex == profileListIndex, use it to match selection to
		// actual model
		IObservableValue selection = WidgetProperties.singleSelectionIndex().observe(cv.getCombo());
		IObservableValue modelValue = BeanProperties.value(UiStatusModel.class, Constants.SSH_COMBO_SELECTION_INDEX)
				.observe(this.statusModel);

		if (!input.isEmpty())
			cv.getCombo().select(0);

		this.ctx.bindValue(modelValue, selection);
	}
 
开发者ID:fp7-netide,项目名称:IDE,代码行数:22,代码来源:WorkbenchConfigurationEditorEngine.java

示例6: addTableDataBinding

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
private void addTableDataBinding(ArrayList<LaunchConfigurationModel> modelList) {
	WritableList input = new WritableList(modelList, LaunchConfigurationModel.class);

	this.statusModel.setWritableModelList(input);
	ViewerSupport
			.bind(this.editor.getTableViewer(), input,
					BeanProperties.values(new String[] { Constants.LaunchName, Constants.APP_NAME_MODEL,
							Constants.APP_RUNNING_MODEL, Constants.PLATFORM_MODEL,
							Constants.CLIENT_CONTROLLER_MODEL, Constants.PORT_MODEL, Constants.FLAG_BACKEND, Constants.FLAG_APP }));

	// bind selectionIndex to model
	// selectionIndex == profileListIndex, use it to match selection to
	// actual model
	IObservableValue selection = WidgetProperties.singleSelectionIndex()
			.observe(this.editor.getTableViewer().getTable());
	IObservableValue modelValue = BeanProperties.value(UiStatusModel.class, Constants.LAUNCH_TABLE_INDEX)
			.observe(this.statusModel);

	this.ctx.bindValue(modelValue, selection);

}
 
开发者ID:fp7-netide,项目名称:IDE,代码行数:22,代码来源:WorkbenchConfigurationEditorEngine.java

示例7: initDataBindings

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
protected DataBindingContext initDataBindings() {
	DataBindingContext bindingContext = new DataBindingContext();
	//
	ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
	IObservableMap[] observeMaps = EMFEditObservables.observeMaps(editingDomain, listContentProvider.getKnownElements(), new EStructuralFeature[]{Literals.ENTITY__NAME});
	tableViewer.setLabelProvider(new ObservableMapLabelProvider(observeMaps));
	tableViewer.setContentProvider(listContentProvider);
	//
	IObservableList architectureCloudProvidersObserveList = EMFEditObservables.observeList(Realm.getDefault(), editingDomain, architecture, ArchitecturePackage.Literals.ARCHITECTURE__CLOUD_ENVIRONMENTS);
	tableViewer.setInput(architectureCloudProvidersObserveList);
	//
	IObservableValue observeSingleSelectionTableViewer = ViewerProperties.singleSelection().observe(tableViewer);
	IObservableValue cloudProviderCloudProviderModelObserveValue = BeanProperties.value("cloudProvider").observe(cloudProviderModel);
	bindingContext.bindValue(observeSingleSelectionTableViewer, cloudProviderCloudProviderModelObserveValue, null, null);
	//
	return bindingContext;
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:18,代码来源:CloudProviderListComposite.java

示例8: createDataBindings

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
protected void createDataBindings(SensidlProjectDTO sensidlProjectDTO) {
	DataBindingContext bindingContext = new DataBindingContext();
	
	UpdateValueStrategy strategyAtomicStringToModel = new UpdateValueStrategy();
	strategyAtomicStringToModel.setAfterGetValidator(new NonEmptyStringValidator());
	UpdateValueStrategy strategyAtomicStringToTarget = new UpdateValueStrategy(); 
	
	IObservableValue observeTextTxtSensidlFileNameObserveWidget = WidgetProperties.text(SWT.Modify).observe(txtSensidlFileName);
	IObservableValue atomicValidatedProjectName = new WritableValue(null, String.class);
	bindingContext.bindValue(observeTextTxtSensidlFileNameObserveWidget, atomicValidatedProjectName, strategyAtomicStringToModel, strategyAtomicStringToTarget);
	
	IObservableValue model = BeanProperties.value("sensidlFileName").observe(sensidlProjectDTO);
	bindingContext.bindValue(observeTextTxtSensidlFileNameObserveWidget, model);
	
	aggregatedStatus = new AggregateValidationStatus(bindingContext, AggregateValidationStatus.MAX_SEVERITY);
	aggregatedStatus.addChangeListener(sensidlProjectStatusListener);
}
 
开发者ID:SENSIDL-PROJECT,项目名称:SensIDL,代码行数:18,代码来源:SensidlProjectWizardComposite.java

示例9: setupBindings

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
private void setupBindings() {
	// super class property binding

	@SuppressWarnings("unchecked")
	IObservableValue<ClassifierReference> superClassValue = BeanProperties
			.value(N4JSClassWizardModel.class, N4JSClassWizardModel.SUPER_CLASS_PROPERTY).observe(model);
	@SuppressWarnings("unchecked")
	IObservableValue<String> superClassUI = WidgetProperties.text(SWT.Modify).observe(text);

	getDataBindingContext().bindValue(superClassUI, superClassValue,
			new WizardComponentDataConverters.StringToClassifierReferenceConverter().updatingValueStrategy(),
			new WizardComponentDataConverters.ClassifierReferenceToStringConverter()
					.updatingValueStrategy());
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:15,代码来源:SuperClassComponentProvider.java

示例10: setupBindings

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
private void setupBindings() {
	// Definition file property binding (definition file)

	@SuppressWarnings("unchecked")
	IObservableValue<Boolean> externalValue = BeanProperties
			.value(DefinitionFileModel.class, N4JSClassifierWizardModel.DEFINITION_FILE_PROPERTY)
			.observe(model);
	@SuppressWarnings("unchecked")
	IObservableValue<Boolean> externalUI = WidgetProperties.selection().observe(definitionFileBox);
	getDataBindingContext().bindValue(externalUI, externalValue);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:12,代码来源:FileTypeComponent.java

示例11: setupBindings

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
private void setupBindings() {
	// Access modifier property binding
	@SuppressWarnings("unchecked")
	IObservableValue<Boolean> publicButtonSelection = WidgetProperties.selection()
			.observe(publicAccessModifierBox);
	@SuppressWarnings("unchecked")
	IObservableValue<Boolean> projectButtonSelection = WidgetProperties.selection()
			.observe(projectAccessModifierBox);
	@SuppressWarnings("unchecked")
	IObservableValue<Boolean> privateButtonSelection = WidgetProperties.selection()
			.observe(privateAccessModifierBox);

	SelectObservableValue<AccessModifier> accessModifierSelectObservable = new SelectObservableValue<>();
	accessModifierSelectObservable.addOption(AccessModifier.PUBLIC, publicButtonSelection);
	accessModifierSelectObservable.addOption(AccessModifier.PROJECT, projectButtonSelection);
	accessModifierSelectObservable.addOption(AccessModifier.PRIVATE, privateButtonSelection);

	@SuppressWarnings("unchecked")
	IObservableValue<AccessModifier> accessModifierProperty = BeanProperties
			.value(AccessModifiableModel.class, N4JSClassifierWizardModel.ACCESS_MODIFIER_PROPERTY).observe(model);

	dataBindingContext.bindValue(accessModifierSelectObservable, accessModifierProperty);

	// Internal property binding

	@SuppressWarnings("unchecked")
	IObservableValue<Boolean> internalValue = BeanProperties
			.value(AccessModifiableModel.class, N4JSClassifierWizardModel.INTERNAL_PROPERTY)
			.observe(model);
	@SuppressWarnings("unchecked")
	IObservableValue<Boolean> internalUI = WidgetProperties.selection().observe(getInternalAnnotationBox());
	dataBindingContext.bindValue(internalUI, internalValue);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:34,代码来源:AccessModifierComponent.java

示例12: setupBindings

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
private void setupBindings() {
	@SuppressWarnings("unchecked")
	IObservableValue<String> nameValue = BeanProperties
			.value(NamedModel.class, N4JSClassifierWizardModel.NAME_PROPERTY).observe(model);
	@SuppressWarnings("unchecked")
	IObservableValue<String> nameUI = WidgetProperties.text(SWT.Modify).observe(nameText);
	getDataBindingContext().bindValue(nameValue, nameUI);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:9,代码来源:NameComponent.java

示例13: initDefaultCreateGreeterBindings

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void initDefaultCreateGreeterBindings(DataBindingContext dbc, Button createGreeterFileButton) {
	// Bind the "create greeter file"-checkbox
	dbc.bindValue(WidgetProperties.selection().observe(createGreeterFileButton),
			BeanProperties.value(N4MFProjectInfo.class, N4MFProjectInfo.CREATE_GREETER_FILE_PROP_NAME)
					.observe(projectInfo));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:N4MFWizardNewProjectCreationPage.java

示例14: initTestProjectBinding

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void initTestProjectBinding(DataBindingContext dbc, Button addNormalSourceFolderButton,
		Button createTestGreeterFileButton) {
	// Bind the "normal source folder"-checkbox
	dbc.bindValue(WidgetProperties.selection().observe(addNormalSourceFolderButton),
			PojoProperties.value(N4MFProjectInfo.class, N4MFProjectInfo.ADDITIONAL_NORMAL_SOURCE_FOLDER_PROP_NAME)
					.observe(projectInfo));

	// Bind the "Create greeter file"-checkbox
	dbc.bindValue(WidgetProperties.selection().observe(createTestGreeterFileButton),
			BeanProperties.value(N4MFProjectInfo.class, N4MFProjectInfo.CREATE_GREETER_FILE_PROP_NAME)
					.observe(projectInfo));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:14,代码来源:N4MFWizardNewProjectCreationPage.java

示例15: addListenerTo

import org.eclipse.core.databinding.beans.BeanProperties; //导入依赖的package包/类
@Override
protected void addListenerTo ( final Object next )
{
    if ( next instanceof KeyProvider )
    {
        listenTo ( next, BeanProperties.value ( KeyProvider.class, Locked.PROP_LOCKED ) );
    }
    else if ( next instanceof org.eclipse.scada.sec.ui.providers.Key )
    {
        listenTo ( next, BeanProperties.value ( org.eclipse.scada.sec.ui.providers.Key.class, Locked.PROP_LOCKED ) );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:13,代码来源:LabelProviderImpl.java


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