本文整理汇总了Java中org.eclipse.core.databinding.beans.BeansObservables.observeMaps方法的典型用法代码示例。如果您正苦于以下问题:Java BeansObservables.observeMaps方法的具体用法?Java BeansObservables.observeMaps怎么用?Java BeansObservables.observeMaps使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.core.databinding.beans.BeansObservables
的用法示例。
在下文中一共展示了BeansObservables.observeMaps方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initDataBindings
import org.eclipse.core.databinding.beans.BeansObservables; //导入方法依赖的package包/类
protected DataBindingContext initDataBindings(){
DataBindingContext bindingContext = new DataBindingContext();
tableViewerContacts.setContentProvider(contentProvider);
IObservableMap[] observeMaps =
BeansObservables.observeMaps(contentProvider.getKnownElements(), IContact.class,
new String[] {
"description1", "description2", "mandator", "patient", "user"
});
ILabelDecorator decorator =
PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator();
tableViewerContacts.setLabelProvider(new TableDecoratingLabelProvider(
new ContactSelectorObservableMapLabelProvider(observeMaps), decorator));
tableViewerContacts.setInput(contactList);
return bindingContext;
}
示例2: initDataBindings
import org.eclipse.core.databinding.beans.BeansObservables; //导入方法依赖的package包/类
protected DataBindingContext initDataBindings() {
DataBindingContext bindingContext = new DataBindingContext();
//
ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
IObservableMap[] observeMaps = BeansObservables.observeMaps(listContentProvider.getKnownElements(), Preference.class, new String[]{"name", "value"});
preferencesViewer.setLabelProvider(new ObservableMapLabelProvider(observeMaps));
preferencesViewer.setContentProvider(listContentProvider);
//
IObservableList preferencesGetWidgetObserveList = BeanProperties.list("preferences").observe(getWidget());
preferencesViewer.setInput(preferencesGetWidgetObserveList);
//
ObservableListContentProvider listContentProvider_1 = new ObservableListContentProvider();
IObservableMap[] observeMaps_1 = BeansObservables.observeMaps(listContentProvider_1.getKnownElements(), Access.class, new String[]{"origin", "subdomains", "browserOnly"});
accessViewer.setLabelProvider(new ObservableMapLabelProvider(observeMaps_1));
accessViewer.setContentProvider(listContentProvider_1);
//
IObservableList accessesGetWidgetObserveList = BeanProperties.list("accesses").observe(getWidget());
accessViewer.setInput(accessesGetWidgetObserveList);
//
ObservableListContentProvider listContentProvider_2 = new ObservableListContentProvider();
IObservableMap[] observeMapsPlugin = BeansObservables.observeMaps(listContentProvider_2.getKnownElements(), Plugin.class, new String[]{"name", "spec"});
featuresTableViewer.setLabelProvider(new ObservableMapLabelProvider(observeMapsPlugin));
featuresTableViewer.setContentProvider(listContentProvider_2);
//
IObservableList featuresGetWidgetObserveList = BeanProperties.list("plugins").observe(getWidget());
featuresTableViewer.setInput(featuresGetWidgetObserveList);
//
return bindingContext;
}