Sheet.java
3.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
package com.taover.easyexcel.metadata;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* @author jipengfei
* @deprecated pleas use {@link com.taover.easyexcel.write.metadata.WriteSheet} or
* {@link com.taover.easyexcel.read.metadata.ReadSheet}
*/
@Deprecated
public class Sheet {
/**
*/
private int headLineMun;
/**
* Starting from 1
*/
private int sheetNo;
/**
*/
private String sheetName;
/**
*/
private Class<? extends BaseRowModel> clazz;
/**
*/
private List<List<String>> head;
/**
*
*/
private TableStyle tableStyle;
/**
* column with
*/
private Map<Integer, Integer> columnWidthMap = new HashMap<Integer, Integer>();
/**
*
*/
private Boolean autoWidth = Boolean.FALSE;
/**
*
*/
private int startRow = 0;
public Sheet(int sheetNo) {
this.sheetNo = sheetNo;
}
public Sheet(int sheetNo, int headLineMun) {
this.sheetNo = sheetNo;
this.headLineMun = headLineMun;
}
public Sheet(int sheetNo, int headLineMun, Class<? extends BaseRowModel> clazz) {
this.sheetNo = sheetNo;
this.headLineMun = headLineMun;
this.clazz = clazz;
}
public Sheet(int sheetNo, int headLineMun, Class<? extends BaseRowModel> clazz, String sheetName,
List<List<String>> head) {
this.sheetNo = sheetNo;
this.clazz = clazz;
this.headLineMun = headLineMun;
this.sheetName = sheetName;
this.head = head;
}
public List<List<String>> getHead() {
return head;
}
public void setHead(List<List<String>> head) {
this.head = head;
}
public Class<? extends BaseRowModel> getClazz() {
return clazz;
}
public void setClazz(Class<? extends BaseRowModel> clazz) {
this.clazz = clazz;
if (headLineMun == 0) {
this.headLineMun = 1;
}
}
public int getHeadLineMun() {
return headLineMun;
}
public void setHeadLineMun(int headLineMun) {
this.headLineMun = headLineMun;
}
public int getSheetNo() {
return sheetNo;
}
public void setSheetNo(int sheetNo) {
this.sheetNo = sheetNo;
}
public String getSheetName() {
return sheetName;
}
public void setSheetName(String sheetName) {
this.sheetName = sheetName;
}
public TableStyle getTableStyle() {
return tableStyle;
}
public void setTableStyle(TableStyle tableStyle) {
this.tableStyle = tableStyle;
}
public Map<Integer, Integer> getColumnWidthMap() {
return columnWidthMap;
}
public void setColumnWidthMap(Map<Integer, Integer> columnWidthMap) {
this.columnWidthMap = columnWidthMap;
}
@Override
public String toString() {
return "Sheet{" + "headLineMun=" + headLineMun + ", sheetNo=" + sheetNo + ", sheetName='" + sheetName + '\''
+ ", clazz=" + clazz + ", head=" + head + ", tableStyle=" + tableStyle + ", columnWidthMap="
+ columnWidthMap + '}';
}
public Boolean getAutoWidth() {
return autoWidth;
}
public void setAutoWidth(Boolean autoWidth) {
this.autoWidth = autoWidth;
}
public int getStartRow() {
return startRow;
}
public void setStartRow(int startRow) {
this.startRow = startRow;
}
}