MediaInfo.java 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. package com.epson.mobilephone.common.escpr;
  2. import com.epson.mobilephone.common.PrintingLib.define.Constants;
  3. import org.opencv.videoio.Videoio;
  4. import java.util.Enumeration;
  5. import java.util.Hashtable;
  6. import epson.print.service.EpsonService;
  7. public interface MediaInfo {
  8. public static final int EPS_PRNST_BUSY = 2;
  9. public static final int EPS_PRNST_CANCELLING = 3;
  10. public static final int EPS_PRNST_ERROR = 4;
  11. public static final int EPS_PRNST_IDLE = 0;
  12. public static final int EPS_PRNST_PRINTING = 1;
  13. public static final int ERROR_GET_LAYOUT = -1;
  14. public static class ErrorTable {
  15. protected static Hashtable<Integer, Integer[]> sCodeTable = new Hashtable<>();
  16. static {
  17. sCodeTable.put(1, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_GENERAL_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_GENERAL_TITLE), 0});
  18. sCodeTable.put(2, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_FATAL_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_FATAL_TITLE), 0});
  19. sCodeTable.put(3, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_INTERFACE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_INTERFACE_TITLE), 1});
  20. sCodeTable.put(4, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COVEROPEN_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_COVEROPEN_TITLE), 1});
  21. sCodeTable.put(5, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_PAPERJAM_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_PAPERJAM_TITLE), 0});
  22. sCodeTable.put(6, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_INKOUT_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_INKOUT_TITLE), 1});
  23. sCodeTable.put(7, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_PAPEROUT_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_PAPEROUT_TITLE), 1});
  24. sCodeTable.put(8, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_SIZE_TYPE_PATH_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_SIZE_TYPE_PATH_TITLE), 0});
  25. sCodeTable.put(9, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_SERVICEREQ_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_SERVICEREQ_TITLE), 0});
  26. sCodeTable.put(10, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_DOUBLEFEED_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_DOUBLEFEED_TITLE), 1});
  27. sCodeTable.put(11, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_INKCOVEROPEN_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_INKCOVEROPEN_TITLE), 1});
  28. sCodeTable.put(12, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_NOTRAY_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_NOTRAY_TITLE), 1});
  29. sCodeTable.put(13, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CARDLOADING_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CARDLOADING_TITLE), 0});
  30. sCodeTable.put(14, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CARTRIDGEOVERFLOW_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CARTRIDGEOVERFLOW_TITLE), 1});
  31. sCodeTable.put(15, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERYVOLTAGE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERYVOLTAGE_TITLE), 0});
  32. sCodeTable.put(16, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERYTEMPERATURE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERYTEMPERATURE_TITLE), 0});
  33. sCodeTable.put(17, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERYEMPTY_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERYEMPTY_TITLE), 0});
  34. sCodeTable.put(18, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_SHUTOFF_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_SHUTOFF_TITLE), 1});
  35. sCodeTable.put(19, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_NOT_INITIALFILL_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_NOT_INITIALFILL_TITLE), 1});
  36. sCodeTable.put(20, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_PRINTPACKEND_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_PRINTPACKEND_TITLE), 1});
  37. sCodeTable.put(21, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_SCANNEROPEN_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_SCANNEROPEN_TITLE), 1});
  38. sCodeTable.put(22, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CDRGUIDEOPEN_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CDRGUIDEOPEN_TITLE), 1});
  39. sCodeTable.put(23, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CDDVDCONFIG_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CDDVDCONFIG_TITLE), 1});
  40. sCodeTable.put(24, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CDREXIST_MAINTE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CDREXIST_MAINTE_TITLE), 1});
  41. sCodeTable.put(25, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_FEEDERCLOSE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_FEEDERCLOSE_TITLE), 1});
  42. sCodeTable.put(26, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_3DMEDIA_FACE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_3DMEDIA_FACE_TITLE), 1});
  43. sCodeTable.put(27, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_3DMEDIA_DIRECTION_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_3DMEDIA_DIRECTION_TITLE), 1});
  44. sCodeTable.put(28, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_SET_PAPER_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_SET_PAPER_TITLE), 1});
  45. sCodeTable.put(29, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_SET_PAPER_NOLCD_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_SET_PAPER_TITLE), 1});
  46. sCodeTable.put(30, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_FAILED_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_FAILED_TITLE), 1});
  47. sCodeTable.put(31, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_FAILED_NOLCD_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_FAILED_TITLE), 1});
  48. sCodeTable.put(32, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_EXCESSIVE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_EXCESSIVE_TITLE), 1});
  49. sCodeTable.put(33, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_EXCESSIVE_NOLCD_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_MANUALFEED_EXCESSIVE_TITLE), 1});
  50. sCodeTable.put(34, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CDDVDCONFIG_STARTBUTTON_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CDDVDCONFIG_STARTBUTTON_TITLE), 1});
  51. sCodeTable.put(35, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CDDVDCONFIG_FEEDBUTTON_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CDDVDCONFIG_FEEDBUTTON_TITLE), 1});
  52. sCodeTable.put(36, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_INTERRUPT_BY_INKEND_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_INTERRUPT_BY_INKEND_TITLE), 1});
  53. sCodeTable.put(37, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_ROLLPAPER_TOOSHORT_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_ROLLPAPER_TOOSHORT_TITLE), 1});
  54. sCodeTable.put(38, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_NO_BATTERY_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_NO_BATTERY_TITLE), 1});
  55. sCodeTable.put(39, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_LOW_BATTERY_FNC_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_LOW_BATTERY_FNC_TITLE), 1});
  56. sCodeTable.put(40, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERY_CHARGING_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERY_CHARGING_TITLE), 1});
  57. sCodeTable.put(41, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERY_TEMPERATURE_HIGH_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERY_TEMPERATURE_HIGH_TITLE), 1});
  58. sCodeTable.put(42, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERY_TEMPERATURE_LOW_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BATTERY_TEMPERATURE_LOW_TITLE), 1});
  59. sCodeTable.put(44, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_PC_FACE1_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_PC_FACE1_TITLE), 1});
  60. sCodeTable.put(45, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_PC_FACE2_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_PC_FACE2_TITLE), 1});
  61. sCodeTable.put(43, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_PC_DIRECTION1_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_PC_DIRECTION1_TITLE), 1});
  62. sCodeTable.put(46, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_PC_DIRECTION2_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_PC_DIRECTION2_TITLE), 1});
  63. sCodeTable.put(47, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_REPLACE_MAINTENANCE_BOX_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_REPLACE_MAINTENANCE_BOX_TITLE), 1});
  64. sCodeTable.put(48, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_NO_MAINTENANCE_BOX_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_NO_MAINTENANCE_BOX_TITLE), 1});
  65. sCodeTable.put(49, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_STACKER_FULL_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_STACKER_FULL_TITLE), 1});
  66. sCodeTable.put(50, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_NO_STAPLE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_NO_STAPLE_TITLE), 1});
  67. sCodeTable.put(51, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_DISABLE_DUPLEX_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_DISABLE_DUPLEX_TITLE), 1});
  68. sCodeTable.put(52, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_WIP_NEAR_END_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_WIP_NEAR_END_TITLE), 1});
  69. sCodeTable.put(53, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BORDERLESS_WIP_NEAR_END_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BORDERLESS_WIP_NEAR_END_TITLE), 1});
  70. sCodeTable.put(54, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BORDERLESS_WIP_END_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BORDERLESS_WIP_END_TITLE), 1});
  71. sCodeTable.put(55, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_INKOUT_BK1MODE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_INKOUT_BK1MODE_TITLE), 1});
  72. sCodeTable.put(56, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BK1MODE_WAITING_ACCEPT_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BK1MODE_WAITING_ACCEPT_TITLE), 1});
  73. sCodeTable.put(57, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CASSETTECOVER_OPENED_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CASSETTECOVER_OPENED_TITLE), 1});
  74. sCodeTable.put(58, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CASSETTECOVER_CLOSED_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CASSETTECOVER_CLOSED_TITLE), 1});
  75. sCodeTable.put(100, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BUSY_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BUSY_TITLE), 1});
  76. sCodeTable.put(101, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_FACTORY_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_FACTORY_TITLE), 1});
  77. sCodeTable.put(102, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM_TITLE), 0});
  78. sCodeTable.put(103, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CEMPTY_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CEMPTY_TITLE), 1});
  79. sCodeTable.put(104, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CFAIL_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CFAIL_TITLE), 1});
  80. sCodeTable.put(105, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_TRAYCLOSE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_TRAYCLOSE_TITLE), 1});
  81. sCodeTable.put(106, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_CDGUIDECLOSE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_CDGUIDECLOSE_TITLE), 1});
  82. sCodeTable.put(108, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_DISABEL_CLEANING_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_DISABEL_CLEANING_TITLE), 1});
  83. sCodeTable.put(109, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_BK1MODE_NEED_ACCEPT_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_BK1MODE_NEED_ACCEPT_TITLE), 1});
  84. sCodeTable.put(59, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_READYPRINT_SERVICE_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_READYPRINT_SERVICE_TITLE), 1});
  85. sCodeTable.put(200, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_ANY_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_ANY_TITLE), 1});
  86. sCodeTable.put(-1300, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM3), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM_TITLE3), 0});
  87. sCodeTable.put(-1100, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM1), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2_TITLE), 0});
  88. sCodeTable.put(-11001, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM4), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2_TITLE), 0});
  89. sCodeTable.put(Integer.valueOf(EscprError.EPS_ERR_PRINTER_NOT_FOUND_2), new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2_TITLE), 0});
  90. sCodeTable.put(Integer.valueOf(EscprError.EPS_ERR_PRINTER_NOT_SET), new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2_TITLE), 0});
  91. sCodeTable.put(Integer.valueOf(EscprError.EPS_ERR_SEARCH_PRINTER_NOT_FOUND), new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM5), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2_TITLE), 0});
  92. sCodeTable.put(Integer.valueOf(EpsonService.MEDIA_INFO_MEMORY_ERROR), new Integer[]{Integer.valueOf(C1055R.string.str_err_msg_out_of_memory_title), Integer.valueOf(C1055R.string.EPS_PRNERR_GENERAL_TITLE), 0});
  93. sCodeTable.put(-11006, new Integer[]{Integer.valueOf(C1055R.string.Cannot_retrieve_any_information_from_the_printer_), Integer.valueOf(C1055R.string.Cannot_retrieve_any_information_from_the_printer_), 0});
  94. sCodeTable.put(-500001, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2_MSG), Integer.valueOf(C1055R.string.EPS_PRNERR_COMM2_TITLE), 0});
  95. }
  96. public static Integer[] getStringId(int i) {
  97. if (sCodeTable.containsKey(Integer.valueOf(i))) {
  98. return sCodeTable.get(Integer.valueOf(i));
  99. }
  100. return null;
  101. }
  102. }
  103. public static class StatusTable {
  104. protected static Hashtable<Integer, Integer[]> sCodeTable = new Hashtable<>();
  105. static {
  106. sCodeTable.put(0, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNST_IDLE_TITLE), Integer.valueOf(C1055R.string.EPS_PRNST_IDLE_MSG)});
  107. sCodeTable.put(1, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNST_PRINTING_TITLE), Integer.valueOf(C1055R.string.EPS_PRNST_PRINTING_MSG)});
  108. sCodeTable.put(2, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNST_BUSY_TITLE), Integer.valueOf(C1055R.string.EPS_PRNST_BUSY_MSG)});
  109. sCodeTable.put(3, new Integer[]{Integer.valueOf(C1055R.string.EPS_PRNST_CANCELLING_TITLE), Integer.valueOf(C1055R.string.EPS_PRNST_CANCELLING_MSG)});
  110. }
  111. public static Integer[] getStringId(int i) {
  112. if (sCodeTable.containsKey(Integer.valueOf(i))) {
  113. return sCodeTable.get(Integer.valueOf(i));
  114. }
  115. return null;
  116. }
  117. }
  118. public static class ColorTable {
  119. protected static Hashtable<Integer, Integer[]> mHashMap = new Hashtable<>();
  120. static {
  121. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_BLACK.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_all_black), Integer.valueOf(C1055R.string.EPS_COLOR_BLACK), Integer.valueOf(C1055R.string.EPS_COLOR_BLACK_CON)});
  122. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_CYAN.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_cyan), Integer.valueOf(C1055R.string.EPS_COLOR_CYAN), Integer.valueOf(C1055R.string.EPS_COLOR_CYAN_CON)});
  123. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_MAGENTA.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_magenta), Integer.valueOf(C1055R.string.EPS_COLOR_MAGENTA), Integer.valueOf(C1055R.string.EPS_COLOR_MAGENTA_CON)});
  124. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_YELLOW.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_yellow), Integer.valueOf(C1055R.string.EPS_COLOR_YELLOW), Integer.valueOf(C1055R.string.EPS_COLOR_YELLOW_CON)});
  125. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_LIGHTCYAN.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_lightcyan), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTCYAN), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTCYAN_CON)});
  126. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_LIGHTMAGENTA.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_lightmagenta), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTMAGENTA), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTMAGENTA_CON)});
  127. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_LIGHTYELLOW.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_lightyellow), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTYELLOW), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTYELLOW_CON)});
  128. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_DARKYELLOW.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_darkyellow), Integer.valueOf(C1055R.string.EPS_COLOR_DARKYELLOW), Integer.valueOf(C1055R.string.EPS_COLOR_DARKYELLOW_CON)});
  129. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_LIGHTBLACK.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_lightblack), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTBLACK), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTBLACK_CON)});
  130. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_RED.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_red), Integer.valueOf(C1055R.string.EPS_COLOR_RED), Integer.valueOf(C1055R.string.EPS_COLOR_RED_CON)});
  131. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_VIOLET.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_violet), Integer.valueOf(C1055R.string.EPS_COLOR_VIOLET), Integer.valueOf(C1055R.string.EPS_COLOR_VIOLET_CON)});
  132. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_MATTEBLACK.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_matteblack), Integer.valueOf(C1055R.string.EPS_COLOR_MATTEBLACK), Integer.valueOf(C1055R.string.EPS_COLOR_MATTEBLACK_CON)});
  133. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_LIGHTLIGHTBLACK.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_lightlightblack), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTLIGHTBLACK), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTLIGHTBLACK__CON)});
  134. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_PHOTOBLACK.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_photoblack), Integer.valueOf(C1055R.string.EPS_COLOR_PHOTOBLACK), Integer.valueOf(C1055R.string.EPS_COLOR_PHOTOBLACK_CON)});
  135. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_CLEAR.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_clear), Integer.valueOf(C1055R.string.EPS_COLOR_CLEAR), Integer.valueOf(C1055R.string.EPS_COLOR_CLEAR_CON)});
  136. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_GRAY.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_gray), Integer.valueOf(C1055R.string.EPS_COLOR_GRAY), Integer.valueOf(C1055R.string.EPS_COLOR_GRAY_CON)});
  137. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_BLACK2.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_black2), Integer.valueOf(C1055R.string.EPS_COLOR_BLACK2), Integer.valueOf(C1055R.string.EPS_COLOR_BLACK2_CON)});
  138. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_ORANGE.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_orange), Integer.valueOf(C1055R.string.EPS_COLOR_ORANGE), Integer.valueOf(C1055R.string.EPS_COLOR_ORANGE_CON)});
  139. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_GREEN.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_green), Integer.valueOf(C1055R.string.EPS_COLOR_GREEN), Integer.valueOf(C1055R.string.EPS_COLOR_GREEN_CON)});
  140. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_WHITE.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_all_white), Integer.valueOf(C1055R.string.EPS_COLOR_WHITE), Integer.valueOf(C1055R.string.EPS_COLOR_WHITE_CON)});
  141. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_CLEAN.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_clean), Integer.valueOf(C1055R.string.EPS_COLOR_CLEAN), Integer.valueOf(C1055R.string.EPS_COLOR_CLEAN_CON)});
  142. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_COMPOSITE.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_composite), Integer.valueOf(C1055R.string.EPS_COLOR_COMPOSITE), Integer.valueOf(C1055R.string.EPS_COLOR_COMPOSITE_CON)});
  143. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_BLACK1.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_all_black), Integer.valueOf(C1055R.string.EPS_COLOR_BLACK1), Integer.valueOf(C1055R.string.EPS_COLOR_BLACK1_CON)});
  144. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_BLUE.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_blue), Integer.valueOf(C1055R.string.EPS_COLOR_BLUE), Integer.valueOf(C1055R.string.EPS_COLOR_BLUE_CON)});
  145. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_DEEP_BLUE.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_deep_blue), Integer.valueOf(C1055R.string.EPS_COLOR_DEEP_BLUE), Integer.valueOf(C1055R.string.EPS_COLOR_DEEP_BLUE_CON)});
  146. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_VIVID_MAGENTA.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_vivid_magenta), Integer.valueOf(C1055R.string.EPS_COLOR_VIVID_MAGENTA), Integer.valueOf(C1055R.string.EPS_COLOR_VIVID_MAGENTA_CON)});
  147. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_VIVID_LIGHTMAGENTA.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_vivid_lightmagenta), Integer.valueOf(C1055R.string.EPS_COLOR_VIVID_LIGHTMAGENTA), Integer.valueOf(C1055R.string.EPS_COLOR_VIVID_LIGHTMAGENTA_CON)});
  148. mHashMap.put(Integer.valueOf(Constants.ColorName.EPS_COLOR_LIGHTGRAY.ordinal()), new Integer[]{Integer.valueOf(C1055R.color.epson_lib_lightgray), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTGRAY), Integer.valueOf(C1055R.string.EPS_COLOR_LIGHTGRAY_CON)});
  149. }
  150. public static Integer[] getColorName(int i) {
  151. if (mHashMap.containsKey(Integer.valueOf(i))) {
  152. return mHashMap.get(Integer.valueOf(i));
  153. }
  154. return null;
  155. }
  156. public static Integer[] getColorNameByModel(int i, String str) {
  157. if (!mHashMap.containsKey(Integer.valueOf(i))) {
  158. return null;
  159. }
  160. Integer[] numArr = mHashMap.get(Integer.valueOf(i));
  161. if (str.equals("SC-PX1V") || str.equals("SC-PX1VL")) {
  162. if (i != Constants.ColorName.EPS_COLOR_PHOTOBLACK.ordinal()) {
  163. return numArr;
  164. }
  165. return new Integer[]{Integer.valueOf(C1055R.color.epson_lib_all_black), Integer.valueOf(C1055R.string.EPS_COLOR_PHOTOBLACK), Integer.valueOf(C1055R.string.EPS_COLOR_PHOTOBLACK_CON_BK)};
  166. } else if (!str.equals("SC-P700 Series") && !str.equals("SC-P900 Series")) {
  167. return numArr;
  168. } else {
  169. if (i == Constants.ColorName.EPS_COLOR_PHOTOBLACK.ordinal()) {
  170. return new Integer[]{Integer.valueOf(C1055R.color.epson_lib_all_black), Integer.valueOf(C1055R.string.EPS_COLOR_PHOTOBLACK), Integer.valueOf(C1055R.string.EPS_COLOR_PHOTOBLACK_CON_PK)};
  171. } else if (i != Constants.ColorName.EPS_COLOR_MATTEBLACK.ordinal()) {
  172. return numArr;
  173. } else {
  174. return new Integer[]{Integer.valueOf(C1055R.color.epson_lib_all_black), Integer.valueOf(C1055R.string.EPS_COLOR_MATTEBLACK), Integer.valueOf(C1055R.string.EPS_COLOR_MATTEBLACK_CON_MK)};
  175. }
  176. }
  177. }
  178. }
  179. public static abstract class AbstractInfo {
  180. protected final Hashtable<Integer, Integer> sCodeTable = new Hashtable<>();
  181. public int getStringId(int i) {
  182. if (sCodeTable.containsKey(Integer.valueOf(i))) {
  183. return sCodeTable.get(Integer.valueOf(i)).intValue();
  184. }
  185. return sCodeTable.get(0).intValue();
  186. }
  187. public boolean putID(int i, int i2) {
  188. if (sCodeTable.containsKey(Integer.valueOf(i))) {
  189. return false;
  190. }
  191. sCodeTable.put(Integer.valueOf(i), Integer.valueOf(i2));
  192. return true;
  193. }
  194. public int getID(int i) {
  195. if (sCodeTable.containsKey(Integer.valueOf(i))) {
  196. return sCodeTable.get(Integer.valueOf(i)).intValue();
  197. }
  198. return -1;
  199. }
  200. public Enumeration getKeys() {
  201. return sCodeTable.keys();
  202. }
  203. public void destructor() {
  204. sCodeTable.clear();
  205. }
  206. }
  207. public static class PaperSize extends AbstractInfo {
  208. public PaperSize() {
  209. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A4.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_A4));
  210. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_LETTER.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_LETTER));
  211. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_LEGAL.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_LEGAL));
  212. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A5.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_A5));
  213. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A6.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_A6));
  214. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B5.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_B5));
  215. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_EXECUTIVE.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_EXECUTIVE));
  216. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_HALFLETTER.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_HALFLETTER));
  217. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PANORAMIC.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_PANORAMIC));
  218. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_TRIM_4X6.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_TRIM_4X6));
  219. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_4X6.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_4X6));
  220. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_5X8.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_5X8));
  221. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_8X10.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_8X10));
  222. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_10X15.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_10X15));
  223. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_200X300.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_200X300));
  224. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_L));
  225. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_POSTCARD.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_POSTCARD));
  226. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_DBLPOSTCARD.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_DBLPOSTCARD));
  227. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_10_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_10_L));
  228. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_C6_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_C6_L));
  229. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_DL_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_DL_L));
  230. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_NEWEVN_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_NEWEVN_L));
  231. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_CHOKEI_3.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_CHOKEI_3));
  232. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_CHOKEI_4.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_CHOKEI_4));
  233. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_1.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_YOKEI_1));
  234. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_2.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_YOKEI_2));
  235. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_3.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_YOKEI_3));
  236. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_4.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_YOKEI_4));
  237. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_2L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_2L));
  238. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_10_P.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_10_P));
  239. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_C6_P.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_C6_P));
  240. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_DL_P.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_DL_P));
  241. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_NEWENV_P.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_NEWENV_P));
  242. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_MEISHI.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_MEISHI));
  243. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_BUZCARD_89X50.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_BUZCARD_89X50));
  244. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_CARD_54X86.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_CARD_54X86));
  245. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_BUZCARD_55X91.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_BUZCARD_55X91));
  246. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ALBUM_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ALBUM_L));
  247. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ALBUM_A5.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ALBUM_A5));
  248. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_L_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_PALBUM_L_L));
  249. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_2L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_PALBUM_2L));
  250. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_A5_L.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_PALBUM_A5_L));
  251. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_A4.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_PALBUM_A4));
  252. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_HIVISION.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_HIVISION));
  253. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_KAKU_2.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_KAKU_2));
  254. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_C4_P.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_C4_P));
  255. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B6.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_B6));
  256. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_KAKU_20.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_KAKU_20));
  257. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A5_24HOLE.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_A5_24HOLE));
  258. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_CHOKEI_40.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_CHOKEI_40));
  259. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_QUADRAPLEPOSTCARD.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_QUADRAPLEPOSTCARD));
  260. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_0.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_YOKEI_0));
  261. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_C5_P.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_C5_P));
  262. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_6.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_YOKEI_6));
  263. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_MEXICO_OFICIO.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_MEXICO_OFICIO));
  264. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_OFICIO9.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_OFICIO9));
  265. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_INDIAN_LEGAL.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_INDIAN_LEGAL));
  266. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A3NOBI.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_A3NOBI));
  267. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A3.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_A3));
  268. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B4.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_B4));
  269. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_USB.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_USB));
  270. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_11X14.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_11X14));
  271. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B3.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_B3));
  272. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A2.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_A2));
  273. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_USC.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_USC));
  274. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_10X12.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_10X12));
  275. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_12X12.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_12X12));
  276. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SP1.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SP1));
  277. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SP2.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SP2));
  278. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SP3.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SP3));
  279. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SP4.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SP4));
  280. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SP5.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SP5));
  281. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_16K.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_16K));
  282. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_8K.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_8K));
  283. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SRA3.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SRA3));
  284. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_12X18.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_12X18));
  285. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_8_5X13.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_8_5X13));
  286. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SQUARE_8_27.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SQUARE_8_27));
  287. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_SQUARE_5.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_SQUARE_5));
  288. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_USER.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_USER));
  289. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_8X10_5.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_8X10_5));
  290. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_8_27X13.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_8_27X13));
  291. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_B5_P.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_ENV_B5_P));
  292. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_HALFCUT.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_HALFCUT));
  293. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_16X20.getCode()), Integer.valueOf(C1055R.string.EPS_MSID_16X20));
  294. }
  295. }
  296. public static abstract class AbstractInfo_size {
  297. protected final Hashtable<Integer, Info_paper> sCodeTable = new Hashtable<>();
  298. public Info_paper getStringId(int i) {
  299. if (sCodeTable.containsKey(Integer.valueOf(i))) {
  300. return sCodeTable.get(Integer.valueOf(i));
  301. }
  302. return null;
  303. }
  304. public Info_paper getStringIdForFormPrint(int i) {
  305. if (i == 3) {
  306. return new Info_paper(2098, 2976, 1816, 2694, 0, 0, 2098, 2976, 141, 141, 141, 141, 0, 0);
  307. }
  308. if (sCodeTable.containsKey(Integer.valueOf(i))) {
  309. return sCodeTable.get(Integer.valueOf(i));
  310. }
  311. return null;
  312. }
  313. public void destructor() {
  314. sCodeTable.clear();
  315. }
  316. }
  317. public static class PaperSize_constants extends AbstractInfo_size {
  318. public PaperSize_constants() {
  319. EPS_PRINT_AREA_INFO eps_print_area_info = new EPS_PRINT_AREA_INFO();
  320. if (EscprLib.getInstance().get_printable_area_info_all(eps_print_area_info) >= 0) {
  321. for (int i = 0; i < eps_print_area_info.numSizes; i++) {
  322. int i2 = eps_print_area_info.sizeList[i].paperWidth;
  323. int i3 = eps_print_area_info.sizeList[i].paperHeight;
  324. int i4 = 0;
  325. int i5 = 0;
  326. int i6 = 0;
  327. int i7 = 0;
  328. int i8 = 0;
  329. int i9 = 0;
  330. int i10 = 0;
  331. int i11 = 0;
  332. int i12 = 0;
  333. int i13 = 0;
  334. int i14 = 0;
  335. int i15 = 0;
  336. for (int i16 = 0; i16 < eps_print_area_info.sizeList[i].numLayouts; i16++) {
  337. if (eps_print_area_info.sizeList[i].layoutList[i16].layout == 2) {
  338. int i17 = (i2 - eps_print_area_info.sizeList[i].layoutList[i16].margin.left) - eps_print_area_info.sizeList[i].layoutList[i16].margin.right;
  339. int i18 = (i3 - eps_print_area_info.sizeList[i].layoutList[i16].margin.top) - eps_print_area_info.sizeList[i].layoutList[i16].margin.bottom;
  340. int i19 = eps_print_area_info.sizeList[i].layoutList[i16].margin.left;
  341. int i20 = eps_print_area_info.sizeList[i].layoutList[i16].margin.top;
  342. i12 = eps_print_area_info.sizeList[i].layoutList[i16].margin.right;
  343. i13 = eps_print_area_info.sizeList[i].layoutList[i16].margin.bottom;
  344. i10 = i19;
  345. i11 = i20;
  346. i4 = i17;
  347. i5 = i18;
  348. } else if (eps_print_area_info.sizeList[i].layoutList[i16].layout == 1) {
  349. int i21 = (i2 - eps_print_area_info.sizeList[i].layoutList[i16].margin.left) - eps_print_area_info.sizeList[i].layoutList[i16].margin.right;
  350. int i22 = (i3 - eps_print_area_info.sizeList[i].layoutList[i16].margin.top) - eps_print_area_info.sizeList[i].layoutList[i16].margin.bottom;
  351. i6 = eps_print_area_info.sizeList[i].layoutList[i16].margin.left;
  352. i7 = eps_print_area_info.sizeList[i].layoutList[i16].margin.top;
  353. i14 = eps_print_area_info.sizeList[i].layoutList[i16].margin.right;
  354. i15 = eps_print_area_info.sizeList[i].layoutList[i16].margin.bottom;
  355. i8 = i21;
  356. i9 = i22;
  357. }
  358. }
  359. sCodeTable.put(Integer.valueOf(eps_print_area_info.sizeList[i].mediaSizeID), new Info_paper(i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15));
  360. }
  361. return;
  362. }
  363. presetPaperSize();
  364. }
  365. public PaperSize_constants(boolean z) {
  366. presetPaperSize();
  367. }
  368. private void presetPaperSize() {
  369. sCodeTable.put(0, new Info_paper(2976, 4209, 2892, 4125, -36, -42, 3048, 4321));
  370. sCodeTable.put(1, new Info_paper(3060, 3960, 2976, 3876, -36, -42, 3132, 4072));
  371. sCodeTable.put(2, new Info_paper(3060, 5040, 2976, 4956, -36, -42, 3132, 5152));
  372. sCodeTable.put(3, new Info_paper(2098, 2976, 2014, 2892, -36, -42, 2170, 3088));
  373. sCodeTable.put(4, new Info_paper(1488, 2098, 1404, 2014, -36, -42, 1560, 2210));
  374. sCodeTable.put(5, new Info_paper(2580, 3643, 2496, 3559, -36, -42, 2652, 3755));
  375. sCodeTable.put(6, new Info_paper(2611, 3780, 2527, 3696, -36, -42, 2683, 3892));
  376. sCodeTable.put(7, new Info_paper(1980, 3060, 1896, 2976, -36, -42, 2052, 3172));
  377. sCodeTable.put(8, new Info_paper(2976, 8419, 2892, 8335, -36, -42, 3048, 8531));
  378. sCodeTable.put(9, new Info_paper(Videoio.CAP_OPENNI2_ASUS, 2330, 1526, 2246, -36, -42, 1682, 2442));
  379. sCodeTable.put(10, new Info_paper(1440, 2160, 1356, 2076, -36, -42, 1512, 2272));
  380. sCodeTable.put(11, new Info_paper(1800, 2880, 1716, 2796, -36, -42, 1872, 2992));
  381. sCodeTable.put(12, new Info_paper(2880, 3600, 2796, 3516, -36, -42, 2952, 3712));
  382. sCodeTable.put(13, new Info_paper(1417, 2125, 1333, 2041, -36, -42, 1489, 2237));
  383. sCodeTable.put(14, new Info_paper(3061, 4790, 2977, 4706, -36, -42, 3133, 4902));
  384. sCodeTable.put(15, new Info_paper(1261, 1800, 1177, 1716, -36, -42, 1333, 1912));
  385. sCodeTable.put(16, new Info_paper(1417, 2098, 1333, 2014, -36, -42, 1489, 2210));
  386. sCodeTable.put(17, new Info_paper(2835, 2098, 2751, 2014, -36, -42, 2907, 2210));
  387. sCodeTable.put(18, new Info_paper(3420, 1485, 3336, 1401, -36, -42, 3492, 1597));
  388. sCodeTable.put(19, new Info_paper(2296, 1616, 2212, 1532, -36, -42, 2368, 1728));
  389. sCodeTable.put(20, new Info_paper(3118, 1559, 3034, 1475, -36, -42, 3190, 1671));
  390. sCodeTable.put(21, new Info_paper(3118, 1871, 3034, 1787, -36, -42, 3190, 1983));
  391. sCodeTable.put(22, new Info_paper(1701, 3331, 1561, 3006, -36, -42, 1773, 3443));
  392. sCodeTable.put(23, new Info_paper(1276, 2906, 1136, 2581, -36, -42, 1348, 3018));
  393. sCodeTable.put(24, new Info_paper(1701, 2494, 1561, 2169, -36, -42, 1773, 2606));
  394. sCodeTable.put(25, new Info_paper(1616, 2296, 1476, 1971, -36, -42, 1688, 2408));
  395. sCodeTable.put(26, new Info_paper(1389, 2098, 1249, 1773, -36, -42, 1461, 2210));
  396. sCodeTable.put(27, new Info_paper(1488, 3331, 1348, 3006, -36, -42, 1560, 3443));
  397. sCodeTable.put(28, new Info_paper(1800, 2522, 1716, 2438, -36, -42, 1872, 2634));
  398. sCodeTable.put(29, new Info_paper(1485, 3420, 1345, 3095, -36, -42, 1557, 3532));
  399. sCodeTable.put(30, new Info_paper(1616, 2296, 1476, 1971, -36, -42, 1688, 2408));
  400. sCodeTable.put(31, new Info_paper(1559, 3118, 1419, 2793, -36, -42, 1631, 3230));
  401. sCodeTable.put(32, new Info_paper(1871, 3118, 1731, 2793, -36, -42, 1943, 3230));
  402. sCodeTable.put(33, new Info_paper(1261, 779, 1177, 695, -36, -42, 1333, 891));
  403. sCodeTable.put(34, new Info_paper(1261, 709, 1177, 625, -36, -42, 1333, 821));
  404. sCodeTable.put(35, new Info_paper(765, 1219, 681, 1135, -36, -42, 837, 1331));
  405. sCodeTable.put(36, new Info_paper(780, 1290, 696, 1206, -36, -42, 852, 1402));
  406. sCodeTable.put(37, new Info_paper(1800, 2607, 1716, 2523, -36, -42, 1872, 2719));
  407. sCodeTable.put(38, new Info_paper(2976, 4294, 2892, 4210, -36, -42, 3048, 4406));
  408. sCodeTable.put(39, new Info_paper(1800, 1260, 1716, 1176, -36, -42, 1872, 1372));
  409. sCodeTable.put(40, new Info_paper(1800, 2521, 1716, 2437, -36, -42, 1872, 2633));
  410. sCodeTable.put(41, new Info_paper(2976, 2101, 2892, 2017, -36, -42, 3048, 2213));
  411. sCodeTable.put(42, new Info_paper(2976, 4203, 2892, 4119, -36, -42, 3048, 4315));
  412. sCodeTable.put(43, new Info_paper(1440, 2560, 1356, 2476, -36, -42, 1512, 2672));
  413. sCodeTable.put(44, new Info_paper(3401, 4705, 2977, 4380, -36, -42, 3473, 4817));
  414. sCodeTable.put(45, new Info_paper(3245, 4592, 2977, 4267, -36, -42, 3317, 4704));
  415. sCodeTable.put(46, new Info_paper(1814, 2580, 1730, 2496, -48, -42, 1910, 2692));
  416. sCodeTable.put(47, new Info_paper(3245, 4592, 2977, 4267, -36, -42, 3317, 4704));
  417. sCodeTable.put(48, new Info_paper(2098, 2976, 1816, 2694, -36, -42, 2170, 3088));
  418. sCodeTable.put(52, new Info_paper(1276, 3189, 1136, 2736, -36, -42, 1348, 3301));
  419. sCodeTable.put(61, new Info_paper(4663, 6846, 4579, 6762, -48, -42, 4759, 6958));
  420. sCodeTable.put(62, new Info_paper(4209, 5953, 4125, 5869, -48, -42, 4305, 6065));
  421. sCodeTable.put(63, new Info_paper(3643, 5159, 3559, 5075, -48, -42, 3739, 5271));
  422. sCodeTable.put(64, new Info_paper(3960, 6120, 3876, 6036, -48, -42, 4056, 6232));
  423. sCodeTable.put(65, new Info_paper(3960, 5040, 3876, 4956, -48, -42, 4056, 5152));
  424. sCodeTable.put(66, new Info_paper(5159, 7299, 5075, 7215, -48, -42, 5255, 7411));
  425. sCodeTable.put(67, new Info_paper(5953, 8419, 5869, 8335, -48, -42, 6049, 8531));
  426. sCodeTable.put(68, new Info_paper(6120, 7920, 6036, 7836, -48, -42, 6216, 8032));
  427. sCodeTable.put(69, new Info_paper(3600, 4320, 3516, 4236, -48, -42, 3696, 4432));
  428. sCodeTable.put(70, new Info_paper(4320, 4320, 4236, 4236, -48, -42, 4416, 4432));
  429. sCodeTable.put(71, new Info_paper(2976, 3827, 2892, 3743, -36, -42, 3048, 3939));
  430. sCodeTable.put(72, new Info_paper(2976, 2112, 2892, 2028, -36, -42, 3048, 2224));
  431. sCodeTable.put(73, new Info_paper(1417, 2409, 1333, 2325, -36, -42, 1489, 2521));
  432. sCodeTable.put(74, new Info_paper(1843, 2580, 1759, 2496, -36, -42, 1915, 2692));
  433. sCodeTable.put(75, new Info_paper(2721, 1871, 2637, 1787, -36, -42, 2793, 1983));
  434. sCodeTable.put(76, new Info_paper(2764, 3827, 2680, 3743, -36, -42, 2836, 3939));
  435. sCodeTable.put(77, new Info_paper(3827, 5528, 3743, 5444, -36, -42, 3899, 5640));
  436. sCodeTable.put(87, new Info_paper(2976, 2976, 2892, 2892, -36, -42, 3048, 3088));
  437. sCodeTable.put(88, new Info_paper(1800, 1800, 1716, 1716, -36, -42, 1872, 1912));
  438. sCodeTable.put(99, new Info_paper(0, 0, 0, 0, -36, -42, 0, 0));
  439. sCodeTable.put(104, new Info_paper(2880, 3780, 2796, 3696, -36, -42, 2952, 3892));
  440. sCodeTable.put(106, new Info_paper(2976, 4678, 2892, 4594, -36, -42, 3048, 4790));
  441. sCodeTable.put(111, new Info_paper(2494, 3543, 2354, 3218, -36, -42, 2566, 3655));
  442. sCodeTable.put(128, new Info_paper(5040, 6120, 4956, 6036, -36, -42, 5112, 6232));
  443. sCodeTable.put(129, new Info_paper(5760, 7200, 5676, 7116, -36, -42, 5832, 7312));
  444. sCodeTable.put(255, new Info_paper(0, 0, 0, 0, 0, 0, 0, 0));
  445. }
  446. }
  447. public static class PaperType extends AbstractInfo {
  448. public PaperType() {
  449. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PLAIN));
  450. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_IRON.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_IRON));
  451. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PHOTOINKJET.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PHOTOINKJET));
  452. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_MATTE.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_MATTE));
  453. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PHOTO.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PHOTO));
  454. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_MINIPHOTO.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_MINIPHOTO));
  455. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PGPHOTO));
  456. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PSPHOTO.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PSPHOTO));
  457. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PLPHOTO.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PLPHOTO));
  458. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_ARCHMATTE.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_ARCHMATTE));
  459. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_WATERCOLOR.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_WATERCOLOR));
  460. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_ECOPHOTO.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_ECOPHOTO));
  461. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_VELVETFINEART.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_VELVETFINEART));
  462. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_HAGAKIRECL.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_HAGAKIRECL));
  463. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_HAGAKIINKJET.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_HAGAKIINKJET));
  464. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PHOTOINKJET2.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PHOTOINKJET2));
  465. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_MATTEMEISHI.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_MATTEMEISHI));
  466. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_HAGAKIATENA.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_HAGAKIATENA));
  467. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_ENVELOPE.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_ENVELOPE));
  468. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PLATINA.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PLATINA));
  469. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_ULTRASMOOTH.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_ULTRASMOOTH));
  470. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_SFHAGAKI.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_SFHAGAKI));
  471. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PHOTOSTD.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PHOTOSTD));
  472. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_GLOSSYHAGAKI.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_GLOSSYHAGAKI));
  473. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_GLOSSYPHOTO.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_GLOSSYPHOTO));
  474. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_GLOSSYCAST.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_GLOSSYCAST));
  475. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_THICKPAPER.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_THICKPAPER));
  476. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_BSMATTE_DS.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_BSMATTE_DS));
  477. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_3D.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_3D));
  478. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_LCPP.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_LCPP));
  479. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PREPRINTED.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PREPRINTED));
  480. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_LETTERHEAD.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_LETTERHEAD));
  481. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_RECYCLED.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_RECYCLED));
  482. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_COLOR.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_COLOR));
  483. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_BUSINESS_PLAIN.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_BUSINESS_PLAIN));
  484. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN_ROLL_STICKER.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PLAIN_ROLL_STICKER));
  485. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_GROSSY_ROLL_STICKER.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_GROSSY_ROLL_STICKER));
  486. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN1.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PLAIN1));
  487. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN2.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PLAIN2));
  488. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_THICKPAPER1.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_THICKPAPER1));
  489. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_THICKPAPER2.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_THICKPAPER2));
  490. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_THICKPAPER3.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_THICKPAPER3));
  491. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_THICKPAPER4.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_THICKPAPER4));
  492. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_THICKPAPER5.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_THICKPAPER5));
  493. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_HIGH_QUALITY_PLAIN.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_HIGH_QUALITY_PLAIN));
  494. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_BS_HALFGLOSSY_DS.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_BS_HALFGLOSSY_DS));
  495. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_CDDVD.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_CDDVD));
  496. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_CDDVDHIGH.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_CDDVDHIGH));
  497. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_PLOOFING_WHITE_MAT.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_PLOOFING_WHITE_MAT));
  498. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_BARYTA.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_BARYTA));
  499. sCodeTable.put(Integer.valueOf(Constants.MediaName.EPS_MTID_AUTO_PLAIN.getCode()), Integer.valueOf(C1055R.string.EPS_MTID_AUTO_PLAIN));
  500. }
  501. }
  502. public static class Layout extends AbstractInfo {
  503. public Layout() {
  504. sCodeTable.put(0, Integer.valueOf(C1055R.string.EPS_MLID_CUSTOM));
  505. sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_MLID_BORDERLESS));
  506. sCodeTable.put(2, Integer.valueOf(C1055R.string.EPS_MLID_BORDERS));
  507. sCodeTable.put(4, Integer.valueOf(C1055R.string.EPS_MLID_CDLABEL));
  508. }
  509. }
  510. public static class Quality extends AbstractInfo {
  511. public Quality() {
  512. sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_MQID_DRAFT));
  513. sCodeTable.put(2, Integer.valueOf(C1055R.string.EPS_MQID_NORMAL));
  514. sCodeTable.put(4, Integer.valueOf(C1055R.string.EPS_MQID_HIGH));
  515. sCodeTable.put(128, Integer.valueOf(C1055R.string.EPS_MQID_BEST_PLAIN));
  516. }
  517. }
  518. public static class PaperSource extends AbstractInfo {
  519. public PaperSource() {
  520. sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_MPID_REAR));
  521. sCodeTable.put(2, Integer.valueOf(C1055R.string.EPS_MPID_FRONT1));
  522. sCodeTable.put(4, Integer.valueOf(C1055R.string.EPS_MPID_FRONT2));
  523. sCodeTable.put(32, Integer.valueOf(C1055R.string.EPS_MPID_FRONT3));
  524. sCodeTable.put(64, Integer.valueOf(C1055R.string.EPS_MPID_FRONT4));
  525. sCodeTable.put(8, Integer.valueOf(C1055R.string.EPS_MPID_CDTRAY));
  526. sCodeTable.put(32768, Integer.valueOf(C1055R.string.EPS_MPID_MPTRAY));
  527. sCodeTable.put(16, Integer.valueOf(C1055R.string.EPS_MPID_REARMANUAL));
  528. sCodeTable.put(512, Integer.valueOf(C1055R.string.EPS_MPID_MANUAL2));
  529. sCodeTable.put(256, Integer.valueOf(C1055R.string.EPS_MPID_ROLL));
  530. sCodeTable.put(1024, Integer.valueOf(C1055R.string.EPS_MPID_MPTRAY_IJ));
  531. sCodeTable.put(2048, Integer.valueOf(C1055R.string.EPS_MPID_HIGHCAP));
  532. sCodeTable.put(128, Integer.valueOf(C1055R.string.EPS_MPID_AUTO));
  533. }
  534. }
  535. public static class PrintDate extends AbstractInfo {
  536. public PrintDate() {
  537. sCodeTable.put(0, Integer.valueOf(C1055R.string.Off));
  538. sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_PD_DATETYPE1));
  539. sCodeTable.put(2, Integer.valueOf(C1055R.string.EPS_PD_DATETYPE2));
  540. sCodeTable.put(3, Integer.valueOf(C1055R.string.EPS_PD_DATETYPE3));
  541. }
  542. }
  543. public static class PhotoeEhance extends AbstractInfo {
  544. public PhotoeEhance() {
  545. sCodeTable.put(0, Integer.valueOf(C1055R.string.EPS_APF_ON));
  546. sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_APF_OFF));
  547. }
  548. }
  549. public static class Color extends AbstractInfo {
  550. public Color() {
  551. sCodeTable.put(0, Integer.valueOf(C1055R.string.EPS_CM_COLOR));
  552. sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_CM_MONOCHROME));
  553. }
  554. }
  555. public static class Duplex extends AbstractInfo {
  556. public Duplex() {
  557. sCodeTable.put(0, Integer.valueOf(C1055R.string.EPS_DUPLEX_NONE));
  558. sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_DUPLEX_LONG));
  559. sCodeTable.put(2, Integer.valueOf(C1055R.string.EPS_DUPLEX_SHORT));
  560. }
  561. }
  562. public static class FeedDirection extends AbstractInfo {
  563. public FeedDirection() {
  564. sCodeTable.put(0, Integer.valueOf(C1055R.string.EPS_FEEDDIR_PORTRAIT));
  565. sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_FEEDDIR_LANDSCAPE));
  566. }
  567. }
  568. public static class PaperSizeType extends AbstractInfo {
  569. public PaperSizeType() {
  570. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A4.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN.getCode()));
  571. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_LETTER.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN.getCode()));
  572. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_LEGAL.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN.getCode()));
  573. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A5.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  574. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A6.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  575. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B5.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  576. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_EXECUTIVE.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  577. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_HALFLETTER.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  578. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PANORAMIC.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  579. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_TRIM_4X6.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  580. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_4X6.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  581. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_5X8.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  582. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_8X10.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  583. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_10X15.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  584. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_200X300.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  585. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  586. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_POSTCARD.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  587. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_DBLPOSTCARD.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  588. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_10_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  589. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_C6_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  590. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_DL_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  591. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_NEWEVN_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  592. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_CHOKEI_3.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  593. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_CHOKEI_4.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  594. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_1.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  595. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_2.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  596. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_3.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  597. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_YOKEI_4.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  598. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_2L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  599. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_10_P.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  600. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_C6_P.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  601. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_DL_P.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  602. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_NEWENV_P.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  603. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_MEISHI.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  604. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_BUZCARD_89X50.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  605. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_CARD_54X86.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  606. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_BUZCARD_55X91.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  607. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ALBUM_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  608. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ALBUM_A5.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  609. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_L_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  610. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_2L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  611. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_A5_L.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  612. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_PALBUM_A4.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  613. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_HIVISION.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  614. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_KAKU_2.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  615. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_ENV_C4_P.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  616. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B6.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  617. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_KAKU_20.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  618. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A3NOBI.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  619. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A3.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  620. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B4.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  621. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_USB.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PLAIN.getCode()));
  622. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_11X14.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  623. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_B3.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  624. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_A2.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  625. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_USC.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  626. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_10X12.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  627. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_12X12.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  628. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_USER.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  629. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_HALFCUT.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  630. sCodeTable.put(Integer.valueOf(Constants.PaperName.EPS_MSID_16X20.getCode()), Integer.valueOf(Constants.MediaName.EPS_MTID_PGPHOTO.getCode()));
  631. }
  632. }
  633. public static class ApfState extends AbstractInfo {
  634. public ApfState() {
  635. sCodeTable.put(0, Integer.valueOf(C1055R.string.EPS_APF_OFF));
  636. sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_APF_ON));
  637. }
  638. }
  639. public static class SharpnessState extends AbstractInfo {
  640. public SharpnessState() {
  641. sCodeTable.put(0, Integer.valueOf(C1055R.string.EPS_SHARPNESS_OFF));
  642. sCodeTable.put(1, Integer.valueOf(C1055R.string.EPS_SHARPNESS_ON));
  643. }
  644. }
  645. }