Advertisement
Guest User

Untitled

a guest
Jan 12th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. private void insertDropDowns(StringBuilder sB, String comp) {
  2. String temp = "</table>";
  3. int i = sB.indexOf(temp);
  4. if (Main.numSelect == 1) {
  5. String s = "<tr>";
  6. s += "<td/>";
  7. s += "<td align=\"center\">";
  8. if (!Main.depSel.isEmpty()) {
  9. s += "D�partement";
  10. } else if (Main.actSel != null) {
  11. s += "Activit�";
  12. } else if (Main.projSel != null) {
  13. s += "Projet";
  14. }
  15. s += "</td>";
  16. s += "<td/>";
  17. s += "</tr>";
  18. s += "<tr>";
  19. s += "<td/>";
  20. s += "<td align=\"center\">";
  21. if (!Main.depSel.isEmpty() && Main.depSel.containsKey(comp)) {
  22. s += Main.depSel.get(comp);
  23. } else if (Main.actSel != null) {
  24. s += Main.actSel;
  25. } else if (Main.projSel != null) {
  26. s += Main.projSel;
  27. }
  28. s += "</td>";
  29. s += "<td/>";
  30. s += "</tr>";
  31. sB.insert(i, s);
  32. } else if (Main.numSelect == 2) {
  33. String s = "<tr>";
  34. boolean act = false;
  35. s += "<td align=\"center\">";
  36. if (!Main.depSel.isEmpty()) {
  37. s += "D�partement";
  38. } else if (Main.actSel != null) {
  39. s += "Activit�";
  40. act = true;
  41. }
  42. s += "</td>";
  43. s += "<td/>";
  44. s += "<td align=\"center\">";
  45. if (Main.actSel != null && !act) {
  46. s += "Activit�";
  47. } else if (Main.projSel != null) {
  48. s += "Projet";
  49. }
  50. s += "</td>";
  51. s += "</tr>";
  52. s += "<tr>";
  53. s += "<td align=\"center\">";
  54. if (!Main.depSel.isEmpty() && Main.depSel.containsKey(comp)) {
  55. s += Main.depSel.get(comp);
  56. } else if (Main.actSel != null) {
  57. s += Main.actSel;
  58. }
  59. s += "</td>";
  60. s += "<td/>";
  61. s += "<td align=\"center\">";
  62. if (Main.actSel != null && !act) {
  63. s += Main.actSel;
  64. } else if (Main.projSel != null) {
  65. s += Main.projSel;
  66. }
  67. s += "</td>";
  68. s += "</tr>";
  69. sB.insert(i, s);
  70. } else if (Main.numSelect == 3) {
  71. String s = "<tr>";
  72. s += "<td align=\"center\">";
  73. if (!Main.depSel.isEmpty()) {
  74. s += "D�partement";
  75. }
  76. s += "</td>";
  77. s += "<td align=\"center\">";
  78. if (Main.actSel != null) {
  79. s += "Activit�";
  80. }
  81. s += "</td>";
  82. s += "<td align=\"center\">";
  83. if (Main.projSel != null) {
  84. s += "Projet";
  85. }
  86. s += "</td>";
  87. s += "</tr>";
  88. s += "<tr>";
  89. s += "<td align=\"center\">";
  90. if (!Main.depSel.isEmpty() && Main.depSel.containsKey(comp)) {
  91. s += Main.depSel.get(comp);
  92. }
  93. s += "</td>";
  94. s += "<td align=\"center\">";
  95. if (Main.actSel != null) {
  96. s += Main.actSel;
  97. }
  98. s += "</td>";
  99. s += "<td align=\"center\">";
  100. if (Main.projSel != null) {
  101. s += Main.projSel;
  102. }
  103. s += "</td>";
  104. s += "</tr>";
  105. sB.insert(i, s);
  106. }
  107. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement