KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > print > attribute > standard > MediaSizeName


1 /*
2  * @(#)MediaSizeName.java 1.11 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package javax.print.attribute.standard;
8
9 import java.util.Locale JavaDoc;
10
11 import javax.print.attribute.EnumSyntax JavaDoc;
12 import javax.print.attribute.Attribute JavaDoc;
13
14 /**
15  * Class MediaSizeName is a subclass of Media.
16  * <P>
17  * This attribute can be used instead of specifying MediaName or MediaTray.
18  * <p>
19  * Class MediaSizeName currently declares a few standard media
20  * name values.
21  * <P>
22  * <B>IPP Compatibility:</B> MediaSizeName is a representation class for
23  * values of the IPP "media" attribute which names media sizes.
24  * The names of the media sizes correspond to those in the IPP 1.1 RFC
25  * <a HREF="http://www.ietf.org/rfc/rfc2911.txt">RFC 2911</a>
26  * <P>
27  *
28  */

29 public class MediaSizeName extends Media JavaDoc {
30
31     private static final long serialVersionUID = 2778798329756942747L;
32
33     /**
34      * A0 size.
35      */

36     public static final MediaSizeName JavaDoc ISO_A0 = new MediaSizeName JavaDoc(0);
37     /**
38      * A1 size.
39      */

40     public static final MediaSizeName JavaDoc ISO_A1 = new MediaSizeName JavaDoc(1);
41     /**
42      * A2 size.
43      */

44     public static final MediaSizeName JavaDoc ISO_A2 = new MediaSizeName JavaDoc(2);
45     /**
46      * A3 size.
47      */

48     public static final MediaSizeName JavaDoc ISO_A3 = new MediaSizeName JavaDoc(3);
49     /**
50      * A4 size.
51      */

52     public static final MediaSizeName JavaDoc ISO_A4 = new MediaSizeName JavaDoc(4);
53     /**
54      * A5 size.
55      */

56     public static final MediaSizeName JavaDoc ISO_A5 = new MediaSizeName JavaDoc(5);
57     /**
58      * A6 size.
59      */

60     public static final MediaSizeName JavaDoc ISO_A6 = new MediaSizeName JavaDoc(6);
61     /**
62      * A7 size.
63      */

64     public static final MediaSizeName JavaDoc ISO_A7 = new MediaSizeName JavaDoc(7);
65     /**
66      * A8 size.
67      */

68     public static final MediaSizeName JavaDoc ISO_A8 = new MediaSizeName JavaDoc(8);
69     /**
70      * A9 size.
71      */

72     public static final MediaSizeName JavaDoc ISO_A9 = new MediaSizeName JavaDoc(9);
73     /**
74      * A10 size.
75      */

76     public static final MediaSizeName JavaDoc ISO_A10 = new MediaSizeName JavaDoc(10);
77
78    /**
79      * ISO B0 size.
80      */

81     public static final MediaSizeName JavaDoc ISO_B0 = new MediaSizeName JavaDoc(11);
82     /**
83      * ISO B1 size.
84      */

85     public static final MediaSizeName JavaDoc ISO_B1 = new MediaSizeName JavaDoc(12);
86     /**
87      * ISO B2 size.
88      */

89     public static final MediaSizeName JavaDoc ISO_B2 = new MediaSizeName JavaDoc(13);
90     /**
91      * ISO B3 size.
92      */

93     public static final MediaSizeName JavaDoc ISO_B3 = new MediaSizeName JavaDoc(14);
94     /**
95      * ISO B4 size.
96      */

97     public static final MediaSizeName JavaDoc ISO_B4 = new MediaSizeName JavaDoc(15);
98     /**
99      * ISO B5 size.
100      */

101     public static final MediaSizeName JavaDoc ISO_B5 = new MediaSizeName JavaDoc(16);
102     /**
103      * ISO B6 size.
104      */

105     public static final MediaSizeName JavaDoc ISO_B6 = new MediaSizeName JavaDoc(17);
106     /**
107      * ISO B7 size.
108      */

109     public static final MediaSizeName JavaDoc ISO_B7 = new MediaSizeName JavaDoc(18);
110     /**
111      * ISO B8 size.
112      */

113     public static final MediaSizeName JavaDoc ISO_B8 = new MediaSizeName JavaDoc(19);
114     /**
115      * ISO B9 size.
116      */

117     public static final MediaSizeName JavaDoc ISO_B9 = new MediaSizeName JavaDoc(20);
118     /**
119      * ISO B10 size.
120      */

121     public static final MediaSizeName JavaDoc ISO_B10 = new MediaSizeName JavaDoc(21);
122
123    /**
124      * JIS B0 size.
125      */

126     public static final MediaSizeName JavaDoc JIS_B0 = new MediaSizeName JavaDoc(22);
127     /**
128      * JIS B1 size.
129      */

130     public static final MediaSizeName JavaDoc JIS_B1 = new MediaSizeName JavaDoc(23);
131     /**
132      * JIS B2 size.
133      */

134     public static final MediaSizeName JavaDoc JIS_B2 = new MediaSizeName JavaDoc(24);
135     /**
136      * JIS B3 size.
137      */

138     public static final MediaSizeName JavaDoc JIS_B3 = new MediaSizeName JavaDoc(25);
139     /**
140      * JIS B4 size.
141      */

142     public static final MediaSizeName JavaDoc JIS_B4 = new MediaSizeName JavaDoc(26);
143     /**
144      * JIS B5 size.
145      */

146     public static final MediaSizeName JavaDoc JIS_B5 = new MediaSizeName JavaDoc(27);
147     /**
148      * JIS B6 size.
149      */

150     public static final MediaSizeName JavaDoc JIS_B6 = new MediaSizeName JavaDoc(28);
151     /**
152      * JIS B7 size.
153      */

154     public static final MediaSizeName JavaDoc JIS_B7 = new MediaSizeName JavaDoc(29);
155     /**
156      * JIS B8 size.
157      */

158     public static final MediaSizeName JavaDoc JIS_B8 = new MediaSizeName JavaDoc(30);
159     /**
160      * JIS B9 size.
161      */

162     public static final MediaSizeName JavaDoc JIS_B9 = new MediaSizeName JavaDoc(31);
163     /**
164      * JIS B10 size.
165      */

166     public static final MediaSizeName JavaDoc JIS_B10 = new MediaSizeName JavaDoc(32);
167
168     /**
169      * ISO C0 size.
170      */

171     public static final MediaSizeName JavaDoc ISO_C0 = new MediaSizeName JavaDoc(33);
172     /**
173      * ISO C1 size.
174      */

175     public static final MediaSizeName JavaDoc ISO_C1 = new MediaSizeName JavaDoc(34);
176     /**
177      * ISO C2 size.
178      */

179     public static final MediaSizeName JavaDoc ISO_C2 = new MediaSizeName JavaDoc(35);
180     /**
181      * ISO C3 size.
182      */

183     public static final MediaSizeName JavaDoc ISO_C3 = new MediaSizeName JavaDoc(36);
184     /**
185      * ISO C4 size.
186      */

187     public static final MediaSizeName JavaDoc ISO_C4 = new MediaSizeName JavaDoc(37);
188     /**
189      * ISO C5 size.
190      */

191     public static final MediaSizeName JavaDoc ISO_C5 = new MediaSizeName JavaDoc(38);
192     /**
193      * letter size.
194      */

195     public static final MediaSizeName JavaDoc ISO_C6 = new MediaSizeName JavaDoc(39);
196     /**
197      * letter size.
198      */

199     public static final MediaSizeName JavaDoc NA_LETTER = new MediaSizeName JavaDoc(40);
200
201     /**
202      * legal size .
203      */

204     public static final MediaSizeName JavaDoc NA_LEGAL = new MediaSizeName JavaDoc(41);
205
206     /**
207      * executive size .
208      */

209     public static final MediaSizeName JavaDoc EXECUTIVE = new MediaSizeName JavaDoc(42);
210
211     /**
212      * ledger size .
213      */

214     public static final MediaSizeName JavaDoc LEDGER = new MediaSizeName JavaDoc(43);
215
216     /**
217      * tabloid size .
218      */

219     public static final MediaSizeName JavaDoc TABLOID = new MediaSizeName JavaDoc(44);
220
221     /**
222      * invoice size .
223      */

224     public static final MediaSizeName JavaDoc INVOICE = new MediaSizeName JavaDoc(45);
225
226     /**
227      * folio size .
228      */

229     public static final MediaSizeName JavaDoc FOLIO = new MediaSizeName JavaDoc(46);
230
231     /**
232      * quarto size .
233      */

234     public static final MediaSizeName JavaDoc QUARTO = new MediaSizeName JavaDoc(47);
235
236     /**
237      * Japanese Postcard size.
238      */

239     public static final MediaSizeName JavaDoc
240     JAPANESE_POSTCARD = new MediaSizeName JavaDoc(48);
241    /**
242      * Japanese Double Postcard size.
243      */

244     public static final MediaSizeName JavaDoc
245     JAPANESE_DOUBLE_POSTCARD = new MediaSizeName JavaDoc(49);
246
247     /**
248      * A size .
249      */

250     public static final MediaSizeName JavaDoc A = new MediaSizeName JavaDoc(50);
251
252     /**
253      * B size .
254      */

255     public static final MediaSizeName JavaDoc B = new MediaSizeName JavaDoc(51);
256
257     /**
258      * C size .
259      */

260     public static final MediaSizeName JavaDoc C = new MediaSizeName JavaDoc(52);
261
262     /**
263      * D size .
264      */

265     public static final MediaSizeName JavaDoc D = new MediaSizeName JavaDoc(53);
266
267     /**
268      * E size .
269      */

270     public static final MediaSizeName JavaDoc E = new MediaSizeName JavaDoc(54);
271
272     /**
273      * ISO designated long size .
274      */

275     public static final MediaSizeName JavaDoc
276     ISO_DESIGNATED_LONG = new MediaSizeName JavaDoc(55);
277
278     /**
279      * Italy envelope size .
280      */

281     public static final MediaSizeName JavaDoc
282     ITALY_ENVELOPE = new MediaSizeName JavaDoc(56); // DESIGNATED_LONG?
283

284     /**
285      * monarch envelope size .
286      */

287     public static final MediaSizeName JavaDoc
288     MONARCH_ENVELOPE = new MediaSizeName JavaDoc(57);
289     /**
290      * personal envelope size .
291      */

292     public static final MediaSizeName JavaDoc
293     PERSONAL_ENVELOPE = new MediaSizeName JavaDoc(58);
294     /**
295      * number 9 envelope size .
296      */

297     public static final MediaSizeName JavaDoc
298     NA_NUMBER_9_ENVELOPE = new MediaSizeName JavaDoc(59);
299     /**
300      * number 10 envelope size .
301      */

302     public static final MediaSizeName JavaDoc
303     NA_NUMBER_10_ENVELOPE = new MediaSizeName JavaDoc(60);
304     /**
305      * number 11 envelope size .
306      */

307     public static final MediaSizeName JavaDoc
308     NA_NUMBER_11_ENVELOPE = new MediaSizeName JavaDoc(61);
309     /**
310      * number 12 envelope size .
311      */

312     public static final MediaSizeName JavaDoc
313     NA_NUMBER_12_ENVELOPE = new MediaSizeName JavaDoc(62);
314     /**
315      * number 14 envelope size .
316      */

317     public static final MediaSizeName JavaDoc
318     NA_NUMBER_14_ENVELOPE = new MediaSizeName JavaDoc(63);
319    /**
320      * 6x9 North American envelope size.
321      */

322     public static final MediaSizeName JavaDoc
323     NA_6X9_ENVELOPE = new MediaSizeName JavaDoc(64);
324    /**
325      * 7x9 North American envelope size.
326      */

327     public static final MediaSizeName JavaDoc
328     NA_7X9_ENVELOPE = new MediaSizeName JavaDoc(65);
329    /**
330      * 9x11 North American envelope size.
331      */

332     public static final MediaSizeName JavaDoc
333     NA_9X11_ENVELOPE = new MediaSizeName JavaDoc(66);
334     /**
335      * 9x12 North American envelope size.
336      */

337     public static final MediaSizeName JavaDoc
338     NA_9X12_ENVELOPE = new MediaSizeName JavaDoc(67);
339
340     /**
341      * 10x13 North American envelope size .
342      */

343     public static final MediaSizeName JavaDoc
344     NA_10X13_ENVELOPE = new MediaSizeName JavaDoc(68);
345     /**
346      * 10x14North American envelope size .
347      */

348     public static final MediaSizeName JavaDoc
349     NA_10X14_ENVELOPE = new MediaSizeName JavaDoc(69);
350     /**
351      * 10x15 North American envelope size.
352      */

353     public static final MediaSizeName JavaDoc
354     NA_10X15_ENVELOPE = new MediaSizeName JavaDoc(70);
355
356     /**
357      * 5x7 North American paper.
358      */

359     public static final MediaSizeName JavaDoc
360     NA_5X7 = new MediaSizeName JavaDoc(71);
361
362     /**
363      * 8x10 North American paper.
364      */

365     public static final MediaSizeName JavaDoc
366     NA_8X10 = new MediaSizeName JavaDoc(72);
367
368     /**
369      * Construct a new media size enumeration value with the given integer
370      * value.
371      *
372      * @param value Integer value.
373      */

374     protected MediaSizeName(int value) {
375     super (value);
376     }
377
378     private static final String JavaDoc[] myStringTable = {
379         "iso-a0",
380         "iso-a1",
381         "iso-a2",
382         "iso-a3",
383         "iso-a4",
384         "iso-a5",
385         "iso-a6",
386         "iso-a7",
387         "iso-a8",
388         "iso-a9",
389         "iso-a10",
390         "iso-b0",
391         "iso-b1",
392         "iso-b2",
393         "iso-b3",
394         "iso-b4",
395         "iso-b5",
396         "iso-b6",
397         "iso-b7",
398         "iso-b8",
399         "iso-b9",
400         "iso-b10",
401         "jis-b0",
402         "jis-b1",
403         "jis-b2",
404         "jis-b3",
405         "jis-b4",
406         "jis-b5",
407         "jis-b6",
408         "jis-b7",
409         "jis-b8",
410         "jis-b9",
411         "jis-b10",
412         "iso-c0",
413         "iso-c1",
414         "iso-c2",
415         "iso-c3",
416         "iso-c4",
417         "iso-c5",
418         "iso-c6",
419         "na-letter",
420         "na-legal",
421         "executive",
422         "ledger",
423         "tabloid",
424         "invoice",
425         "folio",
426         "quarto",
427         "japanese-postcard",
428         "oufuko-postcard",
429         "a",
430         "b",
431         "c",
432         "d",
433         "e",
434         "iso-designated-long",
435         "italian-envelope",
436         "monarch-envelope",
437         "personal-envelope",
438         "na-number-9-envelope",
439         "na-number-10-envelope",
440         "na-number-11-envelope",
441         "na-number-12-envelope",
442         "na-number-14-envelope",
443         "na-6x9-envelope",
444         "na-7x9-envelope",
445         "na-9x11-envelope",
446         "na-9x12-envelope",
447         "na-10x13-envelope",
448         "na-10x14-envelope",
449         "na-10x15-envelope",
450         "na-5x7",
451         "na-8x10",
452     };
453
454     private static final MediaSizeName JavaDoc[] myEnumValueTable = {
455         ISO_A0,
456         ISO_A1,
457         ISO_A2,
458         ISO_A3,
459         ISO_A4,
460         ISO_A5,
461         ISO_A6,
462         ISO_A7,
463         ISO_A8,
464         ISO_A9,
465         ISO_A10,
466         ISO_B0,
467         ISO_B1,
468         ISO_B2,
469         ISO_B3,
470         ISO_B4,
471         ISO_B5,
472         ISO_B6,
473         ISO_B7,
474         ISO_B8,
475         ISO_B9,
476         ISO_B10,
477         JIS_B0,
478         JIS_B1,
479         JIS_B2,
480         JIS_B3,
481         JIS_B4,
482         JIS_B5,
483         JIS_B6,
484         JIS_B7,
485         JIS_B8,
486         JIS_B9,
487         JIS_B10,
488         ISO_C0,
489         ISO_C1,
490         ISO_C2,
491         ISO_C3,
492         ISO_C4,
493         ISO_C5,
494         ISO_C6,
495         NA_LETTER,
496         NA_LEGAL,
497         EXECUTIVE,
498         LEDGER,
499         TABLOID,
500         INVOICE,
501         FOLIO,
502         QUARTO,
503         JAPANESE_POSTCARD,
504         JAPANESE_DOUBLE_POSTCARD,
505         A,
506         B,
507         C,
508         D,
509         E,
510         ISO_DESIGNATED_LONG,
511         ITALY_ENVELOPE,
512         MONARCH_ENVELOPE,
513         PERSONAL_ENVELOPE,
514         NA_NUMBER_9_ENVELOPE,
515         NA_NUMBER_10_ENVELOPE,
516         NA_NUMBER_11_ENVELOPE,
517         NA_NUMBER_12_ENVELOPE,
518         NA_NUMBER_14_ENVELOPE,
519         NA_6X9_ENVELOPE,
520         NA_7X9_ENVELOPE,
521         NA_9X11_ENVELOPE,
522         NA_9X12_ENVELOPE,
523         NA_10X13_ENVELOPE,
524         NA_10X14_ENVELOPE,
525         NA_10X15_ENVELOPE,
526         NA_5X7,
527         NA_8X10,
528     };
529
530
531     /**
532      * Returns the string table for class MediaSizeName.
533      */

534     protected String JavaDoc[] getStringTable()
535     {
536     return (String JavaDoc[])myStringTable.clone();
537     }
538
539     /**
540      * Returns the enumeration value table for class MediaSizeName.
541      */

542     protected EnumSyntax JavaDoc[] getEnumValueTable() {
543     return (EnumSyntax JavaDoc[])myEnumValueTable.clone();
544     }
545
546
547 }
548
Popular Tags