01: /* $Id: BeanColumnModel.java 718 2006-10-24 09:19:20Z hengels $ */
02: package org.conform.wings;
03:
04: import org.conform.*;
05: import org.wingx.table.XDefaultTableColumnModel;
06:
07: import java.util.*;
08:
09: public class BeanColumnModel extends XDefaultTableColumnModel {
10: private BeanMeta beanMeta;
11:
12: public BeanColumnModel() {
13: }
14:
15: public BeanColumnModel(BeanMeta beanMeta) {
16: setBeanMeta(beanMeta);
17: }
18:
19: public BeanMeta getBeanMeta() {
20: return beanMeta;
21: }
22:
23: protected void setBeanMeta(BeanMeta beanMeta) {
24: this .beanMeta = beanMeta;
25:
26: List columns = (List) getColumns();
27: columns.clear();
28: columns.addAll(ComponentFactory.INSTANCE
29: .createTableColumns(beanMeta));
30: }
31: }
|