码迷,mamicode.com
首页 > 其他好文 > 详细

swt jface 数据绑定

时间:2014-06-28 11:53:33      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   color   数据      

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 数据绑定

标签:des   style   blog   color   数据      

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!