Sidebar-ArchiMate.js 13 KB

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