379 */ |
379 */ |
380 public static String getMessage(String key) { |
380 public static String getMessage(String key) { |
381 |
381 |
382 if (key == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); |
382 if (key == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); |
383 |
383 |
|
384 // ok button in dialog |
384 if(key.equals("ok")){ |
385 if(key.equals("ok")){ |
385 iRes = ResourceLoader.getInstance("eswtcore", "qtn_eswt_softkey_"); |
386 iRes = ResourceLoader.getInstance("common", "txt_common_button_"); |
386 return iRes.format(key).toString(); |
387 return iRes.format(key).toString(); |
387 } |
388 } |
388 |
389 |
|
390 // cancel button in dialog |
389 if(key.equals("cancel")){ |
391 if(key.equals("cancel")){ |
390 iRes = ResourceLoader.getInstance("eswtcore", "qtn_eswt_softkey_"); |
392 iRes = ResourceLoader.getInstance("common", "txt_common_button_"); |
391 return iRes.format(key).toString(); |
393 return iRes.format(key).toString(); |
392 } |
394 } |
393 |
395 |
394 if(key.equals("fetch_url")){ |
396 // fetch contact from device phone book - in Options menu |
395 iRes = ResourceLoader.getInstance("eswtmobile", "qtn_eswt_option_"); |
397 if(key.equals("opt_fetch")){ |
396 return iRes.format(key).toString(); |
398 iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_"); |
397 } |
399 return iRes.format(key).toString(); |
398 |
400 } |
399 if(key.equals("fetch_email")){ |
401 |
400 iRes = ResourceLoader.getInstance("eswtmobile", "qtn_eswt_option_pb_"); |
402 // fetch contact from device phone book - in context menu |
401 return iRes.format(key).toString(); |
403 if(key.equals("menu_fetch")){ |
402 } |
404 iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_"); |
403 |
405 return iRes.format(key).toString(); |
404 if(key.equals("dialog_title")){ |
406 } |
405 iRes = ResourceLoader.getInstance("eswtmobile", "qtn_eswt_favorites_"); |
407 |
406 return iRes.format(key).toString(); |
408 // fetch contact from device phone book - in button |
407 } |
409 if(key.equals("button_fetch")){ |
408 |
410 iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_"); |
|
411 return iRes.format(key).toString(); |
|
412 } |
|
413 |
|
414 // create a call - in Options menu |
|
415 if(key.equals("opt_call")){ |
|
416 iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_"); |
|
417 return iRes.format(key).toString(); |
|
418 } |
|
419 |
|
420 // create a call - in context menu |
|
421 if(key.equals("menu_call")){ |
|
422 iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_"); |
|
423 return iRes.format(key).toString(); |
|
424 } |
|
425 |
|
426 // create a call - in button |
|
427 if(key.equals("button_call")){ |
|
428 iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_"); |
|
429 return iRes.format(key).toString(); |
|
430 } |
|
431 |
|
432 // title of selection list of bookmarks in TextExtension |
|
433 if(key.equals("title_select_bookmark")){ |
|
434 iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_"); |
|
435 return iRes.format(key).toString(); |
|
436 } |
|
437 |
|
438 // string displayed in empty list |
|
439 if(key.equals("info_no_data")){ |
|
440 iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_"); |
|
441 return iRes.format(key).toString(); |
|
442 } |
|
443 |
409 return key; |
444 return key; |
410 } |
445 } |
411 |
446 |
412 public static String getMessage(String key, Object[] args) { |
447 public static String getMessage(String key, Object[] args) { |
413 if (key == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); |
448 if (key == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); |