1.绑定comboviewer到对象集合:
IObservableList list = BeansObservables.observeList(model, ChoiceStationModel.Property.carparkList.name()); ViewerSupport.bind(createComboViewer, list, BeanProperties.value(Carpark.Property.name.name()));
2.绑定comboviewer到基本类型集合
IObservableList list2 = BeansObservables.observeList(model, ChoiceStationModel.Property.stationList.name()); ViewerSupport.bind(createComboViewer2, list2, Properties.selfValue(String.class));
3.绑定tableviewer到对象集合
IObservableList list4 = BeansObservables.observeList(model, ChoiceStationModel.Property.descriminationDeviceList.name()); ViewerSupport.bind(tableViewer2, list4, BeanProperties.values(new String[]{ CarparkPlateDescriminateDevice.Property.ip.name(), CarparkPlateDescriminateDevice.Property.firstChannelName.name(), CarparkPlateDescriminateDevice.Property.firstChannel.name(), CarparkPlateDescriminateDevice.Property.secondChannelName.name(), CarparkPlateDescriminateDevice.Property.secondChannel.name(), }));
swt jface 数据绑定
时间: 2024-11-05 22:33:34