swt jface 数据绑定

时间:2014-06-28 11:51:10   收藏:0   阅读:324

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 数据绑定,布布扣,bubuko.com

原文:http://www.cnblogs.com/panmingzhi815/p/3798875.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!