1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kns.web.ui;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21
22
23
24 public class Row implements java.io.Serializable {
25
26 private static final long serialVersionUID = 5920833652172097098L;
27 private List<Field> fields;
28 private boolean hidden;
29
30 public Row() {
31 fields = new ArrayList<Field>();
32 hidden = false;
33 }
34
35 public Row(List<Field> fields) {
36 this.fields = fields;
37 hidden = false;
38 }
39
40 public Row(Field field) {
41 this.fields = new ArrayList<Field>();
42 fields.add(field);
43 hidden = false;
44 }
45
46
47
48
49 public List<Field> getFields() {
50 return fields;
51 }
52
53
54
55
56 public void setFields(List<Field> fields) {
57 this.fields = fields;
58 }
59
60
61
62
63 public boolean isHidden() {
64 return hidden;
65 }
66
67
68
69
70 public void setHidden(boolean hidden) {
71 this.hidden = hidden;
72 }
73
74 public Field getField(int index) {
75 while (fields.size() <= index) {
76 Field field = new Field();
77 fields.add(field);
78 }
79 return (Field) fields.get(index);
80 }
81
82 public String toString(){
83 StringBuffer sRet = new StringBuffer();
84 sRet.append("[");
85
86 if(fields != null){
87 for(Field f: fields){
88 sRet.append(f.getPropertyName() + ", ");
89 }
90
91 sRet.delete(sRet.length()-2, sRet.length());
92 }
93 sRet.append("]");
94
95 return sRet.toString();
96
97 }
98 }