|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 package javax.microedition.lcdui; |
|
18 |
|
19 import org.eclipse.swt.SWT; |
|
20 /** |
|
21 * Repository for text messages used in OpenLCDUI. String constants in this |
|
22 * class should begin with prefix "CLASSNAME_" where CLASSNAME is the name of |
|
23 * the class which is using the constant. |
|
24 */ |
|
25 final class MsgRepository { |
|
26 |
|
27 // Command labels: |
|
28 public static final String COMMAND_LABEL_SCREEN = |
|
29 OpenLcduiLocalization.getMessage("key_select"); |
|
30 |
|
31 public static final String COMMAND_LABEL_BACK = |
|
32 OpenLcduiLocalization.getMessage("back"); |
|
33 |
|
34 public static final String COMMAND_LABEL_CANCEL = |
|
35 SWT.getMessage("cancel"); |
|
36 |
|
37 public static final String COMMAND_LABEL_OK = |
|
38 SWT.getMessage("ok"); |
|
39 |
|
40 public static final String COMMAND_LABEL_HELP = |
|
41 OpenLcduiLocalization.getMessage("help"); |
|
42 |
|
43 public static final String COMMAND_LABEL_STOP = |
|
44 OpenLcduiLocalization.getMessage("key_stop"); |
|
45 |
|
46 public static final String COMMAND_LABEL_EXIT = |
|
47 OpenLcduiLocalization.getMessage("close"); |
|
48 |
|
49 public static final String COMMAND_LABEL_ITEM = |
|
50 OpenLcduiLocalization.getMessage("key_select"); |
|
51 |
|
52 // Alert texts: |
|
53 public static final String ALERT_DEFAULT_TEXT_ERROR = |
|
54 OpenLcduiLocalization.getMessage("alert_error"); |
|
55 |
|
56 public static final String ALERT_DEFAULT_TEXT_WARNING = |
|
57 OpenLcduiLocalization.getMessage("alert_warning"); |
|
58 |
|
59 public static final String ALERT_DEFAULT_TEXT_INFO = |
|
60 OpenLcduiLocalization.getMessage("alert_info"); |
|
61 |
|
62 public static final String ALERT_DEFAULT_TEXT_CONFIRMATION = |
|
63 OpenLcduiLocalization.getMessage("alert_conf"); |
|
64 |
|
65 public static final String ALERT_DEFAULT_TEXT_ALARM = |
|
66 OpenLcduiLocalization.getMessage("alert_alarm"); |
|
67 |
|
68 public static final String ALERT_DEFAULT_TEXT_ALERT = |
|
69 OpenLcduiLocalization.getMessage("alert_null"); |
|
70 |
|
71 |
|
72 // Exceptions below - dont need translation !!! |
|
73 |
|
74 |
|
75 public static final String COMMAND_EXCEPTION_LABEL_IS_NULL = |
|
76 "Short label cannot be null"; |
|
77 |
|
78 public static final String COMMAND_EXCEPTION_INVALID_TYPE = |
|
79 "Invalid command type"; |
|
80 |
|
81 |
|
82 // Display: |
|
83 public static final String DISPLAY_EXCEPTION_MIDLET_IS_NULL = |
|
84 "Midlet cannot be null"; |
|
85 |
|
86 public static final String DISPLAY_EXCEPTION_NEGATIVE_DURATION = |
|
87 "Duration cannot be negative."; |
|
88 |
|
89 public static final String DISPLAY_EXCEPTION_INVALID_COLOR_IDENTIFIER = |
|
90 "Color identifier is incorrect"; |
|
91 |
|
92 public static final String DISPLAY_EXCEPTION_ALERT_IS_NULL = |
|
93 "Alert cannot be null"; |
|
94 |
|
95 public static final String DISPLAY_EXCEPTION_NEXTDISP_IS_NULL = |
|
96 "Next displayable cannot be null"; |
|
97 |
|
98 public static final String DISPLAY_EXCEPTION_NEXTDISP_IS_ALERT = |
|
99 "Next displayable cannot be an Alert"; |
|
100 |
|
101 public static final String DISPLAY_EXCEPTION_ITEM_IS_NULL = |
|
102 "Item cannot be null."; |
|
103 |
|
104 public static final String DISPLAY_EXCEPTION_ITEM_HAS_NO_PARENT = |
|
105 "Item is not owned by a container."; |
|
106 |
|
107 |
|
108 // Displayable: |
|
109 public static final String DISPLAYABLE_EXCEPTION_NULL_PARAMETER = |
|
110 "Parameter was null"; |
|
111 |
|
112 |
|
113 // Alert: |
|
114 public static final String ALERT_EXCEPTION_INVALID_TIMEOUT = |
|
115 "Invalid timeout value"; |
|
116 |
|
117 public static final String ALERT_EXCEPTION_INVALID_INDICATOR = |
|
118 "Indicator violates restrictions"; |
|
119 |
|
120 |
|
121 |
|
122 // AlertType: |
|
123 public static final String ALERTTYPE_EXCEPTION_PLAYSOUND_NULL_POINTER = |
|
124 "Parameter display cannot be null"; |
|
125 |
|
126 |
|
127 // Textbox & TextField: |
|
128 public static final String TEXT_EXCEPTION_WRONG_TEXT = |
|
129 "Input txt doesn't meet constraints"; |
|
130 |
|
131 public static final String TEXT_EXCEPTION_MAX_SIZE_EXCEEDED = |
|
132 "Text length exceeds maximum size"; |
|
133 |
|
134 public static final String TEXT_EXCEPTION_INVALID_MAX_SIZE = |
|
135 "Maximum size is 0 or negative"; |
|
136 |
|
137 public static final String TEXT_EXCEPTION_INVALID_CONSTRAINTS = |
|
138 "Invalid constraints"; |
|
139 |
|
140 public static final String TEXT_EXCEPTION_TXT_IS_NULL = |
|
141 "Text must not be null"; |
|
142 |
|
143 public static final String TEXT_EXCEPTION_ARRAY_IS_NULL = |
|
144 "Character data must not be null"; |
|
145 |
|
146 public static final String TEXT_EXCEPTION_ARRAY_IS_TOO_SHORT = |
|
147 "Character data length is too short"; |
|
148 |
|
149 public static final String TEXT_EXCEPTION_ARRAY_INDEX_OUT_OF_BOUNDS = |
|
150 "Offset and length do not specify a valid range"; |
|
151 |
|
152 public static final String TEXT_EXCEPTION_INVALID_SIZE = |
|
153 "Invalid size"; |
|
154 |
|
155 |
|
156 // Item: |
|
157 public static final String ITEM_EXCEPTION_INVALID_LAYOUT = |
|
158 "New layout value was not combination of layout directives"; |
|
159 |
|
160 public static final String ITEM_EXCEPTION_NULL_COMMAND_ADDED = |
|
161 "Unable to add null-command to item"; |
|
162 |
|
163 public static final String ITEM_EXCEPTION_INVALID_DIMENSION = |
|
164 "Width and height cannot be less than -1"; |
|
165 |
|
166 public static final String ITEM_EXCEPTION_NOT_OWNED_BY_FORM = |
|
167 "Item is not owned by a form"; |
|
168 |
|
169 public static final String ITEM_EXCEPTION_OWNED_BY_ALERT = |
|
170 "Not allowed when item is owned by an Alert"; |
|
171 |
|
172 |
|
173 // StringItem: |
|
174 public static final String STRINGITEM_EXCEPTION_INVALID_APPMODE = |
|
175 "Invalid appearance mode"; |
|
176 |
|
177 |
|
178 // ImageItem: |
|
179 public static final String IMAGEITEM_EXCEPTION_INVALID_APPMODE = |
|
180 "Invalid apperance mode"; |
|
181 |
|
182 |
|
183 // Gauge: |
|
184 public static final String GAUGE_EXCEPTION_INVALID_VALUE = |
|
185 "Invalid value"; |
|
186 |
|
187 public static final String GAUGE_EXCEPTION_INVALID_MAXVALUE = |
|
188 "Invalid maximum value"; |
|
189 |
|
190 |
|
191 // List & ChoiceGroup |
|
192 public static final String LIST_EXCEPTION_INVALID_TYPE = |
|
193 "List type is invalid"; |
|
194 |
|
195 public static final String CHOICEGROUP_EXCEPTION_INVALID_TYPE = |
|
196 "ChoiceGroup type is invalid"; |
|
197 |
|
198 public static final String CHOICE_EXCEPTION_INVALID_FIT_POLICY = |
|
199 "Invalid fit policy"; |
|
200 |
|
201 public static final String CHOICE_EXCEPTION_INVALID_ARRAY_LENGTHS = |
|
202 "Array lengths mismatch"; |
|
203 |
|
204 public static final String CHOICE_EXCEPTION_INVALID_ITEM_INDEX = |
|
205 "Index of item is invalid"; |
|
206 |
|
207 public static final String CHOICE_EXCEPTION_ITEM_NULL = |
|
208 "Null element with index"; |
|
209 |
|
210 public static final String CHOICE_EXCEPTION_STRING_NULL = |
|
211 "Parameter text cannot be null"; |
|
212 |
|
213 public static final String CHOICE_EXCEPTION_ARRAY_NULL = |
|
214 "Parameter array cannot be null"; |
|
215 |
|
216 public static final String CHOICE_EXCEPTION_TEXT_ARRAY_NULL = |
|
217 "Parameter text array cannot be null"; |
|
218 |
|
219 public static final String CHOICE_EXCEPTION_INVALID_ARRAY_SIZE = |
|
220 "Parameter array size must match choice size"; |
|
221 |
|
222 |
|
223 // Spacer: |
|
224 public static final String SPACER_EXCEPTION_INVALID_STATE_LABEL = |
|
225 "Spacer cannot have a label"; |
|
226 |
|
227 public static final String SPACER_EXCEPTION_INVALID_STATE_COMMAND = |
|
228 "Spacer cannot have a command"; |
|
229 |
|
230 public static final String SPACER_EXCEPTION_INVALID_WIDTH_HEIGHT = |
|
231 "Width and height cannot be negative"; |
|
232 |
|
233 |
|
234 // DateField: |
|
235 public static final String DATEFIELD_EXCEPTION_INVALID_MODE = |
|
236 "Invalid mode."; |
|
237 |
|
238 |
|
239 // Form: |
|
240 public static final String FORM_EXCEPTION_STRING_NULL_POINTER = |
|
241 "Parameter text cannot be null"; |
|
242 |
|
243 public static final String FORM_EXCEPTION_IMAGE_NULL_POINTER = |
|
244 "Parameter img cannot be null"; |
|
245 |
|
246 public static final String FORM_EXCEPTION_ITEM_NULL_POINTER = |
|
247 "Parameter item cannot be null"; |
|
248 |
|
249 public static final String FORM_EXCEPTION_ITEM_OWNED_BY_CONTAINER = |
|
250 "Item is alread owned by container"; |
|
251 |
|
252 public static final String FORM_EXCEPTION_INVALID_ITEM_INDEX = |
|
253 "Index of item is incorrect"; |
|
254 |
|
255 |
|
256 // Font |
|
257 public static final String FONT_EXCEPTION_INVALID_SPECIFIER = |
|
258 "Invalid specifier parameter"; |
|
259 |
|
260 public static final String FONT_EXCEPTION_INVALID_FACE = |
|
261 "Invalid face parameter"; |
|
262 |
|
263 public static final String FONT_EXCEPTION_INVALID_STYLE = |
|
264 "Invalid style parameter"; |
|
265 |
|
266 public static final String FONT_EXCEPTION_INVALID_SIZE = |
|
267 "Invalid size parameter"; |
|
268 |
|
269 public static final String FONT_EXCEPTION_NULL_STRING = |
|
270 "String parameter is null"; |
|
271 |
|
272 |
|
273 // Canvas |
|
274 public static final String CANVAS_EXCEPTION_INVALID_KEY_CODE = |
|
275 "Key code is invalid"; |
|
276 |
|
277 public static final String CANVAS_EXCEPTION_INVALID_GAME_ACTION = |
|
278 "Game action is invalid"; |
|
279 |
|
280 public static final String CANVAS_EXCEPTION_FRAMEBUFFER_NULL = |
|
281 "Framebuffer is null"; |
|
282 |
|
283 |
|
284 // Graphics: |
|
285 public static final String GRAPHICS_EXCEPTION_ILLEGAL_STROKE_STYLE = |
|
286 "Stroke style is invalid"; |
|
287 |
|
288 public static final String GRAPHICS_EXCEPTION_INVALID_ANCHOR = |
|
289 "Invalid anchor value"; |
|
290 |
|
291 public static final String GRAPHICS_EXCEPTION_STRING_IS_NULL = |
|
292 "String is null"; |
|
293 |
|
294 public static final String GRAPHICS_EXCEPTION_ARRAY_OUT_OF_BOUNDS = |
|
295 "Array bounds invalid"; |
|
296 |
|
297 public static final String GRAPHICS_EXCEPTION_ARRAY_IS_NULL = |
|
298 "Char array is null"; |
|
299 |
|
300 public static final String GRAPHICS_EXCEPTION_SAME_SOURCE_AND_DESTINATION = |
|
301 "Source and destination can not be the same"; |
|
302 |
|
303 public static final String GRAPHICS_EXCEPTION_DESTINATION_IS_SCREEN = |
|
304 "Destination can not be screen device."; |
|
305 |
|
306 |
|
307 // DirectGraphics: |
|
308 public static final String DIRECTGRAPHICS_EXCEPTION_INVALID_MANIPULATION = |
|
309 "Invalid manipulation"; |
|
310 |
|
311 public static final String DIRECTGRAPHICS_EXCEPTION_INVALID_FORMAT = |
|
312 "Invalid or unsupported format"; |
|
313 |
|
314 public static final String DIRECTGRAPHICS_EXCEPTION_INVALID_WIDTH_HEIGHT = |
|
315 "Invalid width or height"; |
|
316 // Image: |
|
317 public static final String IMAGE_EXCEPTION_FILE_NAME_IS_NULL = |
|
318 "File name specified is null"; |
|
319 |
|
320 public static final String IMAGE_EXCEPTION_IO_ERROR = |
|
321 "I/O error loading image"; |
|
322 |
|
323 public static final String IMAGE_EXCEPTION_IMMUTABLE = |
|
324 "Immutable image"; |
|
325 |
|
326 public static final String IMAGE_EXCEPTION_FILE_STREAM_IS_NULL = |
|
327 "Stream specified is null"; |
|
328 |
|
329 public static final String IMAGE_EXCEPTION_DATA_IS_NULL = |
|
330 "Image data is null"; |
|
331 |
|
332 public static final String IMAGE_EXCEPTION_INVALID_BOUNDS = |
|
333 "Invalid image array bounds"; |
|
334 |
|
335 public static final String IMAGE_EXCEPTION_IS_NULL = |
|
336 "Image is null"; |
|
337 |
|
338 public static final String IMAGE_EXCEPTION_INVALID_DATA = |
|
339 "Image data is invalid"; |
|
340 |
|
341 public static final String IMAGE_EXCEPTION_INVALID_DIMENSIONS = |
|
342 "Invalid image dimensions"; |
|
343 |
|
344 public static final String IMAGE_EXCEPTION_INVALID_TRANSFORM = |
|
345 "Invalid transform value"; |
|
346 |
|
347 public static final String IMAGE_EXCEPTION_INVALID_REGION = |
|
348 "Invalid image region specified"; |
|
349 |
|
350 public static final String IMAGE_EXCEPTION_INVALID_SCANLENGTH = |
|
351 "Invalid length value"; |
|
352 |
|
353 |
|
354 public static final String TICKER_EXCEPTION_NULL_STRING = |
|
355 "Text parameter cannot be null."; |
|
356 |
|
357 |
|
358 /** |
|
359 * Private Constructor. |
|
360 */ |
|
361 private MsgRepository() { |
|
362 } |
|
363 } |