Sidebar-Android.js 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. (function()
  2. {
  3. // Adds Android shapes
  4. Sidebar.prototype.addAndroidPalette = function()
  5. {
  6. var sizeX = 211; //reference size for iPhone and all other iOS shapes
  7. var sizeY = 2 * sizeX; //change only sizeX, to avoid changing aspect ratio
  8. var sb = this;
  9. var s = 'strokeWidth=1;html=1;shadow=0;dashed=0;shape=mxgraph.android.';
  10. var sm = 'strokeWidth=2;shadow=0;dashed=0;html=1;shape=mxgraph.android.';
  11. var s2 = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;html=1;shadow=0;dashed=0;strokeWidth=1;shape=mxgraph.android.';
  12. var s3 = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;html=1;shadow=0;dashed=0;strokeWidth=1;strokeColor=none;shape=';
  13. var s4 = 'rounded=1;html=1;shadow=0;dashed=0;whiteSpace=wrap;fontSize=10;fillColor=#';
  14. var s5 = 'whiteSpace=wrap;html=1;shadow=0;dashed=0;fontSize=10;align=left;fillColor=#';
  15. var s6 = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;html=1;shadow=0;dashed=0;strokeWidth=2;shape=mxgraph.android.';
  16. //default tags
  17. var dt = 'android ';
  18. var fns =
  19. [
  20. this.createVertexTemplateEntry(s2 + 'phone2;fillColor=#ffffff;strokeColor=#c0c0c0;',
  21. 200, 390, '', 'Phone', null, null, dt + 'phone mobile portrait'),
  22. this.createVertexTemplateEntry(s2 + 'phone2;fillColor=#ffffff;strokeColor=#c0c0c0;direction=south;',
  23. 390, 200, '', 'Phone (landscape)', null, null, dt + 'phone mobile landscape'),
  24. this.createVertexTemplateEntry(s2 + 'tab2;fillColor=#ffffff;strokeColor=#c0c0c0;',
  25. 472, 686, '', 'Tab', null, null, dt + 'tab tablet portrait'),
  26. this.createVertexTemplateEntry(s2 + 'tab2;fillColor=#ffffff;strokeColor=#c0c0c0;direction=north;',
  27. 686, 472, '', 'Tab (landscape)', null, null, dt + 'tab tablet landscape'),
  28. this.createVertexTemplateEntry(s + 'action_bar;fillColor=#1A1A1A;strokeColor=#c0c0c0;strokeWidth=2;fontColor=#FFFFFF;',
  29. 185, 30, '', 'Action Bar', null, null, dt + 'action bar dark portrait'),
  30. this.createVertexTemplateEntry(s + 'action_bar;fillColor=#E6E6E6;strokeColor=#c0c0c0;strokeWidth=2;',
  31. 185, 30, '', 'Action Bar (Bright)', null, null, dt + 'action bar bright portrait'),
  32. this.createVertexTemplateEntry(s + 'action_bar_landscape;fillColor=#1A1A1A;strokeColor=#c0c0c0;strokeWidth=2;fontColor=#FFFFFF;',
  33. 320, 30, '', 'Action Bar Landscape', null, null, dt + 'action bar landscape dark'),
  34. this.createVertexTemplateEntry(s + 'action_bar_landscape;fillColor=#E6E6E6;strokeColor=#c0c0c0;strokeWidth=2;',
  35. 320, 30, '', 'Action Bar Landscape (Bright)', null, null, dt + 'action bar bright landscape'),
  36. this.createVertexTemplateEntry(s4 + '666666;align=center;strokeColor=#4D4D4D;fontColor=#ffffff;',
  37. sizeX * 0.5, sizeY * 0.04, 'Normal', 'Button (Normal)', null, null, dt + 'button normal'),
  38. this.createVertexTemplateEntry(s4 + '666666;align=center;strokeColor=#999999;fontColor=#ffffff;',
  39. sizeX * 0.5, sizeY * 0.04, 'Focused', 'Button (Focused)', null, null, dt + 'button focused'),
  40. this.createVertexTemplateEntry(s4 + '999999;align=center;strokeColor=#666666;fontColor=#ffffff;strokeWidth=2;',
  41. sizeX * 0.5, sizeY * 0.04, 'Pressed', 'Button (Pressed)', null, null, dt + 'button pressed'),
  42. this.createVertexTemplateEntry(s4 + '333333;align=center;strokeColor=#4D4D4D;fontColor=#666666;',
  43. sizeX * 0.5, sizeY * 0.04, 'Focused disabled', 'Button (Focused, Disabled)', null, null, dt + 'button focused disabled'),
  44. this.createVertexTemplateEntry(s4 + '333333;align=center;strokeColor=#333333;fontColor=#666666;',
  45. sizeX * 0.5, sizeY * 0.04, 'Disabled', 'Button (Disabled)', null, null, dt + 'button disabled'),
  46. this.createVertexTemplateEntry(s4 + 'E6E6E6;align=center;strokeColor=#E6E6E6;fontColor=#333333;',
  47. sizeX * 0.5, sizeY * 0.04, 'Normal', 'Button (Normal, Bright)', null, null, dt + 'button normal bright'),
  48. this.createVertexTemplateEntry(s4 + 'E6E6E6;align=center;strokeColor=#B3B3B3;fontColor=#333333;',
  49. sizeX * 0.5, sizeY * 0.04, 'Focused', 'Button (Focused, Bright)', null, null, dt + 'button focused bright'),
  50. this.createVertexTemplateEntry(s4 + 'B3B3B3;align=center;strokeColor=#E6E6E6;fontColor=#333333;strokeWidth=2;',
  51. sizeX * 0.5, sizeY * 0.04, 'Pressed', 'Button (Pressed, Bright)', null, null, dt + 'button pressed bright'),
  52. this.createVertexTemplateEntry(s4 + 'F4F4F4;align=center;strokeColor=#E6E6E6;fontColor=#CCCCCC;',
  53. sizeX * 0.5, sizeY * 0.04, 'Focused disabled', 'Button (Focused, Disabled, Bright)', null, null, dt + 'button focused disabled bright'),
  54. this.createVertexTemplateEntry(s4 + 'F4F4F4;align=center;strokeColor=#F4F4F4;fontColor=#CCCCCC;',
  55. sizeX * 0.5, sizeY * 0.04, 'Disabled', 'Button (Disabled, Bright)', null, null, dt + 'button disabled bright'),
  56. this.addDataEntry(dt + 'checkboxes checkbox', 165, 50, 'Checkboxes',
  57. '5ZjPb4IwFMf/Go4zlArqdbh52U4edq7wpMRCSekm+NevtZ1uE43R2ZB5MPT9Ko+v7xNSPBwXzUyQir7yFJiHnzwcC86lWRVNDIx5gZ+nHp56QeCrnxc8H4mibdSviIBSnlMQmIIPwt7BeIyjli2zjloKvoK3PJVUOZCHH6ksmF3WlKR8rQxfGSmpKaTWUJFK71A0mX66ASlTwfNUXRPKhUqwdwYhoTna/dZlW58BL0CKVqWsbTc6IwpNGYU8o7YsNE/tk9rY2a50r4VaWDm6pcEH0sxByrzMlBM5U4mwPCtVAoOl1PkVSVQLL1trivQWS17Keb7Ru4ytGXOmi1VfGONFCOG5cgeXyY2CQXi94MOezyLuFqc10eh6AULnAggBiR4rYQdI5wqo8w1ZsC/b3PLikRp2q2YLdoNjVXzYOb7NXBfg16sdneDb3eT1gu/2N8ZugB/1HPjo1sCP/yPwo74CPzkBPL5L4AOnuCO/57xPbs07Qs4VSCgkqwVvbsu8+Wv7CD06POHsqR/eJfV45PY1jw5PUv3iHp3W6y/Ad3+2cfCmR0dORM6pV+b+k8k29uOLyic='),
  58. this.addDataEntry(dt + 'radiobuttons radiobutton', 165, 50, 'Radiobuttons',
  59. '5ZhNb4IwGMc/DccZ2grqVdy8bNlhh52rVNqsUFK6CX76Fdqgm7CQqaSJB0Kft9LnT38hxUNRWq4lzumLiAn30KOHIimEMqO0jAjnHvRZ7KGVB6GvLw8+9URBE/VzLEmmhhRAU/CF+ScxHuMoVMWto1BSfJB3FiuqHcBDS6pSbocFxbHYa8PXRowLSmJr6Ehez5CWSd3dBGexFCzW9y0VUifYJxOpSNm7+sZll74mIiVKVjplb1dTZ4SBKaOEJdSWBaZrHxfGTtrSoxZ6YOXolgadSfOaKyYy7QOjiYQ5SzKdwMlO1fk53rIseW6sFain2IlMvbFDPcvcmpHgdbFeF0JoE5BgqNrwf2oDOAku13vq+FZE3eJUJhpeLkAwQADbiS5keaFHS0kKdsCbJqHptZGoawecSDWo32l3v7agfeW2/4fWcbJbusi8XKewH8zxtowTYFa/+RuH1JnjpIa3JnXuFqkzV0ld9JOK7pJUOCqnwHcc1MWtQQXgtqTuGOfXINi8KRcRBucnhJbh6V0yjGbjfm3B+UHELYrB33pdA+MhZ4MRP7ig5ywwOq7aPP4raGI/fiV8Aw=='),
  60. this.createVertexTemplateEntry(s2 + 'contact_badge_focused;', 40, 40, '', 'Contact Badge Focused', null, null, dt + 'contact badge focused'),
  61. this.createVertexTemplateEntry(s2 + 'contact_badge_focused;', 60, 60, '', 'Contact Badge Focused', null, null, dt + 'contact badge focused'),
  62. this.createVertexTemplateEntry(s2 + 'contact_badge_normal;', 40, 40, '', 'Contact Badge Normal', null, null, dt + 'contact badge normal'),
  63. this.createVertexTemplateEntry(s2 + 'contact_badge_normal;', 60, 60, '', 'Contact Badge Normal', null, null, dt + 'contact badge normal'),
  64. this.createVertexTemplateEntry(s2 + 'contact_badge_pressed;', 40, 40, '', 'Contact Badge Pressed', null, null, dt + 'contact badge pressed'),
  65. this.createVertexTemplateEntry(s2 + 'contact_badge_pressed;', 60, 60, '', 'Contact Badge Pressed', null, null, dt + 'contact badge pressed'),
  66. this.addEntry(dt + 'contextual action bar dark portrait', function()
  67. {
  68. var bg = new mxCell('', new mxGeometry(0, 0, 185, 30), s + 'contextual_action_bar;fillColor=#002E3E;');
  69. bg.vertex = true;
  70. var text1 = new mxCell('Action', new mxGeometry(40, 0, 100, 30), s + 'anchor;align=left;fontStyle=1;fontColor=#ffffff;');
  71. text1.vertex = true;
  72. bg.insert(text1);
  73. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Contextual Action Bar');
  74. }),
  75. this.addEntry(dt + 'contextual action bar bright portrait', function()
  76. {
  77. var bg = new mxCell('', new mxGeometry(0, 0, 185, 30), s + 'contextual_action_bar_white;fillColor=#E6E6E6;');
  78. bg.vertex = true;
  79. var text1 = new mxCell('Action', new mxGeometry(40, 0, 100, 30), s + 'anchor;align=left;fontStyle=1;');
  80. text1.vertex = true;
  81. bg.insert(text1);
  82. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Contextual Action Bar (Bright)');
  83. }),
  84. this.addEntry(dt + 'contextual action bar landscape dark', function()
  85. {
  86. var bg = new mxCell('', new mxGeometry(0, 0, 320, 30), s + 'contextual_action_bar_landscape;fillColor=#002E3E;');
  87. bg.vertex = true;
  88. var text1 = new mxCell('Action', new mxGeometry(40, 0, 100, 30), s + 'anchor;align=left;fontStyle=1;fontColor=#ffffff;');
  89. text1.vertex = true;
  90. bg.insert(text1);
  91. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Contextual Action Bar Landscape');
  92. }),
  93. this.addEntry(dt + 'contextual action bar landscape bright', function()
  94. {
  95. var bg = new mxCell('', new mxGeometry(0, 0, 320, 30), s + 'contextual_action_bar_landscape_white;fillColor=#E6E6E6;');
  96. bg.vertex = true;
  97. var text1 = new mxCell('Action', new mxGeometry(40, 0, 100, 30), s + 'anchor;align=left;fontStyle=1;');
  98. text1.vertex = true;
  99. bg.insert(text1);
  100. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Contextual Action Bar Landscape (Bright)');
  101. }),
  102. this.addEntry(dt + 'contextual split action bar dark', function()
  103. {
  104. var bg = new mxCell('', new mxGeometry(0, 0, 185, 70), s + 'contextual_split_action_bar;fillColor=#002E3E;fontColor=#FFFFFF;');
  105. bg.vertex = true;
  106. var text1 = new mxCell('Contextual', new mxGeometry(0, 0, 185, 30), s + 'anchor;fontStyle=1;fontColor=#ffffff;');
  107. text1.vertex = true;
  108. bg.insert(text1);
  109. var text2 = new mxCell('Action', new mxGeometry(0, 40, 185, 30), s + 'anchor;fontStyle=1;fontColor=#ffffff;');
  110. text2.vertex = true;
  111. bg.insert(text2);
  112. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Contextual Split Action Bar');
  113. }),
  114. this.addEntry(dt + 'contextual split action bar bright', function()
  115. {
  116. var bg = new mxCell('', new mxGeometry(0, 0, 185, 70), s + 'contextual_split_action_bar_white;fillColor=#E6E6E6;');
  117. bg.vertex = true;
  118. var text1 = new mxCell('Contextual', new mxGeometry(0, 0, 185, 30), s + 'anchor;fontStyle=1;');
  119. text1.vertex = true;
  120. bg.insert(text1);
  121. var text2 = new mxCell('Action', new mxGeometry(0, 40, 185, 30), s + 'anchor;fontStyle=1;');
  122. text2.vertex = true;
  123. bg.insert(text2);
  124. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Contextual Split Action Bar (Bright)');
  125. }),
  126. this.addEntry(dt + 'contextual split action bar landscape dark', function()
  127. {
  128. var bg = new mxCell('', new mxGeometry(0, 0, 320, 70), s + 'contextual_split_action_bar_landscape;fillColor=#002E3E;fontColor=#FFFFFF;');
  129. bg.vertex = true;
  130. var text1 = new mxCell('Contextual', new mxGeometry(0, 0, 320, 30), s + 'anchor;fontStyle=1;fontColor=#ffffff;');
  131. text1.vertex = true;
  132. bg.insert(text1);
  133. var text2 = new mxCell('Action', new mxGeometry(0, 40, 320, 30), s + 'anchor;fontStyle=1;fontColor=#ffffff;');
  134. text2.vertex = true;
  135. bg.insert(text2);
  136. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Contextual Split Action Bar Landscape');
  137. }),
  138. this.addEntry(dt + 'contextual split action bar landscape bright', function()
  139. {
  140. var bg = new mxCell('', new mxGeometry(0, 0, 320, 70), s + 'contextual_split_action_bar_landscape_white;fillColor=#E6E6E6;');
  141. bg.vertex = true;
  142. var text1 = new mxCell('Contextual', new mxGeometry(0, 0, 320, 30), s + 'anchor;fontStyle=1;');
  143. text1.vertex = true;
  144. bg.insert(text1);
  145. var text2 = new mxCell('Action', new mxGeometry(0, 40, 320, 30), s + 'anchor;fontStyle=1;');
  146. text2.vertex = true;
  147. bg.insert(text2);
  148. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Contextual Split Action Bar Landscape (Bright)');
  149. }),
  150. this.createVertexTemplateEntry(s2 + 'indeterminate_progress_bar;strokeColor=#33B5E5;',
  151. 149, 5, '', 'Indeterminate Progress Bar', null, null, dt + 'indeterminate progress bar'),
  152. this.createVertexTemplateEntry(s2 + 'indeterminateSpinner;',
  153. 50, 50, '', 'Indeterminate Spinner', null, null, dt + 'indeterminate spinner'),
  154. this.createVertexTemplateEntry(s2 + 'keyboard;',
  155. 185, 100, '', 'Keyboard', null, null, dt + 'keyboard'),
  156. this.addDataEntry(dt + 'menu bar', 185, 50, 'Menu bar',
  157. '7VZdT8MgFP01vC4trLrndbqYuCcffCbjrhApNJS5zl/vLaCbH3NO4xaTkTTlnMu9cM8JCYSVdTd1vJEzK0ATdkVY6az1cVZ3JWhNaKYEYRNCaYYfodc7onmIZg13YPx3EmhMeOR6CZGJROvXOhGtd/YB7pXwEomcsLH0tU7TVnJhVwgyBIK3EkQCGGn6CnVX9d0NuBHOKjFwDuZ4tLG7U0/wsjZsUVptXdiTjcLAyEJpvcUPw0A+HRuch25n64FKfU/B1uDdGpesUiv9ilER0ySoSqa0IkqW8Tbi6jV1IyROkpaf68o+6DoDs0TmxkONv/wUMm+LaayBL5XnWlUGOQ2Lvk7b8Lky1W1AkzyUs8an6qMEtwotwviuVfRnVuV0UPzerOEes05yJ/6fWev3nhzHvWKPe+zs3gHu0aN6d7HHu+HZuwO8Y5d/evMQbh4mIfbm3fIM'),
  158. this.addDataEntry(dt + 'menu bar', 185, 50, 'Menu bar',
  159. '7VZdb8IgFP01vJoW1s1n62aWzKc97JnItZBRaCjOul+/W8DpPoy6ZZolkjTlnPvR3nNCAmFl3U0cb+TUCtCE3RJWOmt93NVdCVoTmilB2JhQmuFD6N2OaB6iWcMdGH9IAY0FL1wvIDKRaP1KJ6L1zj7DkxJeIpETNpK+1mnbSi7sEkGGQPBWgkgAI03foe6qfroBN8JZJQbOwQx/beQe1Susc8MnSqutC99kEBZG5krrLX4eFvLYUyiccR0z1vTpaRpwHrqdigQqyTEBW4N3K0xZpgn7jGERyySoSqayIiqZ8Tbi6r10oy9uksTfy82+yD0Fs0Dm3kONr/wc6m9rnHTcbQjXqjLIaZj3fdqGz5SpHgIa56GdNT51Hya41SiuQ62iP7Mqp4Pi92Zd7THrLEfl/5m1+uzJadwr9rjHLu4d4R49qXfXe7y7unh3hHfs5k9PHsLNfSXEPlxn3gA='),
  160. this.createVertexTemplateEntry(s6 + 'navigation_bar_1;fillColor=#1A1A1A;strokeColor=#999999;',
  161. 185, 30, '', 'Navigation Bar', null, null, dt + 'navigation bar portrait horizontal'),
  162. this.createVertexTemplateEntry(s6 + 'navigation_bar_1_landscape;fillColor=#1A1A1A;strokeColor=#999999;',
  163. 320, 30, '', 'Navigation Bar Landscape', null, null, dt + 'navigation bar landscape horizontal'),
  164. this.createVertexTemplateEntry(s6 + 'navigation_bar_1_vertical;fillColor=#1A1A1A;strokeColor=#999999;',
  165. 30, 320, '', 'Navigation Bar Vertical', null, null, dt + 'navigation bar vertical'),
  166. this.createVertexTemplateEntry(s6 + 'navigation_bar_2;fillColor=#1A1A1A;strokeColor=#999999;',
  167. 185, 30, '', 'Navigation Bar', null, null, dt + 'navigation bar horizontal'),
  168. this.createVertexTemplateEntry(s6 + 'navigation_bar_3;fillColor=#1A1A1A;strokeColor=#999999;',
  169. 185, 30, '', 'Navigation Bar', null, null, dt + 'navigation bar portrait horizontal'),
  170. this.createVertexTemplateEntry(s6 + 'navigation_bar_3_landscape;fillColor=#1A1A1A;strokeColor=#999999;',
  171. 320, 30, '', 'Navigation Bar Landscape', null, null, dt + 'navigation bar landscape horizontal'),
  172. this.createVertexTemplateEntry(s6 + 'navigation_bar_4;fillColor=#1A1A1A;strokeColor=#999999;',
  173. 185, 30, '', 'Navigation Bar', null, null, dt + 'navigation bar horizontal'),
  174. this.createVertexTemplateEntry(s6 + 'navigation_bar_5;fillColor=#1A1A1A;strokeColor=#999999;',
  175. 185, 30, '', 'Navigation Bar', null, null, dt + 'navigation bar horizontal'),
  176. this.createVertexTemplateEntry(s6 + 'navigation_bar_5_vertical;fillColor=#1A1A1A;strokeColor=#999999;',
  177. 30, 320, '', 'Navigation Bar Vertical', null, null, dt + 'navigation bar vertical'),
  178. this.createVertexTemplateEntry(s6 + 'navigation_bar_6;fillColor=#1A1A1A;strokeColor=#999999;',
  179. 185, 30, '', 'Navigation Bar', null, null, dt + 'navigation bar horizontal'),
  180. this.createVertexTemplateEntry(s2 + 'progressBar;strokeColor=#33b5e5;dx1=0.8;dx2=0.6;strokeWidth=2;',
  181. 185, 5, '', 'Progress Bar', null, null, dt + 'progress bar'),
  182. this.createVertexTemplateEntry(s2 + 'progressScrubberDisabled;dx=0.3;fillColor=#33b5e5;',
  183. 185, 16, '', 'Progress Scrubber Disabled', null, null, dt + 'progress scrubber disabled'),
  184. this.createVertexTemplateEntry(s2 + 'progressScrubberFocused;dx=0.3;fillColor=#33b5e5;',
  185. 185, 16, '', 'Progress Scrubber Focused', null, null, dt + 'progress scrubber focused'),
  186. this.createVertexTemplateEntry(s2 + 'progressScrubberPressed;dx=0.3;fillColor=#33b5e5;',
  187. 185, 16, '', 'Progress Scrubber Pressed', null, null, dt + 'progress scrubber pressed'),
  188. this.createVertexTemplateEntry(s2 + 'quickscroll2;dy=0.5;fillColor=#33b5e5;strokeColor=#66D5F5;',
  189. 58, 320, '', 'Quickscroll', null, null, dt + 'quickscroll quick scroll'),
  190. this.createVertexTemplateEntry(s2 + 'quickscroll3;dy=0.5;fillColor=#33b5e5;strokeColor=#66D5F5;',
  191. 6, 320, '', 'Quickscroll', null, null, dt + 'quickscroll quick scroll'),
  192. this.addEntry(dt + 'quick contact', function()
  193. {
  194. var bg = new mxCell('', new mxGeometry(0, 0, 150, 165), s + 'quick_contact;');
  195. bg.vertex = true;
  196. var text1 = new mxCell('Name', new mxGeometry(0, 65, 150, 18), s + 'anchor;rSize=0;fontStyle=1;fontColor=#FFFFFF;');
  197. text1.vertex = true;
  198. bg.insert(text1);
  199. var text2 = new mxCell('Item 1', new mxGeometry(0, 108, 120, 28), s + 'anchor;rSize=0;align=left;spacingLeft=10;');
  200. text2.vertex = true;
  201. bg.insert(text2);
  202. var text3 = new mxCell('Item 2', new mxGeometry(0, 136, 120, 28), s + 'anchor;rSize=0;align=left;spacingLeft=10;');
  203. text3.vertex = true;
  204. bg.insert(text3);
  205. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Quick Contact');
  206. }),
  207. this.addEntry(dt + 'scrollable tab scroll', function()
  208. {
  209. var bg = new mxCell('', new mxGeometry(0, 0, 185, 15), s + 'rrect;rSize=0;fillColor=#444444;strokeColor=none;');
  210. bg.vertex = true;
  211. var text1 = new mxCell('One', new mxGeometry(0, 0, 46.25, 15), s + 'anchor;align=left;fontColor=#FFFFFF;');
  212. text1.vertex = true;
  213. bg.insert(text1);
  214. var text2 = new mxCell('Tab Two', new mxGeometry(46.25, 0, 92.5, 15), s + 'anchor;fontColor=#FFFFFF;');
  215. text2.vertex = true;
  216. bg.insert(text2);
  217. var text3 = new mxCell('Tab', new mxGeometry(138.75, 0, 46.25, 15), s + 'anchor;align=right;fontColor=#FFFFFF;');
  218. text3.vertex = true;
  219. bg.insert(text3);
  220. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Scrollable Tab');
  221. }),
  222. this.createVertexTemplateEntry(s + 'scrollbars2;fillColor=#999999;strokeColor=none;',
  223. 56, 56, '', 'Scrollbars', null, null, dt + 'scrollbar scroll bar'),
  224. this.createVertexTemplateEntry(s5 + '1A1A1A;strokeColor=#1A1A1A;fontColor=#FFFFFF;',
  225. sizeX * 0.8, sizeY * 0.04, 'Normal', 'Section Header (Normal)', null, null, dt + 'section header normal dark'),
  226. this.createVertexTemplateEntry(s5 + '4D4D4D;strokeColor=#4D4D4D;fontColor=#FFFFFF;',
  227. sizeX * 0.8, sizeY * 0.04, 'Pressed', 'Section Header (Pressed)', null, null, dt + 'section header pressed dark'),
  228. this.createVertexTemplateEntry(s5 + '33b5e5;strokeColor=#33B5E5;fontColor=#FFFFFF;',
  229. sizeX * 0.8, sizeY * 0.04, 'Activated', 'Section Header (Activated)', null, null, dt + 'section header activated dark'),
  230. this.createVertexTemplateEntry(s5 + '006699;strokeColor=#33B5E5;fontColor=#FFFFFF;',
  231. sizeX * 0.8, sizeY * 0.04, 'Focused', 'Section Header (Focused)', null, null, dt + 'section header focused dark'),
  232. this.createVertexTemplateEntry(s5 + '006699;strokeColor=#33B5E5;fontColor=#B3B3B3;',
  233. sizeX * 0.8, sizeY * 0.04, 'Disabled focused', 'Section Header (Disabled focused)', null, null, dt + 'section header disabled focused dark'),
  234. this.createVertexTemplateEntry(s5 + '1A1A1A;strokeColor=#1A1A1A;fontColor=#B3B3B3;',
  235. sizeX * 0.8, sizeY * 0.04, 'Disabled', 'Section Header (Disabled)', null, null, dt + 'section header disabled dark'),
  236. this.createVertexTemplateEntry(s5 + 'FFFFFF;strokeColor=#FFFFFF;fontColor=#4D4D4D;',
  237. sizeX * 0.8, sizeY * 0.04, 'Normal', 'Section Header (Normal, Bright)', null, null, dt + 'section header normal bright'),
  238. this.createVertexTemplateEntry(s5 + 'f6f6f6;strokeColor=#f6f6f6;fontColor=#4D4D4D;',
  239. sizeX * 0.8, sizeY * 0.04, 'Pressed', 'Section Header (Pressed, Bright)', null, null, dt + 'section header pressed bright'),
  240. this.createVertexTemplateEntry(s5 + '33b5e5;strokeColor=#33B5E5;fontColor=#4D4D4D;',
  241. sizeX * 0.8, sizeY * 0.04, 'Activated', 'Section Header (Activated, Bright)', null, null, dt + 'section header activated bright'),
  242. this.createVertexTemplateEntry(s5 + '99e5ff;strokeColor=#33B5E5;fontColor=#4D4D4D;',
  243. sizeX * 0.8, sizeY * 0.04, 'Focused', 'Section Header (Focused, Bright)', null, null, dt + 'section header focused bright'),
  244. this.createVertexTemplateEntry(s5 + '99e5ff;strokeColor=#33B5E5;fontColor=#B3B3B3;',
  245. sizeX * 0.8, sizeY * 0.04, 'Disabled focused', 'Section Header (Disabled focused, Bright)', null, null, dt + 'section header disabled focused bright'),
  246. this.createVertexTemplateEntry(s5 + 'FFFFFF;strokeColor=#FFFFFF;fontColor=#B3B3B3;',
  247. sizeX * 0.8, sizeY * 0.04, 'Disabled', 'Section Header (Disabled, Bright)', null, null, dt + 'section header disabled bright'),
  248. this.createVertexTemplateEntry(s + 'spinner2;align=center;fillColor=#999999;strokeColor=#999999;verticalAlign=bottom',
  249. 110, 10, 'Item', 'Spinner Normal', null, null, dt + 'spinner normal'),
  250. this.createVertexTemplateEntry(s + 'spinner2;align=center;fillColor=#33b5e5;strokeColor=#33b5e5;verticalAlign=bottom',
  251. 110, 10, 'Item', 'Spinner Focused', null, null, dt + 'spinner focused'),
  252. this.addEntry(dt + 'spinner disabled focused', function()
  253. {
  254. var bg = new mxCell('', new mxGeometry(0, 0, 117, 28), s + 'rect;rounded=1;fillColor=#207585;strokeColor=#33b5e5;');
  255. bg.vertex = true;
  256. var text1 = new mxCell('Item', new mxGeometry(3, 4, 110, 20), s + 'spinner2;fontStyle=1;fontColor=#ffffff;align=center;verticalAlign=middle;strokeColor=#999999;fillColor=#999999;');
  257. text1.vertex = true;
  258. bg.insert(text1);
  259. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Spinner Disabled Focused');
  260. }),
  261. this.addEntry(dt + 'spinner disabled focused light bright', function()
  262. {
  263. var bg = new mxCell('', new mxGeometry(0, 0, 117, 28), s + 'rect;rounded=1;fillColor=#ccf2ff;strokeColor=#88c5f5;');
  264. bg.vertex = true;
  265. var text1 = new mxCell('Item', new mxGeometry(3, 4, 110, 20), s + 'spinner2;fontStyle=0;fontColor=#666666;align=center;verticalAlign=middle;strokeColor=#cccccc;fillColor=#cccccc;');
  266. text1.vertex = true;
  267. bg.insert(text1);
  268. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Spinner Disabled Focused Bright');
  269. }),
  270. this.addEntry(dt + 'spinner pressed', function()
  271. {
  272. var bg = new mxCell('', new mxGeometry(0, 0, 117, 28), s + 'rect;rounded=1;fillColor=#33b5e5;strokeColor=#33b5e5;');
  273. bg.vertex = true;
  274. var text1 = new mxCell('Item', new mxGeometry(3, 4, 110, 20), s + 'spinner2;fontStyle=0;fontColor=#ffffff;align=center;verticalAlign=middle;strokeColor=#aaeeff;fillColor=#aaeeff;');
  275. text1.vertex = true;
  276. bg.insert(text1);
  277. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Spinner Pressed');
  278. }),
  279. this.addEntry(dt + 'spinner pressed light bright', function()
  280. {
  281. var bg = new mxCell('', new mxGeometry(0, 0, 117, 28), s + 'rect;rounded=1;fillColor=#33b5e5;strokeColor=#33b5e5;');
  282. bg.vertex = true;
  283. var text1 = new mxCell('Item', new mxGeometry(3, 4, 110, 20), s + 'spinner2;fontStyle=0;fontColor=#ffffff;align=center;verticalAlign=middle;strokeColor=#666666;fillColor=#666666;');
  284. text1.vertex = true;
  285. bg.insert(text1);
  286. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Spinner Pressed Bright');
  287. }),
  288. this.addEntry(dt + 'split action bar dark', function()
  289. {
  290. var bg = new mxCell('', new mxGeometry(0, 0, 185, 70), s + 'split_action_bar;fillColor=#1A1A1A;');
  291. bg.vertex = true;
  292. var text1 = new mxCell('Split', new mxGeometry(0, 0, 185, 30), s + 'anchor;fontStyle=1;fontColor=#ffffff;');
  293. text1.vertex = true;
  294. bg.insert(text1);
  295. var text2 = new mxCell('Action', new mxGeometry(0, 40, 185, 30), s + 'anchor;fontStyle=1;fontColor=#ffffff;');
  296. text2.vertex = true;
  297. bg.insert(text2);
  298. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Split Action Bar');
  299. }),
  300. this.addEntry(dt + 'split action bar bright', function()
  301. {
  302. var bg = new mxCell('', new mxGeometry(0, 0, 185, 70), s + 'split_action_bar;fillColor=#E6E6E6;');
  303. bg.vertex = true;
  304. var text1 = new mxCell('Split', new mxGeometry(0, 0, 185, 30), s + 'anchor;fontStyle=1;');
  305. text1.vertex = true;
  306. bg.insert(text1);
  307. var text2 = new mxCell('Action', new mxGeometry(0, 40, 185, 30), s + 'anchor;fontStyle=1;');
  308. text2.vertex = true;
  309. bg.insert(text2);
  310. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Split Action Bar (Bright)');
  311. }),
  312. this.addEntry(dt + 'split action bar landscape dark', function()
  313. {
  314. var bg = new mxCell('', new mxGeometry(0, 0, 320, 70), s + 'split_action_bar_landscape;fillColor=#1A1A1A;');
  315. bg.vertex = true;
  316. var text1 = new mxCell('Split', new mxGeometry(0, 0, 320, 30), s + 'anchor;fontStyle=1;fontColor=#ffffff;');
  317. text1.vertex = true;
  318. bg.insert(text1);
  319. var text2 = new mxCell('Action', new mxGeometry(0, 40, 320, 30), s + 'anchor;fontStyle=1;fontColor=#ffffff;');
  320. text2.vertex = true;
  321. bg.insert(text2);
  322. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Split Action Bar Landscape');
  323. }),
  324. this.addEntry(dt + 'split action bar landscape bright', function()
  325. {
  326. var bg = new mxCell('', new mxGeometry(0, 0, 320, 70), s + 'split_action_bar_landscape;fillColor=#E6E6E6;');
  327. bg.vertex = true;
  328. var text1 = new mxCell('Split', new mxGeometry(0, 0, 320, 30), s + 'anchor;fontStyle=1;');
  329. text1.vertex = true;
  330. bg.insert(text1);
  331. var text2 = new mxCell('Action', new mxGeometry(0, 40, 320, 30), s + 'anchor;fontStyle=1;');
  332. text2.vertex = true;
  333. bg.insert(text2);
  334. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Split Action Bar Landscape (Bright)');
  335. }),
  336. this.createVertexTemplateEntry(s + 'statusBar;align=center;fillColor=#000000;strokeColor=#ffffff;fontColor=#ffffff;fontSize=10;',
  337. sizeX * 0.87, sizeY * 0.0375, '', 'Status bar (portrait)', null, null, dt + 'status bar portrait'),
  338. this.createVertexTemplateEntry(s + 'statusBar;align=center;fillColor=#000000;strokeColor=#ffffff;fontColor=#ffffff;fontSize=10;',
  339. sizeX * 1.517, sizeY * 0.0375, '', 'Status bar (landscape)', null, null, dt + 'status bar landscape'),
  340. this.createVertexTemplateEntry(s2 + 'switch_off;fillColor=#666666;',
  341. 80, 20, '', 'Switch Off', null, null, dt + 'switch off'),
  342. this.createVertexTemplateEntry(s2 + 'switch_off;fillColor=#E6E6E6;',
  343. 80, 20, '', 'Switch Off', null, null, dt + 'switch off'),
  344. this.createVertexTemplateEntry(s2 + 'switch_on;fillColor=#666666;',
  345. 80, 20, '', 'Switch On', null, null, dt + 'switch on'),
  346. this.createVertexTemplateEntry(s2 + 'switch_on;fillColor=#E6E6E6;',
  347. 80, 20, '', 'Switch On', null, null, dt + 'switch on'),
  348. this.addDataEntry(dt + 'tab tabulator bar dark', 185, 30, 'Tab Bar Dark',
  349. '3ZZfb8IgEMA/Da8NhdY/r+02n/bkkj1jQSGjxVCc7T79KMVpp81qnG6RhIS744D7cVwAOM2rmSZr/qwokwA/ApxqpUw7yquUSQkQFBTgB4AQtB2gpx5r6KxwTTQrzBAH1Dq8E7lhraZVlKaWXlEard7Yq6CGW0UIcMJNLv2w5ISqrRWgFSgpOaNesJZ1s0JerZroAlJQrQQNtGaZPVqi5+KD+blLIWWqpNJuRxy51qzhtt5ZClVYh8SfmGnDqt6oncqHPGMqZ0bXdsrWR9HMmMStG2dixb0bbmlBUrby6st1z9AOPMbTSPER0heysIrw2mRJkfEGVLJUhZn7bUIvH+BdujaUJPqRZDQK0JVYRj0s/yZLv2PtZi2E02mW9WXtNe6gOuJ/m1uJ/2PRwHgRs/iiohGdxlz7SxgPZnw54lFP4uO7KiLeYYqCm+bvuAdudI9wQzwJxjfFOxlQHjwgKdzr7D7ZQwBUNC9fqMLqS7VpTv87UMJdytWdmnb4QYDHeND5eKy4/845W+e39wk='),
  350. this.addDataEntry(dt + 'tab tabulator bar dark', 185, 30, 'Tab Bar Dark',
  351. '3ZZRb4MgEIB/Da9GQdvuVbf1aU9dsmdaaCFDaZCuul8/1OtqV81cOrulJCbcHQfcx3k5RJK0mBu6FU+acYXIAyKJ0do2s7RIuFII+5Ihco8w9t2H8GOPNait/pYantkhDrhxeKNqxxtNo8htqUCRW6Nf+YtkVjhFgEgsbKpgmgvK9N4JvhMYzQVnIDjLttohLTZVdB7NmNGSecbwlbtabBbyncPatVQq0Uqb+kQS1qPaoz76YMl05hxiuDE3lhe9UdcqCHnOdcqtKd2SPURRrZhFjZvgciPAjTS0fJo38ubT9cjQTQBjN1JyhvSZLp0iGJsszVaiAhWvdWYXcEwAcgvvuh5DSeJvSYYTD4/EMuxh+TdZ+hVrK2shNzsTdgz8xRn66zxI9B/rBSHLiEcX1YuwG3MJjzAdzPhyxJOenCc3VT/A4Q57V83faQ/c8BbhBmTmTa+KdzagPAAgJTsqZhsAk9WfL3Xm9LneVbf/HSjBIeXKk5rW7g38czz453iceOzkattJo/cB'),
  352. this.addDataEntry(dt + 'tab tabulator bar bright', 185, 30, 'Tab Bar Bright',
  353. '3ZZfb4MgEMA/Da9GQdvutW7r0566ZM+0YCFDaJCuuk8/QLr+cWYuXbulJCbcHSfc784TgPKynmm8Zk+KUAHQA0C5Vsq0s7LOqRAAxpwAdA8gjO0D4GOPNfHWeI01lWaIA2wd3rDY0FbTKirTiKCojFav9IUTw6wiAWjKTCnCtGKYqK0VYisQXDFKgmAta/eGsl656CIsiVacRFrTpT3aVM/5Ow1rCy5EroTSfkdE/XDv8FvvLFJJpwwnptrQujdqrwohz6gqqdGNXbINUbgVk6x1Y5SvWHBDLa0YV628+nTdM7STgPFrpKiD9BkvrCK5NFksl8yBmhZKmnnYJgnyAd6RH0NJwm9JpqMIXohl2sPyb6r0FOtx1abpMiuyvqo9yUHhx5k5qDv8r5OV7D82DYQWGe3FPwhz+jXmJiRhPJjx+YhHPYWPbqqJBIc7GF21fsc9cNNbhJugSTS+Kt7JgPYQAAkuu//5QwCEuy+fK2n1ldq40/8OlGRXcs1RTzu8IMRdPPDneKy4v85529Ft7wM='),
  354. this.addDataEntry(dt + 'tab tabulator bar bright', 185, 30, 'Tab Bar Bright',
  355. '3Zbfb8IgEMf/Gl6bFlp1r3abT3tyyZ5RUMhoMRRnu79+0J6zzjbr4nSLJE2473H8+HC9gEialTNDN+JJM64QeUAkNVrbppeVKVcK4VAyRO4RxqH7EH7s8Ua1N9xQw3M7JAA3AW9UbXmjNEJhKwVCYY1+5S+SWeGECJGpsJmCbiEo0ztnhM5gtBCcgeE8Gz9DVq796QKaM6MlC4zhS7e1qZnLdw5jV1KpVCtt6hUJr5ufo15678l17kXYMTeWl72nriU48ozrjFtTuSE7OIUfMUmaMMHlWkAYaWiFtGjs9WfogaHrAMZupOQE6TNdOCG6NFmaL4UHNV3p3M5hmQjsFt5R3YaSxN+SjEcBvhDLuIfl32TpV6ytrIXc7EzYS+AvT9Bf50KS/1gvCFkkPDmrXsTdmCu4hPFgxucjHvXkPLmp+gEBdzi4av6Oe+DGtwg3IpNgfFW8kwHlAQAp2VEx2wCY9H++1LnTC731u/8dKNE+5aqjmtZ+G4SnePDP8Tjz8JKrfUcPvQ8='),
  356. this.createVertexTemplateEntry(s + 'textfield;align=center;strokeColor=#4D4D4D;',
  357. 174, 30, '', 'Textfield Disabled', null, null, dt + 'textfield disabled'),
  358. this.createVertexTemplateEntry(s + 'textfield;align=center;strokeColor=#999999;',
  359. 174, 30, '', 'Textfield Normal', null, null, dt + 'textfield normal'),
  360. this.createVertexTemplateEntry(s + 'textfield;align=center;strokeColor=#33b5e5;',
  361. 174, 30, '', 'Textfield Activated', null, null, dt + 'textfield activated'),
  362. this.createVertexTemplateEntry(s2 + 'text_insertion_point;',
  363. 20, 30, '', 'Text Insertion Point', null, null, dt + 'textfield insertion point'),
  364. this.createVertexTemplateEntry(s2 + 'textSelHandles;fillColor=#33b5e5;strokeColor=#0099cc;',
  365. sizeX * 0.8, sizeY * 0.1, '', 'Text Selection Handles', null, null, dt + 'text selection handle'),
  366. this.createVertexTemplateEntry(s2 + 'time_picker;',
  367. 150, 230, '', 'Time Picker (Bright)', null, null, dt + 'time picker bright'),
  368. this.createVertexTemplateEntry(s2 + 'time_picker_dark;',
  369. 150, 230, '', 'Time Picker (Dark)', null, null, dt + 'time picker dark'),
  370. this.createVertexTemplateEntry(s3 + 'rect;fillColor=#33b5e5;',
  371. 50, 50, '', 'Color', null, null, dt + 'color'),
  372. this.createVertexTemplateEntry(s3 + 'rect;fillColor=#0099cc;',
  373. 50, 50, '', 'Color', null, null, dt + 'color'),
  374. this.createVertexTemplateEntry(s3 + 'rect;fillColor=#aa66cc;',
  375. 50, 50, '', 'Color', null, null, dt + 'color'),
  376. this.createVertexTemplateEntry(s3 + 'rect;fillColor=#9933cc;',
  377. 50, 50, '', 'Color', null, null, dt + 'color'),
  378. this.createVertexTemplateEntry(s3 + 'rect;fillColor=#99cc00;',
  379. 50, 50, '', 'Color', null, null, dt + 'color'),
  380. this.createVertexTemplateEntry(s3 + 'rect;fillColor=#669900;',
  381. 50, 50, '', 'Color', null, null, dt + 'color'),
  382. this.createVertexTemplateEntry(s3 + 'rect;fillColor=#ffbb33;',
  383. 50, 50, '', 'Color', null, null, dt + 'color'),
  384. this.createVertexTemplateEntry(s3 + 'rect;fillColor=#ff8800;',
  385. 50, 50, '', 'Color', null, null, dt + 'color'),
  386. this.createVertexTemplateEntry(s3 + 'rect;fillColor=#ff4444;',
  387. 50, 50, '', 'Color', null, null, dt + 'color'),
  388. this.createVertexTemplateEntry(s3 + 'rect;fillColor=#cc0000;',
  389. 50, 50, '', 'Color', null, null, dt + 'color')
  390. ];
  391. this.addPalette('android', mxResources.get('android'), false, mxUtils.bind(this, function(content)
  392. {
  393. for (var i = 0; i < fns.length; i++)
  394. {
  395. content.appendChild(fns[i](content));
  396. }
  397. }));
  398. };
  399. })();