1
2
3
4
5
6
7
8 package com.buckosoft.PicMan.domain;
9
10 import java.util.HashMap;
11
12
13
14
15
16
17 public class Poster implements Comparable<Poster> {
18 private int pid;
19 private String name;
20 private int masterMid;
21 private String outputPath;
22
23 private HashMap<String, String> config = new HashMap<String, String>();
24
25
26
27
28
29
30 public HashMap<String, String> getConfig() {
31 return config;
32 }
33
34
35
36
37 public void setConfig(HashMap<String, String> config) {
38 this.config = config;
39 }
40
41
42
43
44 public int getDpi() {
45 try {
46 if (this.config.containsKey("dpi"))
47 return(Integer.parseInt(this.config.get("dpi")));
48 } catch(Exception e) {}
49 return 0;
50 }
51
52
53
54
55 public void setDpi(int dpi) {
56 this.config.put("dpi", "" + dpi);
57 }
58
59
60
61
62 public double getPaperWidth() {
63 try {
64 if (this.config.containsKey("paperWidth"))
65 return(Double.parseDouble(this.config.get("paperWidth")));
66 } catch(Exception e) {}
67 return 0.0;
68 }
69
70
71
72
73 public void setPaperWidth(double paperWidth) {
74 this.config.put("paperWidth", "" + paperWidth);
75 }
76
77
78
79
80 public double getPaperHeight() {
81 try {
82 if (this.config.containsKey("paperHeight"))
83 return(Double.parseDouble(this.config.get("paperHeight")));
84 } catch(Exception e) {}
85 return 0.0;
86 }
87
88
89
90
91 public void setPaperHeight(double paperHeight) {
92 this.config.put("paperHeight", "" + paperHeight);
93 }
94
95
96
97
98 public double getMultiplier() {
99 try {
100 if (this.config.containsKey("multiplier"))
101 return(Double.parseDouble(this.config.get("multiplier")));
102 } catch(Exception e) {}
103 return 0.0;
104 }
105
106
107
108
109 public void setMultiplier(double multiplier) {
110 this.config.put("multiplier", "" + multiplier);
111 }
112
113
114
115
116 public double getProjectWidth() {
117 try {
118 if (this.config.containsKey("projectWidth"))
119 return(Double.parseDouble(this.config.get("projectWidth")));
120 } catch(Exception e) {}
121 return 0.0;
122 }
123
124
125
126
127 public void setProjectWidth(double projectWidth) {
128 this.config.put("projectWidth", "" + projectWidth);
129 }
130
131
132
133
134 public double getProjectHeight() {
135 try {
136 if (this.config.containsKey("projectHeight"))
137 return(Double.parseDouble(this.config.get("projectHeight")));
138 } catch(Exception e) {}
139 return 0.0;
140 }
141
142
143
144
145 public void setProjectHeight(double projectHeight) {
146 this.config.put("projectHeight", "" + projectHeight);
147 }
148
149 public int compareTo(Poster arg0) {
150 return(this.name.compareToIgnoreCase(arg0.name));
151 }
152
153
154
155
156
157 public int getOverSprayL() {
158 if (this.config.containsKey("overSprayL"))
159 return(Integer.parseInt(this.config.get("overSprayL")));
160 return(0);
161 }
162
163
164
165
166 public void setOverSprayL(int overSprayL) {
167 this.config.put("overSprayL", "" + overSprayL);
168 }
169
170
171
172
173 public int getOverSprayT() {
174 if (this.config.containsKey("overSprayT"))
175 return(Integer.parseInt(this.config.get("overSprayT")));
176 return(0);
177 }
178
179
180
181
182 public void setOverSprayT(int overSprayT) {
183 this.config.put("overSprayT", "" + overSprayT);
184 }
185
186
187
188
189 public int getOverSprayR() {
190 if (this.config.containsKey("overSprayR"))
191 return(Integer.parseInt(this.config.get("overSprayR")));
192 return(0);
193 }
194
195
196
197
198 public void setOverSprayR(int overSprayR) {
199 this.config.put("overSprayR", "" + overSprayR);
200 }
201
202
203
204
205 public int getOverSprayB() {
206 if (this.config.containsKey("overSprayB"))
207 return(Integer.parseInt(this.config.get("overSprayB")));
208 return(0);
209 }
210
211
212
213
214 public void setOverSprayB(int overSprayB) {
215 this.config.put("overSprayB", "" + overSprayB);
216 }
217
218
219
220
221 public int getMarginL() {
222 if (this.config.containsKey("marginL"))
223 return(Integer.parseInt(this.config.get("marginL")));
224 return(0);
225 }
226
227
228
229
230 public void setMarginL(int marginL) {
231 this.config.put("marginL", "" + marginL);
232 }
233
234
235
236
237 public int getMarginR() {
238 if (this.config.containsKey("marginR"))
239 return(Integer.parseInt(this.config.get("marginR")));
240 return(0);
241 }
242
243
244
245
246 public void setMarginR(int marginR) {
247 this.config.put("marginR", "" + marginR);
248 }
249
250
251
252
253 public int getMarginT() {
254 if (this.config.containsKey("marginT"))
255 return(Integer.parseInt(this.config.get("marginT")));
256 return(0);
257 }
258
259
260
261
262 public void setMarginT(int marginT) {
263 this.config.put("marginT", "" + marginT);
264 }
265
266
267
268
269 public int getMarginB() {
270 if (this.config.containsKey("marginB"))
271 return(Integer.parseInt(this.config.get("marginB")));
272 return(0);
273 }
274
275
276
277
278 public void setMarginB(int marginB) {
279 this.config.put("marginB", "" + marginB);
280 }
281
282
283
284
285 public int getPid() {
286 return pid;
287 }
288
289
290
291 public void setPid(int pid) {
292 this.pid = pid;
293 }
294
295
296
297
298 public String getName() {
299 return name;
300 }
301
302
303
304 public void setName(String name) {
305 this.name = name;
306 }
307
308
309
310
311 public int getMasterMid() {
312 return masterMid;
313 }
314
315
316
317 public void setMasterMid(int masterMid) {
318 this.masterMid = masterMid;
319 }
320
321
322
323
324 public String getOutputPath() {
325 return outputPath;
326 }
327
328
329
330 public void setOutputPath(String outputPath) {
331 this.outputPath = outputPath;
332 }
333
334
335 }