本文整理汇总了Java中org.eclipse.core.databinding.beans.PojoObservables.observeMap方法的典型用法代码示例。如果您正苦于以下问题:Java PojoObservables.observeMap方法的具体用法?Java PojoObservables.observeMap怎么用?Java PojoObservables.observeMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.core.databinding.beans.PojoObservables
的用法示例。
在下文中一共展示了PojoObservables.observeMap方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initPaaS
import org.eclipse.core.databinding.beans.PojoObservables; //导入方法依赖的package包/类
private void initPaaS (Specification specification)
{
List<? extends PlatformServiceDescriptor> paaSDescriptors = null;
if (specification instanceof CloudSpecification)
paaSDescriptors = OverviewHelper.getPaaSRuntimeDescriptors((CloudSpecification)specification);
else if (specification instanceof ServiceSpecification)
paaSDescriptors = OverviewHelper.getPlatformDescriptors((ServiceSpecification)specification, false, true);
ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
IObservableMap observeMap = PojoObservables.observeMap(listContentProvider.getKnownElements(), ProvidedPlatformRuntimeServiceDescriptor.class, "name");
cvPaaS.setLabelProvider(new ObservableMapLabelProvider(observeMap));
cvPaaS.setContentProvider(listContentProvider);
IObservableList selfList = Properties.selfList(CloudSpecification.class).observe(paaSDescriptors);
cvPaaS.setInput(selfList);
// set default selection
if (!paaSDescriptors.isEmpty())
{
final ISelection selection = new StructuredSelection(paaSDescriptors.get(0));
cvPaaS.setSelection(selection);
}
}
示例2: initBindings
import org.eclipse.core.databinding.beans.PojoObservables; //导入方法依赖的package包/类
private void initBindings ()
{
operationInterfaces.clear();
operationInterfaces.addAll(this.softwareService.getRequiredInterfaces());
ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
IObservableMap observeMap = PojoObservables.observeMap(listContentProvider.getKnownElements(), OperationInterface.class, "name");
listViewer.setLabelProvider(new ObservableMapLabelProvider(observeMap));
listViewer.setContentProvider(listContentProvider);
//
//IObservableList selfList = Properties.selfList(OperationInterface.class).observe(operationInterfaces);
listViewer.setInput(oiInput);
}
示例3: initOperationInterfacesBindings
import org.eclipse.core.databinding.beans.PojoObservables; //导入方法依赖的package包/类
protected void initOperationInterfacesBindings(DataBindingContext bindingContext) {
ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
IObservableMap observeMap = PojoObservables.observeMap(listContentProvider.getKnownElements(), OperationInterface.class, "name");
lvOperations.setLabelProvider(new ObservableMapLabelProvider(observeMap));
lvOperations.setContentProvider(listContentProvider);
//
//IObservableList selfList = Properties.selfList(OperationInterface.class).observe(operationInterfaces);
lvOperations.setInput(oiInput);
}
示例4: initDataBindings
import org.eclipse.core.databinding.beans.PojoObservables; //导入方法依赖的package包/类
protected DataBindingContext initDataBindings() {
DataBindingContext bindingContext = new DataBindingContext();
//
ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
IObservableMap observeMap = PojoObservables.observeMap(listContentProvider.getKnownElements(), PlatformRuntimeService.class, "name");
listViewer.setLabelProvider(new ObservableMapLabelProvider(observeMap));
listViewer.setContentProvider(listContentProvider);
//
IObservableList selfList = Properties.selfList(PlatformRuntimeService.class).observe(runtimeServices);
listViewer.setInput(selfList);
//
return bindingContext;
}
示例5: updateXaaSSelection
import org.eclipse.core.databinding.beans.PojoObservables; //导入方法依赖的package包/类
private void updateXaaSSelection()
{
if (rbIaaS.getSelection())
this.cloudSpecifications = OverviewHelper.getCloudSpecificationsIaaS();
else if (rbPaaS.getSelection())
this.cloudSpecifications = OverviewHelper.getCloudSpecificationsPaaS();
//lblPlatformService.setEnabled(rbPaaS.getSelection());
//cbPaaS.setEnabled(rbPaaS.getSelection());
cvPaaS.setSelection(null);
//
// Add CloudSpecifications to combo
//
ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
IObservableMap observeMap = PojoObservables.observeMap(listContentProvider.getKnownElements(), CloudSpecification.class, "descriptor.name");
comboViewer.setLabelProvider(new ObservableMapLabelProvider(observeMap));
comboViewer.setContentProvider(listContentProvider);
IObservableList selfList = Properties.selfList(CloudSpecification.class).observe(cloudSpecifications);
comboViewer.setInput(selfList);
// set default selection
if (!cloudSpecifications.isEmpty())
{
final ISelection selection = new StructuredSelection(cloudSpecifications.get(0));
comboViewer.setSelection(selection);
}
}
示例6: bindComputingResources
import org.eclipse.core.databinding.beans.PojoObservables; //导入方法依赖的package包/类
private void bindComputingResources (DataBindingContext bindingContext)
{
//
ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
IObservableMap observeMap = PojoObservables.observeMap(listContentProvider.getKnownElements(), ComputingResourceDescriptor.class, "name");
cvComputingResource.setLabelProvider(new ObservableMapLabelProvider(observeMap));
cvComputingResource.setContentProvider(listContentProvider);
//
IObservableList computingResourceDescriptorsCisdObserveList = PojoProperties.list("computingResourceDescriptors").observeDetail(valueComputingInfrastructureServiceDescriptor);
cvComputingResource.setInput(computingResourceDescriptorsCisdObserveList);
//
IObservableValue observeSingleSelectionCvComputingResource = ViewerProperties.singleSelection().observe(cvComputingResource);
IObservableValue computingEnvironmentinstanceDescriptorRuntimeDeploymentObserveValue = PojoProperties.value("instanceDescriptor").observe(valueComputingEnvironment);
bindingContext.bindValue(observeSingleSelectionCvComputingResource, computingEnvironmentinstanceDescriptorRuntimeDeploymentObserveValue, null, null);
cvComputingResource.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
ComputingResourceDescriptor crd = (ComputingResourceDescriptor) ((IStructuredSelection)event.getSelection()).getFirstElement();
valueComputingResourceDescriptor.setValue(crd);
updateComputingResourceFields(crd);
}
});;
}
示例7: initDataBindings
import org.eclipse.core.databinding.beans.PojoObservables; //导入方法依赖的package包/类
protected void initDataBindings() {
DataBindingContext bindingContext = new DataBindingContext();
IObservableMap gdt6302ValuesObserveMap = PojoObservables.observeMap(
gdt6302, "values", Integer.class, String.class);
Text[] control = { txtPatientenKennung, txtPatientNachname,
txtPatientVorname, txtIDReceiver, txtIDSender, txtGewicht,
txtGroesse, txtGuVK, txtMuttersprache, txtOrt, txtStrasse,
txtTitel, txtVersichertenNr, txtTestIdent };
int[] property = {
GDTConstants.FELDKENNUNG_PATIENT_KENNUNG,
GDTConstants.FELDKENNUNG_PATIENT_NAME,
GDTConstants.FELDKENNUNG_PATIENT_VORNAME,
GDTConstants.FELDKENNUNG_GDT_ID_EMPFAENGER,
GDTConstants.FELDKENNUNG_GDT_ID_SENDER,
GDTConstants.FELDKENNUNG_PATIENT_GEWICHT,
GDTConstants.FELDKENNUNG_PATIENT_GROESSE,
GDTConstants.FELDKENNUNG_GERAETE_UND_VERFAHRENSSPEZIFISCHES_KENNFELD,
GDTConstants.FELDKENNUNG_PATIENT_MUTTERSPRACHE,
GDTConstants.FELDKENNUNG_PATIENT_WOHNORT,
GDTConstants.FELDKENNUNG_PATIENT_STRASSE,
GDTConstants.FELDKENNUNG_PATIENT_TITEL,
GDTConstants.FELDKENNUNG_PATIENT_VERSICHERTENNUMMER,
GDTConstants.FELDKENNUNG_TEST_IDENT };
for (int i = 0; i < control.length; i++) {
bindMapValue(control[i], property[i], bindingContext,
gdt6302ValuesObserveMap);
}
IObservableValue widgetValueGeschlecht = ViewerProperties
.singleSelection().observe(comboViewerGeschlecht);
IObservableValue observableMapValueGeschlecht = Observables
.observeMapEntry(gdt6302ValuesObserveMap,
GDTConstants.FELDKENNUNG_PATIENT_GESCHLECHT,
String.class);
bindingContext.bindValue(widgetValueGeschlecht,
observableMapValueGeschlecht);
IObservableValue widgetValueVersichertenart = ViewerProperties
.singleSelection().observe(comboViewerVersichertenart);
IObservableValue observableMapValueVersichertenart = Observables
.observeMapEntry(gdt6302ValuesObserveMap,
GDTConstants.FELDKENNUNG_PATIENT_VERSICHERTENART,
String.class);
bindingContext.bindValue(widgetValueVersichertenart,
observableMapValueVersichertenart);
IObservableValue widgetValueGeburtstag = new DateTimeObservableValue(
dateTimeBirthday);
IObservableValue observableValueGeburtstag = Observables
.observeMapEntry(gdt6302ValuesObserveMap,
GDTConstants.FELDKENNUNG_PATIENT_GEBURTSDATUM,
String.class);
UpdateValueStrategy geburtstagUvs = new UpdateValueStrategy();
geburtstagUvs.setConverter(new DateTimeTargetToModelUVS());
Binding bday = bindingContext.bindValue(widgetValueGeburtstag,
observableValueGeburtstag, geburtstagUvs, null);
bday.updateTargetToModel();
}
示例8: initDataBindings
import org.eclipse.core.databinding.beans.PojoObservables; //导入方法依赖的package包/类
protected void initDataBindings() {
DataBindingContext bindingContext = new DataBindingContext();
IObservableMap gdt6301ValuesObserveMap = PojoObservables.observeMap(
gdt6301, "values", Integer.class, String.class);
Text[] control = { txtPatientenKennung, txtPatientNachname,
txtPatientVorname, txtIDReceiver, txtIDSender, txtGewicht,
txtGroesse, txtMuttersprache, txtOrt, txtStrasse,
txtTitel, txtVersichertenNr };
int[] property = {
GDTConstants.FELDKENNUNG_PATIENT_KENNUNG,
GDTConstants.FELDKENNUNG_PATIENT_NAME,
GDTConstants.FELDKENNUNG_PATIENT_VORNAME,
GDTConstants.FELDKENNUNG_GDT_ID_EMPFAENGER,
GDTConstants.FELDKENNUNG_GDT_ID_SENDER,
GDTConstants.FELDKENNUNG_PATIENT_GEWICHT,
GDTConstants.FELDKENNUNG_PATIENT_GROESSE,
GDTConstants.FELDKENNUNG_PATIENT_MUTTERSPRACHE,
GDTConstants.FELDKENNUNG_PATIENT_WOHNORT,
GDTConstants.FELDKENNUNG_PATIENT_STRASSE,
GDTConstants.FELDKENNUNG_PATIENT_TITEL,
GDTConstants.FELDKENNUNG_PATIENT_VERSICHERTENNUMMER };
for (int i = 0; i < control.length; i++) {
bindMapValue(control[i], property[i], bindingContext,
gdt6301ValuesObserveMap);
}
IObservableValue widgetValueGeschlecht = ViewerProperties
.singleSelection().observe(comboViewerGeschlecht);
IObservableValue observableMapValueGeschlecht = Observables
.observeMapEntry(gdt6301ValuesObserveMap,
GDTConstants.FELDKENNUNG_PATIENT_GESCHLECHT,
String.class);
bindingContext.bindValue(widgetValueGeschlecht,
observableMapValueGeschlecht);
IObservableValue widgetValueVersichertenart = ViewerProperties
.singleSelection().observe(comboViewerVersichertenart);
IObservableValue observableMapValueVersichertenart = Observables
.observeMapEntry(gdt6301ValuesObserveMap,
GDTConstants.FELDKENNUNG_PATIENT_VERSICHERTENART,
String.class);
bindingContext.bindValue(widgetValueVersichertenart,
observableMapValueVersichertenart);
IObservableValue widgetValueGeburtstag = new DateTimeObservableValue(
dateTimeBirthday);
IObservableValue observableValueGeburtstag = Observables
.observeMapEntry(gdt6301ValuesObserveMap,
GDTConstants.FELDKENNUNG_PATIENT_GEBURTSDATUM,
String.class);
UpdateValueStrategy geburtstagUvs = new UpdateValueStrategy();
geburtstagUvs.setConverter(new DateTimeTargetToModelUVS());
Binding bday = bindingContext.bindValue(widgetValueGeburtstag,
observableValueGeburtstag, geburtstagUvs, null);
bday.updateTargetToModel();
}