1:
37:
38:
39: package ;
40:
41: import ;
42: import ;
43: import ;
44:
45: import ;
46:
47:
58: public class CupsMediaMapping
59: {
60:
61: private static final HashMap ippByCups = new HashMap();
62:
63:
66: static
67: {
68: ippByCups.put("Postcard", MediaSizeName.JAPANESE_POSTCARD);
69: ippByCups.put("Statement", MediaSizeName.INVOICE);
70:
71: ippByCups.put("Letter", MediaSizeName.NA_LETTER);
72: ippByCups.put("Executive", MediaSizeName.EXECUTIVE);
73: ippByCups.put("Legal", MediaSizeName.NA_LEGAL);
74:
75: ippByCups.put("A0", MediaSizeName.ISO_A0);
76: ippByCups.put("A1", MediaSizeName.ISO_A1);
77: ippByCups.put("A2", MediaSizeName.ISO_A2);
78: ippByCups.put("A3", MediaSizeName.ISO_A3);
79: ippByCups.put("A4", MediaSizeName.ISO_A4);
80: ippByCups.put("A5", MediaSizeName.ISO_A5);
81: ippByCups.put("A6", MediaSizeName.ISO_A6);
82: ippByCups.put("A7", MediaSizeName.ISO_A7);
83: ippByCups.put("A8", MediaSizeName.ISO_A8);
84: ippByCups.put("A9", MediaSizeName.ISO_A9);
85: ippByCups.put("A10", MediaSizeName.ISO_A10);
86:
87: ippByCups.put("B0", MediaSizeName.JIS_B0);
88: ippByCups.put("B1", MediaSizeName.JIS_B1);
89: ippByCups.put("B2", MediaSizeName.JIS_B2);
90: ippByCups.put("B3", MediaSizeName.JIS_B3);
91: ippByCups.put("B4", MediaSizeName.JIS_B4);
92: ippByCups.put("B5", MediaSizeName.JIS_B5);
93: ippByCups.put("B6", MediaSizeName.JIS_B6);
94: ippByCups.put("B7", MediaSizeName.JIS_B7);
95: ippByCups.put("B8", MediaSizeName.JIS_B8);
96: ippByCups.put("B9", MediaSizeName.JIS_B9);
97: ippByCups.put("B10", MediaSizeName.JIS_B10);
98:
99: ippByCups.put("ISOB0", MediaSizeName.ISO_B0);
100: ippByCups.put("ISOB1", MediaSizeName.ISO_B1);
101: ippByCups.put("ISOB2", MediaSizeName.ISO_B2);
102: ippByCups.put("ISOB3", MediaSizeName.ISO_B3);
103: ippByCups.put("ISOB4", MediaSizeName.ISO_B4);
104: ippByCups.put("ISOB5", MediaSizeName.ISO_B5);
105: ippByCups.put("ISOB6", MediaSizeName.ISO_B6);
106: ippByCups.put("ISOB7", MediaSizeName.ISO_B7);
107: ippByCups.put("ISOB8", MediaSizeName.ISO_B8);
108: ippByCups.put("ISOB9", MediaSizeName.ISO_B9);
109: ippByCups.put("ISOB10", MediaSizeName.ISO_B10);
110: ippByCups.put("EnvISOB0", MediaSizeName.ISO_B0);
111: ippByCups.put("EnvISOB1", MediaSizeName.ISO_B1);
112: ippByCups.put("EnvISOB2", MediaSizeName.ISO_B2);
113: ippByCups.put("EnvISOB3", MediaSizeName.ISO_B3);
114: ippByCups.put("EnvISOB4", MediaSizeName.ISO_B4);
115: ippByCups.put("EnvISOB5", MediaSizeName.ISO_B5);
116: ippByCups.put("EnvISOB6", MediaSizeName.ISO_B6);
117: ippByCups.put("EnvISOB7", MediaSizeName.ISO_B7);
118: ippByCups.put("EnvISOB8", MediaSizeName.ISO_B8);
119: ippByCups.put("EnvISOB9", MediaSizeName.ISO_B9);
120: ippByCups.put("EnvISOB10", MediaSizeName.ISO_B10);
121:
122: ippByCups.put("C0", MediaSizeName.ISO_C0);
123: ippByCups.put("C1", MediaSizeName.ISO_C1);
124: ippByCups.put("C2", MediaSizeName.ISO_C2);
125: ippByCups.put("C3", MediaSizeName.ISO_C3);
126: ippByCups.put("C4", MediaSizeName.ISO_C4);
127: ippByCups.put("C5", MediaSizeName.ISO_C5);
128: ippByCups.put("C6", MediaSizeName.ISO_C6);
129:
130: ippByCups.put("EnvPersonal", MediaSizeName.PERSONAL_ENVELOPE);
131: ippByCups.put("EnvMonarch", MediaSizeName.MONARCH_ENVELOPE);
132: ippByCups.put("Monarch", MediaSizeName.MONARCH_ENVELOPE);
133: ippByCups.put("Env9", MediaSizeName.NA_NUMBER_9_ENVELOPE);
134: ippByCups.put("Env10", MediaSizeName.NA_NUMBER_10_ENVELOPE);
135: ippByCups.put("Env11", MediaSizeName.NA_NUMBER_11_ENVELOPE);
136: ippByCups.put("Env12", MediaSizeName.NA_NUMBER_12_ENVELOPE);
137: ippByCups.put("Env14", MediaSizeName.NA_NUMBER_14_ENVELOPE);
138: ippByCups.put("c8x10", MediaSizeName.NA_8X10);
139:
140: ippByCups.put("EnvDL", MediaSizeName.ISO_DESIGNATED_LONG);
141: ippByCups.put("DL", MediaSizeName.ISO_DESIGNATED_LONG);
142: ippByCups.put("EnvC0", MediaSizeName.ISO_C0);
143: ippByCups.put("EnvC1", MediaSizeName.ISO_C1);
144: ippByCups.put("EnvC2", MediaSizeName.ISO_C2);
145: ippByCups.put("EnvC3", MediaSizeName.ISO_C3);
146: ippByCups.put("EnvC4", MediaSizeName.ISO_C4);
147: ippByCups.put("EnvC5", MediaSizeName.ISO_C5);
148: ippByCups.put("EnvC6", MediaSizeName.ISO_C6);
149: }
150:
151:
157: public static final String getIppName(String cupsName)
158: {
159: return (String) ippByCups.get(cupsName);
160: }
161:
162:
167: public static final Map getMappingMap()
168: {
169: return Collections.unmodifiableMap(ippByCups);
170: }
171:
172: private CupsMediaMapping()
173: {
174:
175: }
176: }