首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 结合模型网格的列表的字段对象设置轻便实用工具类

结合模型网格的列表的字段对象设置轻便实用工具类

资 源 简 介

Provides a small set of useful binding classes. One of the more useful classes, ListStoreBinding, allows you to easily bind a Grid to an EventList. An EventList implements java.util.List and adds support for firing list change events. ``` Grid grid = new Grid(store,columnModel); EventList list = new EventList(); ListStoreBinding binding = new ListStoreBinding(store); binding.setConverter(new BeanModelConverter()); binding.bind(list); ``` Person implements BeanModelTag so we use the built in BeanModelConverter to convert from Person objects to BeanModels and vice versa. With the two-way binding in place, you can add and remove People from the Grid by simply writing: ``` list.add(new Person("John Smith")); // remove the first person list.remove(0); ``` Of course, you can also add and remove a BeanModel from the ListStore, and the EventList will be updated

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
  • 杨波 1小时前 成为了本站会员

  • ZS 1小时前 成为了本站会员

  • . 1天前 成为了本站会员

  • 奋斗 1天前 成为了本站会员

  • 1天前 成为了本站会员

  • 一天不玩浑身难受 2天前 成为了本站会员

  • Aloha 2天前 成为了本站会员

  • 嘻嘻嘻 2天前 成为了本站会员

  • maihaoweilai 2天前 成为了本站会员

  • 紫麟鹿 2天前 成为了本站会员