首页 > 其他 > 详细

swt jface 数据绑定

时间:2014-06-28 11:51:10      阅读:323      评论:0      收藏:0      [点我收藏+]

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

swt jface 数据绑定

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!