DisplayUtil.java 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. package epson.print.copy;
  2. import android.content.Context;
  3. import android.support.annotation.NonNull;
  4. import android.support.annotation.StringRes;
  5. import epson.print.R;
  6. import epson.print.copy.Component.ecopycomponent.ECopyOptionItem;
  7. import epson.print.rpcopy.Component.ecopycomponent.ECopyOptionItem;
  8. import java.util.HashMap;
  9. public class DisplayUtil {
  10. public static void setMap(Context context, HashMap<String, String> hashMap) {
  11. hashMap.put("ColorEffectsType", context.getString(R.string.color));
  12. hashMap.put("ColorEffectsType_Color", context.getString(R.string.EPS_CM_COLOR));
  13. hashMap.put("ColorEffectsType_MonochromeGrayscale", context.getString(R.string.EPS_CM_MONOCHROME));
  14. hashMap.put("ScanContentType", context.getString(R.string.document_type));
  15. hashMap.put("ScanContentType_Text", context.getString(R.string.ScanContentType_Text));
  16. hashMap.put("ScanContentType_Mixed", context.getString(R.string.ScanContentType_Mixed));
  17. hashMap.put("ScanContentType_Photographic", context.getString(R.string.ScanContentType_Photographic));
  18. hashMap.put("PrintMediaSource", context.getString(R.string.paper_source));
  19. hashMap.put("PrintMediaSource_Top", context.getString(R.string.CopySourceUp));
  20. hashMap.put("PrintMediaSource_Bottom", context.getString(R.string.CopySourceDown));
  21. hashMap.put("PrintMediaSource_Rear", context.getString(R.string.EPS_MPID_REAR));
  22. hashMap.put("PrintMediaSource_Manual", context.getString(R.string.EPS_MPID_REARMANUAL));
  23. hashMap.put("PrintMediaType", context.getString(R.string.paper_type));
  24. hashMap.put("PrintMediaType_Stationery", context.getString(R.string.EPS_MTID_PLAIN));
  25. hashMap.put("PrintMediaType_PhotographicHighGloss", context.getString(R.string.EPS_MTID_PLATINA));
  26. hashMap.put("PrintMediaType_Photographic", context.getString(R.string.EPS_MTID_PGPHOTO));
  27. hashMap.put("PrintMediaType_PhotographicSemiGloss", context.getString(R.string.EPS_MTID_PSPHOTO));
  28. hashMap.put("PrintMediaType_PhotographicGlossy", context.getString(R.string.EPS_MTID_LCPP));
  29. hashMap.put("PrintMediaType_CustomMediaTypeEpson44", context.getString(R.string.EPS_MTID_GLOSSYCAST));
  30. hashMap.put("PrintMediaType_PhotographicMatte", context.getString(R.string.EPS_MTID_MATTE));
  31. hashMap.put("PrintMediaType_StationeryCoated", context.getString(R.string.EPS_MTID_PHOTOINKJET2));
  32. hashMap.put("PrintMediaType_CustomMediaTypeEpson2A", context.getString(R.string.EPS_MTID_GLOSSYHAGAKI));
  33. hashMap.put("PrintMediaType_StationeryInkjet", context.getString(R.string.EPS_MTID_HAGAKIINKJET));
  34. hashMap.put("PrintMediaType_CustomMediaTypeEpson1B", context.getString(R.string.EPS_MTID_HAGAKIRECL));
  35. hashMap.put("PrintMediaType_CustomMediaTypeEpson02", context.getString(R.string.EPS_MTID_IRON));
  36. hashMap.put("PrintMediaType_CustomMediaTypeEpson19", context.getString(R.string.EPS_MTID_VELVETFINEART));
  37. hashMap.put("PrintMediaType_Lebals", context.getString(R.string.EPS_MTID_MINIPHOTO));
  38. hashMap.put("PrintMediaType_Envelope", context.getString(R.string.EPS_MTID_ENVELOPE));
  39. hashMap.put("PrintMediaType_DBLMEISHI_HALFGROSSY", context.getString(R.string.EPS_MTID_BS_HALFGLOSSY_DS));
  40. hashMap.put("PrintMediaType_HagakiAtena", context.getString(R.string.EPS_MTID_HAGAKIATENA));
  41. hashMap.put("PrintMediaType_BussnessPlain", context.getString(R.string.EPS_MTID_BUSINESS_PLAIN));
  42. for (EnumAndDisplayStringId addHashMap : new EnumAndDisplayStringId[]{new EnumAndDisplayStringId(ECopyOptionItem.ECopyOptionItemChoice.PrintMediaType_StationeryHeavyweight, R.string.EPS_MTID_THICKPAPER), new EnumAndDisplayStringId(ECopyOptionItem.ECopyOptionItemChoice.PrintMediaType_StationeryLetterhead, R.string.EPS_MTID_LETTERHEAD), new EnumAndDisplayStringId(ECopyOptionItem.ECopyOptionItemChoice.PrintMediaType_BrightColorPlain, R.string.EPS_MTID_HIGH_QUALITY_PLAIN)}) {
  43. addHashMap.addHashMap(context, hashMap);
  44. }
  45. hashMap.put("PrintMediaSize", context.getString(R.string.paper_size));
  46. hashMap.put("PrintMediaSize_A4", context.getString(R.string.EPS_MSID_A4));
  47. hashMap.put("PrintMediaSize_B4", context.getString(R.string.EPS_MSID_B4));
  48. hashMap.put("PrintMediaSize_B5", context.getString(R.string.EPS_MSID_B5));
  49. hashMap.put("PrintMediaSize_L", context.getString(R.string.EPS_MSID_L));
  50. hashMap.put("PrintMediaSize_2L", context.getString(R.string.EPS_MSID_2L));
  51. hashMap.put("PrintMediaSize_Postcard", context.getString(R.string.EPS_MSID_POSTCARD));
  52. hashMap.put("PrintMediaSize_KG", context.getString(R.string.EPS_MSID_TRIM_4X6));
  53. hashMap.put("PrintMediaSize_8x10in", context.getString(R.string.EPS_MSID_8X10));
  54. hashMap.put("PrintMediaSize_Letter", context.getString(R.string.EPS_MSID_LETTER));
  55. hashMap.put("PrintMediaSize_Legal", context.getString(R.string.EPS_MSID_LEGAL));
  56. hashMap.put("PrintMediaSize_A5", context.getString(R.string.EPS_MSID_A5));
  57. hashMap.put("PrintMediaSize_254x305mm", context.getString(R.string.EPS_MSID_10X12));
  58. hashMap.put("PrintMediaSize_A3", context.getString(R.string.EPS_MSID_A3));
  59. hashMap.put("PrintMediaSize_US_B", context.getString(R.string.EPS_MSID_USB));
  60. hashMap.put("PrintMediaSize_A6", context.getString(R.string.EPS_MSID_A6));
  61. hashMap.put("PrintMediaSize_CHOU3", context.getString(R.string.EPS_MSID_CHOKEI_3));
  62. hashMap.put("PrintMediaSize_CHOU4", context.getString(R.string.EPS_MSID_CHOKEI_4));
  63. hashMap.put("PrintMediaSize_YOU1", context.getString(R.string.EPS_MSID_YOKEI_1));
  64. hashMap.put("PrintMediaSize_YOU3", context.getString(R.string.EPS_MSID_YOKEI_3));
  65. hashMap.put("PrintMediaSize_YOU4", context.getString(R.string.EPS_MSID_YOKEI_4));
  66. hashMap.put("PrintMediaSize_YOU2", context.getString(R.string.EPS_MSID_YOKEI_2));
  67. hashMap.put("PrintMediaSize_KAKU2", context.getString(R.string.EPS_MSID_KAKU_2));
  68. hashMap.put("PrintMediaSize_KAKU20", context.getString(R.string.EPS_MSID_KAKU_20));
  69. hashMap.put("PrintMediaSize_MEISHI", context.getString(R.string.EPS_MSID_MEISHI));
  70. hashMap.put("PrintMediaSize_CARD", context.getString(R.string.EPS_MSID_CARD_54X86));
  71. hashMap.put("PrintMediaSize_Hivision", context.getString(R.string.EPS_MSID_HIVISION));
  72. hashMap.put("PrintMediaSize_EnvelopeDL", context.getString(R.string.EPS_MSID_ENV_DL_P));
  73. hashMap.put("PrintMediaSize_B6", context.getString(R.string.EPS_MSID_B6));
  74. hashMap.put("PrintMediaSize_Executive", context.getString(R.string.EPS_MSID_EXECUTIVE));
  75. hashMap.put("PrintMediaSize_8d5x13in", context.getString(R.string.EPS_MSID_8_5X13));
  76. hashMap.put("PrintMediaSize_11x14in", context.getString(R.string.EPS_MSID_11X14));
  77. hashMap.put("PrintMediaSize_EnvelopeNumber10", context.getString(R.string.EPS_MSID_ENV_10_P));
  78. hashMap.put("PrintMediaSize_8K", context.getString(R.string.EPS_MSID_8K));
  79. hashMap.put("PrintMediaSize_16K", context.getString(R.string.EPS_MSID_16K));
  80. hashMap.put("PrintMediaSize_HalfLetter", context.getString(R.string.EPS_MSID_HALFLETTER));
  81. hashMap.put("PrintMediaSize_IndianLegal215x345mm", context.getString(R.string.EPS_MSID_INDIAN_LEGAL));
  82. hashMap.put("PrintMediaSize_MexicoOficio8d5x13d4in", context.getString(R.string.EPS_MSID_MEXICO_OFICIO));
  83. hashMap.put("PrintMediaSize_Oficio9_8d46x12d4in", context.getString(R.string.EPS_MSID_OFICIO9));
  84. hashMap.put("PrintQuality", context.getString(R.string.quality));
  85. hashMap.put("PrintQuality_Economy", context.getString(R.string.CopyQualityDraft));
  86. hashMap.put("PrintQuality_Normal", context.getString(R.string.CopyQualityStandard));
  87. hashMap.put("PrintQuality_High", context.getString(R.string.CopyQualityBest));
  88. hashMap.put("PrintQuality_Best", context.getString(R.string.CopyQualityXBest));
  89. hashMap.put("XScale", context.getString(R.string.copy_scale));
  90. hashMap.put("XScale_FullSize", context.getString(R.string.XScale_FullSize));
  91. hashMap.put("XScale_Custom", context.getString(R.string.XScale_Custom));
  92. hashMap.put("XScale_Autofit", context.getString(R.string.XScale_Autofit));
  93. hashMap.put("XScale_Letter_to_KG", context.getString(R.string.XScale_Letter_to_KG));
  94. hashMap.put("XScale_KG_to_Letter", context.getString(R.string.XScale_KG_to_Letter));
  95. hashMap.put("XScale_Letter_to_2L", context.getString(R.string.XScale_Letter_to_2L));
  96. hashMap.put("XScale_2L_to_Letter", context.getString(R.string.XScale_2L_to_Letter));
  97. hashMap.put("XScale_KG_to_A4", context.getString(R.string.XScale_KG_to_A4));
  98. hashMap.put("XScale_A4_to_KG", context.getString(R.string.XScale_A4_to_KG));
  99. hashMap.put("XScale_2L_to_A4", context.getString(R.string.XScale_2L_to_A4));
  100. hashMap.put("XScale_A4_to_2L", context.getString(R.string.XScale_A4_to_2L));
  101. hashMap.put("XScale_KG_to_8x10", context.getString(R.string.XScale_KG_to_8x10));
  102. hashMap.put("XScale_8x10_to_2L", context.getString(R.string.XScale_8x10_to_2L));
  103. hashMap.put("XScale_Legal_to_Letter", context.getString(R.string.XScale_Legal_to_Letter));
  104. hashMap.put("XScale_A4_to_Postcard", context.getString(R.string.XScale_A4_to_Postcard));
  105. hashMap.put("XScale_2L_to_Postcard", context.getString(R.string.XScale_2L_to_Postcard));
  106. hashMap.put("XScale_L_to_Postcard", context.getString(R.string.XScale_L_to_Postcard));
  107. hashMap.put("XScale_L_to_2L", context.getString(R.string.XScale_L_to_2L));
  108. hashMap.put("XScale_Postcard_to_A4", context.getString(R.string.XScale_Postcard_to_A4));
  109. hashMap.put("XScale_L_to_A4", context.getString(R.string.XScale_L_to_A4));
  110. hashMap.put("XScale_A4_to_B5", context.getString(R.string.XScale_A4_to_B5));
  111. hashMap.put("XScale_B5_to_A4", context.getString(R.string.XScale_B5_to_A4));
  112. hashMap.put("XScale_2L_to_KG", context.getString(R.string.XScale_2L_to_KG));
  113. hashMap.put("XScale_KG_to_2L", context.getString(R.string.XScale_KG_to_2L));
  114. hashMap.put("XScale_A5_to_A4", context.getString(R.string.XScale_A5_to_A4));
  115. hashMap.put("XScale_A4_to_A5", context.getString(R.string.XScale_A4_to_A5));
  116. hashMap.put("XScale_A4_to_A3", context.getString(R.string.XScale_A4_to_A3));
  117. hashMap.put("XScale_Letter_to_11x17", context.getString(R.string.XScale_Letter_to_USB));
  118. hashMap.put(ECopyOptionItem.ECopyOptionItemKey.RepeatLayout.name(), context.getString(R.string.ECopyOptionItemKeyLayout));
  119. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.RepeatLayout_twoRepeat.name(), context.getString(R.string.ECopyOptionItemChoiceLayout_2Repeat));
  120. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.RepeatLayout_fourRepeat.name(), context.getString(R.string.ECopyOptionItemChoiceLayout_4Repeat));
  121. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.RepeatLayout_autoRepeat.name(), context.getString(R.string.ECopyOptionItemChoiceLayout_AutoRepeat));
  122. hashMap.put(ECopyOptionItem.ECopyOptionItemKey.RemoveBackground.name(), context.getString(R.string.ECopyOptionItemKeyXRemoveBackground));
  123. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.XRemoveBackground_On.name(), context.getString(R.string.ECopyOptionItemChoiceXRemoveBackground_On));
  124. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.XRemoveBackground_Off.name(), context.getString(R.string.ECopyOptionItemChoiceXRemoveBackground_Off));
  125. hashMap.put(ECopyOptionItem.ECopyOptionItemKey.XCutLine.name(), context.getString(R.string.ECopy_print_a_cut_line_option_key));
  126. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.XCutLine_Dash.name(), context.getString(R.string.ECopyOptionItemChoiceXPrintCutLine_Dash));
  127. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.XCutLine_On.name(), context.getString(R.string.ECopy_print_a_cut_line_option_key_on_item));
  128. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.XCutLine_Off.name(), context.getString(R.string.ECopy_print_a_cut_line_option_key_off_item));
  129. hashMap.put(ECopyOptionItem.ECopyOptionItemKey.XCutLineStyle.name(), context.getString(R.string.ECopy_line_style_option_key));
  130. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.XCutLineStyle_Dash.name(), context.getString(R.string.ECopyOptionItemChoiceXPrintCutLineStyle_Dash));
  131. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.XCutLineStyle_Dot.name(), context.getString(R.string.ECopy_line_style_option_key_dotted_line_item));
  132. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.XCutLineStyle_Continuous.name(), context.getString(R.string.ECopy_line_style_option_key_solidline_item));
  133. hashMap.put(ECopyOptionItem.ECopyOptionItemKey.XCutLineWeight.name(), context.getString(R.string.ECopy_line_width_option_key));
  134. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.XCutLineWidth_Dash.name(), context.getString(R.string.ECopyOptionItemChoiceXPrintCutLineWeight_Dash));
  135. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.XCutLineWidth_Thin.name(), context.getString(R.string.ECopy_line_width_option_key_thin_item));
  136. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.XCutLineWidth_Medium.name(), context.getString(R.string.ECopy_line_width_option_key_standard_item));
  137. hashMap.put(ECopyOptionItem.ECopyOptionItemChoice.XCutLineWidth_Thick.name(), context.getString(R.string.ECopy_line_width_option_key_thick_item));
  138. }
  139. static class EnumAndDisplayStringId {
  140. final ECopyOptionItem.ECopyOptionItemChoice copyParamEnum;
  141. @StringRes
  142. /* renamed from: id */
  143. final int f384id;
  144. EnumAndDisplayStringId(@NonNull ECopyOptionItem.ECopyOptionItemChoice eCopyOptionItemChoice, @StringRes int i) {
  145. this.copyParamEnum = eCopyOptionItemChoice;
  146. this.f384id = i;
  147. }
  148. private void addHashMap(@NonNull Context context, @NonNull HashMap<String, String> hashMap) {
  149. hashMap.put(this.copyParamEnum.name(), context.getString(this.f384id));
  150. }
  151. }
  152. }