Sidebar-ArchiMate.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. (function()
  2. {
  3. // Adds ArchiMate 2.1 shapes
  4. Sidebar.prototype.addArchiMatePalette = function()
  5. {
  6. var w = 100;
  7. var h = 75;
  8. var s = 'html=1;shape=mxgraph.archimate.';
  9. var am1 = 'html=1;whiteSpace=wrap;fillColor=#ffff99;shape=mxgraph.archimate.';
  10. var am2 = 'html=1;whiteSpace=wrap;fillColor=#99ffff;shape=mxgraph.archimate.';
  11. var am3 = 'html=1;whiteSpace=wrap;fillColor=#99ff99;shape=mxgraph.archimate.';
  12. var am4 = 'html=1;whiteSpace=wrap;fillColor=#ffccff;shape=mxgraph.archimate.';
  13. var am5 = 'html=1;whiteSpace=wrap;fillColor=#ccccff;shape=mxgraph.archimate.';
  14. var am6 = 'html=1;whiteSpace=wrap;fillColor=#ffe0e0;shape=mxgraph.archimate.';
  15. var am7 = 'html=1;whiteSpace=wrap;fillColor=#ffe0e0;shape=mxgraph.archimate.';
  16. var gn = 'mxgraph.archimate';
  17. var dt = 'archimate ';
  18. this.addPaletteFunctions('archimate', mxResources.get('archiMate21'), false,
  19. [
  20. this.createVertexTemplateEntry(am1 + 'application;appType=actor',
  21. w, h, '', 'Business Actor', null, null, this.getTagsForStencil(gn, 'application', dt + 'business actor').join(' ')),
  22. this.createVertexTemplateEntry(am1 + 'application;appType=role',
  23. w, h, '', 'Business Role', null, null, this.getTagsForStencil(gn, '', dt + 'business role').join(' ')),
  24. this.createVertexTemplateEntry(am1 + 'application;appType=collab',
  25. w, h, '', 'Business Collaboration', null, null, this.getTagsForStencil(gn, '', dt + 'business collaboration').join(' ')),
  26. this.createVertexTemplateEntry(am1 + 'application;appType=interface',
  27. w, h, '', 'Business Interface', null, null, this.getTagsForStencil(gn, '', dt + 'business interface').join(' ')),
  28. this.createVertexTemplateEntry(am1 + 'application;appType=interface2',
  29. w, h, '', 'Business Interface', null, null, this.getTagsForStencil(gn, '', dt + 'business interface').join(' ')),
  30. this.createVertexTemplateEntry(am1 + 'location',
  31. w, h, '', 'Location', null, null, this.getTagsForStencil(gn, '', dt + 'location').join(' ')),
  32. this.createVertexTemplateEntry(am1 + 'business;busType=process',
  33. w, h, '', 'Business Process', null, null, this.getTagsForStencil(gn, '', dt + 'business process').join(' ')),
  34. this.createVertexTemplateEntry(am1 + 'business;busType=function',
  35. w, h, '', 'Business Function', null, null, this.getTagsForStencil(gn, '', dt + 'business function').join(' ')),
  36. this.createVertexTemplateEntry(am1 + 'business;busType=interaction',
  37. w, h, '', 'Business Interaction', null, null, this.getTagsForStencil(gn, '', dt + 'business interaction').join(' ')),
  38. this.createVertexTemplateEntry(am1 + 'business;busType=event',
  39. w, h, '', 'Business Event', null, null, this.getTagsForStencil(gn, '', dt + 'business event').join(' ')),
  40. this.createVertexTemplateEntry(am1 + 'business;busType=service',
  41. w, h, '', 'Business Service', null, null, this.getTagsForStencil(gn, '', dt + 'business service').join(' ')),
  42. this.createVertexTemplateEntry(am1 + 'businessObject;overflow=fill', w, h,
  43. '<table cellpadding="0" cellspacing="0" style="font-size:1em;width:100%;height:100%;"><tr style="height:20px;"><td align="center"></td></tr><tr><td align="left" valign="top" style="padding:4px;"></td></tr></table>',
  44. 'Business Object', null, null, this.getTagsForStencil(gn, '', dt + 'business object').join(' ')),
  45. this.createVertexTemplateEntry(am1 + 'representation',
  46. w, h, '', 'Representation', null, null, this.getTagsForStencil(gn, '', dt + 'representation').join(' ')),
  47. this.createVertexTemplateEntry('fillColor=#ffff99;whiteSpace=wrap;shape=cloud;html=1;',
  48. w, h, '', 'Meaning', null, null, this.getTagsForStencil(gn, '', dt + 'meaning').join(' ')),
  49. this.createVertexTemplateEntry('fillColor=#ffff99;whiteSpace=wrap;shape=ellipse;html=1;',
  50. w, h * 0.75, '', 'Value', null, null, this.getTagsForStencil(gn, '', dt + 'value').join(' ')),
  51. this.createVertexTemplateEntry(am1 + 'product;overflow=fill', w, h,
  52. '<table cellpadding="0" cellspacing="0" style="font-size:1em;width:100%;height:100%;"><tr style="height:20px;"><td align="left"></td></tr><tr><td align="left" valign="top" style="padding:4px;"></td></tr></table>',
  53. 'Product', null, null, this.getTagsForStencil(gn, '', dt + 'product').join(' ')),
  54. this.createVertexTemplateEntry(am1 + 'businessObject;overflow=fill', w, h,
  55. '<table cellpadding="0" cellspacing="0" style="font-size:1em;width:100%;height:100%;"><tr style="height:20px;"><td align="center"></td></tr><tr><td align="left" valign="top" style="padding:4px;"></td></tr></table>',
  56. 'Contract', null, null, this.getTagsForStencil(gn, '', dt + 'contract').join(' ')),
  57. this.createVertexTemplateEntry(am2 + 'application;appType=comp',
  58. w, h, '', 'Application Component', null, null, this.getTagsForStencil(gn, '', dt + 'application component').join(' ')),
  59. this.createVertexTemplateEntry(am2 + 'application;appType=collab',
  60. w, h, '', 'Application Collaboration', null, null, this.getTagsForStencil(gn, '', dt + 'application collaboration').join(' ')),
  61. this.createVertexTemplateEntry(am2 + 'application;appType=interface',
  62. w, h, '', 'Application Interface', null, null, this.getTagsForStencil(gn, '', dt + 'application interface').join(' ')),
  63. this.createVertexTemplateEntry(am2 + 'application;appType=interface2',
  64. w, h, '', 'Application Interface', null, null, this.getTagsForStencil(gn, '', dt + 'application interface').join(' ')),
  65. this.createVertexTemplateEntry(am2 + 'application;appType=function',
  66. w, h, '', 'Application Function', null, null, this.getTagsForStencil(gn, '', dt + 'application function').join(' ')),
  67. this.createVertexTemplateEntry(am2 + 'application;appType=interaction',
  68. w, h, '', 'Application Interaction', null, null, this.getTagsForStencil(gn, '', dt + 'application interaction').join(' ')),
  69. this.createVertexTemplateEntry(am2 + 'application;appType=service',
  70. w, h, '', 'Application Service', null, null, this.getTagsForStencil(gn, '', dt + 'application service').join(' ')),
  71. this.createVertexTemplateEntry(am2 + 'businessObject;overflow=fill', w, h,
  72. '<table cellpadding="0" cellspacing="0" style="font-size:1em;width:100%;height:100%;"><tr style="height:20px;"><td align="center"></td></tr><tr><td align="left" valign="top" style="padding:4px;"></td></tr></table>',
  73. 'Data Object', null, null, this.getTagsForStencil(gn, '', dt + 'data object').join(' ')),
  74. this.createVertexTemplateEntry(am3 + 'application;appType=node',
  75. w, h, '', 'Node', null, null, this.getTagsForStencil(gn, '', dt + 'node').join(' ')),
  76. this.createVertexTemplateEntry(am3 + 'tech;techType=device',
  77. w, h, '', 'Device', null, null, this.getTagsForStencil(gn, '', dt + 'device').join(' ')),
  78. this.createVertexTemplateEntry(am3 + 'application;appType=network',
  79. w, h, '', 'Network', null, null, this.getTagsForStencil(gn, '', dt + 'network').join(' ')),
  80. this.createVertexTemplateEntry(am3 + 'application;appType=commPath',
  81. w, h, '', 'Communications Path', null, null, this.getTagsForStencil(gn, '', dt + 'communications path').join(' ')),
  82. this.createVertexTemplateEntry(am3 + 'application;appType=interface',
  83. w, h, '', 'Infrastructure Interface', null, null, this.getTagsForStencil(gn, '', dt + 'infrastructure interface').join(' ')),
  84. this.createVertexTemplateEntry(am3 + 'application;appType=interface2',
  85. w, h, '', 'Infrastructure Interface', null, null, this.getTagsForStencil(gn, '', dt + 'infrastructure interface').join(' ')),
  86. this.createVertexTemplateEntry(am3 + 'application;appType=sysSw',
  87. w, h, '', 'System Software', null, null, this.getTagsForStencil(gn, '', dt + 'system software').join(' ')),
  88. this.createVertexTemplateEntry(am3 + 'business;busType=function',
  89. w, h, '', 'Infrastructure Function', null, null, this.getTagsForStencil(gn, '', dt + 'infraastructure function').join(' ')),
  90. this.createVertexTemplateEntry(am3 + 'business;busType=service',
  91. w, h, '', 'Infrastructure Service', null, null, this.getTagsForStencil(gn, '', dt + 'infrastructure service').join(' ')),
  92. this.createVertexTemplateEntry(am3 + 'application;appType=artifact',
  93. w, h, '', 'Artifact', null, null, this.getTagsForStencil(gn, '', dt + 'artifact').join(' ')),
  94. this.createEdgeTemplateEntry('edgeStyle=elbowEdgeStyle;html=1;endArrow=none;elbow=vertical',
  95. w, h, '', 'Association', null, this.getTagsForStencil(gn, '', dt + 'association').join(' ')),
  96. this.createEdgeTemplateEntry('edgeStyle=elbowEdgeStyle;html=1;endArrow=open;elbow=vertical;endFill=1;dashed=1',
  97. w, h, '', 'Access', null, this.getTagsForStencil(gn, '', dt + 'access').join(' ')),
  98. this.createEdgeTemplateEntry('edgeStyle=elbowEdgeStyle;html=1;endArrow=none;elbow=vertical;endFill=0;dashed=1',
  99. w, h, '', 'Access', null, this.getTagsForStencil(gn, '', dt + 'access').join(' ')),
  100. this.createEdgeTemplateEntry('edgeStyle=elbowEdgeStyle;html=1;endArrow=open;elbow=vertical;endFill=1',
  101. w, h, '', 'Used by', null, this.getTagsForStencil(gn, '', dt + 'used by').join(' ')),
  102. this.createEdgeTemplateEntry('edgeStyle=elbowEdgeStyle;html=1;endArrow=block;elbow=vertical;endFill=0;dashed=1',
  103. w, h, '', 'Realization', null, this.getTagsForStencil(gn, '', dt + 'realization').join(' ')),
  104. this.createEdgeTemplateEntry('endArrow=oval;html=1;endFill=1;startArrow=oval;startFill=1;edgeStyle=elbowEdgeStyle;elbow=vertical',
  105. w, h, '', 'Assignment', null, this.getTagsForStencil(gn, '', dt + 'assignment').join(' ')),
  106. this.createEdgeTemplateEntry('endArrow=none;html=1;endFill=0;startArrow=diamondThin;startFill=0;edgeStyle=elbowEdgeStyle;elbow=vertical',
  107. w, h, '', 'Aggregation', null, this.getTagsForStencil(gn, '', dt + 'aggregation').join(' ')),
  108. this.createEdgeTemplateEntry('endArrow=none;html=1;endFill=0;startArrow=diamondThin;startFill=1;edgeStyle=elbowEdgeStyle;elbow=vertical',
  109. w, h, '', 'Composition', null, this.getTagsForStencil(gn, '', dt + 'composition').join(' ')),
  110. this.createEdgeTemplateEntry('endArrow=block;html=1;endFill=1;startArrow=none;startFill=0;edgeStyle=elbowEdgeStyle;elbow=vertical;dashed=1',
  111. w, h, '', 'A', null, this.getTagsForStencil(gn, '', dt).join(' ')),
  112. this.createEdgeTemplateEntry('endArrow=block;html=1;endFill=1;startArrow=none;startFill=0;edgeStyle=elbowEdgeStyle;elbow=vertical;dashed=1',
  113. w, h, '', 'Flow', null, this.getTagsForStencil(gn, '', dt + 'flow').join(' ')),
  114. this.createEdgeTemplateEntry('endArrow=block;html=1;endFill=1;startArrow=none;startFill=0;edgeStyle=elbowEdgeStyle;elbow=vertical;dashed=0',
  115. w, h, '', 'Triggering', null, this.getTagsForStencil(gn, '', dt + 'triggering').join(' ')),
  116. this.createVertexTemplateEntry('swimlane;html=1;fillColor=#ffffff;whiteSpace=wrap',
  117. w, h, '', 'Grouping', null, this.getTagsForStencil(gn, '', dt + 'grouping').join(' ')),
  118. this.createVertexTemplateEntry('ellipse;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;fillColor=#000000',
  119. 10, 10, '', 'Junction', null, this.getTagsForStencil(gn, '', dt + 'junction').join(' ')),
  120. this.createEdgeTemplateEntry('endArrow=block;html=1;endFill=0;edgeStyle=elbowEdgeStyle;elbow=vertical',
  121. w, h, '', 'Specialization', null, this.getTagsForStencil(gn, '', dt + 'specialization').join(' ')),
  122. this.createVertexTemplateEntry(am4 + 'motiv;motivType=stake',
  123. w, h, '', 'Stakeholder', null, null, this.getTagsForStencil(gn, '', dt + 'stakeholder').join(' ')),
  124. this.createVertexTemplateEntry(am4 + 'motiv;motivType=driver',
  125. w, h, '', 'Driver', null, null, this.getTagsForStencil(gn, '', dt + 'driver').join(' ')),
  126. this.createVertexTemplateEntry(am4 + 'motiv;motivType=assess',
  127. w, h, '', 'Assessment', null, null, this.getTagsForStencil(gn, '', dt + 'assesment').join(' ')),
  128. this.createVertexTemplateEntry(am5 + 'motiv;motivType=goal',
  129. w, h, '', 'Goal', null, null, this.getTagsForStencil(gn, '', dt + 'goal').join(' ')),
  130. this.createVertexTemplateEntry(am5 + 'motiv;motivType=req',
  131. w, h, '', 'Requirement', null, null, this.getTagsForStencil(gn, '', dt + 'goal').join(' ')),
  132. this.createVertexTemplateEntry(am5 + 'motiv;motivType=const',
  133. w, h, '', 'Constraint', null, null, this.getTagsForStencil(gn, '', dt + 'constraint').join(' ')),
  134. this.createVertexTemplateEntry(am5 + 'motiv;motivType=princ',
  135. w, h, '', 'Principle', null, null, this.getTagsForStencil(gn, '', dt + 'principle').join(' ')),
  136. this.createVertexTemplateEntry(am6 + 'rounded=1',
  137. w, h, '', 'Work Package', null, null, this.getTagsForStencil(gn, '', dt + 'work package').join(' ')),
  138. this.createVertexTemplateEntry(am6 + 'representation',
  139. w, h, '', 'Deliverable', null, null, this.getTagsForStencil(gn, '', dt + 'deliverable').join(' ')),
  140. this.createVertexTemplateEntry(am3 + 'tech;techType=plateau',
  141. w, h, '', 'Plateau', null, null, this.getTagsForStencil(gn, '', dt + 'plateau').join(' ')),
  142. this.createVertexTemplateEntry(am3 + 'gap',
  143. w, h, '', 'Gap', null, null, this.getTagsForStencil(gn, '', dt + 'gap').join(' '))
  144. ]);
  145. };
  146. })();