Sidebar-UML25.js 85 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330
  1. (function()
  2. {
  3. // Adds Arrow shapes with control points
  4. Sidebar.prototype.addUml25Palette = function()
  5. {
  6. // Avoids having to bind all functions to "this"
  7. var sb = this;
  8. // Reusable cells
  9. var field = new mxCell('+ field: type', new mxGeometry(0, 0, 100, 26), 'text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;');
  10. field.vertex = true;
  11. var divider = new mxCell('', new mxGeometry(0, 0, 40, 8), 'line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;');
  12. divider.vertex = true;
  13. var sequenceEdgeStyle = 'newEdgeStyle={"curved":0,"rounded":0};';
  14. var lifelineStyle = 'shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;dropTarget=0;' +
  15. 'collapsible=0;recursiveResize=0;outlineConnect=0;portConstraint=eastwest;' + sequenceEdgeStyle;
  16. // UML frames below are containers not shapes as used in sequence diagrams
  17. var frameStyle = 'shape=umlFrame;whiteSpace=wrap;html=1;pointerEvents=0;recursiveResize=0;container=1;collapsible=0;';
  18. // Default tags
  19. var dt = 'uml ';
  20. this.setCurrentSearchEntryLibrary('uml25');
  21. var fns = [
  22. this.createVertexTemplateEntry(frameStyle + 'width=160;', 340, 180, 'Diagram Heading', 'Diagram', null, null, 'diagram'),
  23. this.createVertexTemplateEntry('shape=note2;boundedLbl=1;whiteSpace=wrap;html=1;size=25;verticalAlign=top;align=center;', 120, 60, 'Comment1 body', 'Comment', null, null, 'uml comment note'),
  24. this.createVertexTemplateEntry('shape=partialRectangle;html=1;top=1;align=left;dashed=1;', 200, 20, 'Template1 signature', 'Template signature', null, null, 'template signature'),
  25. this.createVertexTemplateEntry('shape=partialRectangle;html=1;top=1;align=left;dashed=1;', 200, 50, 'Template parameter 1\nTemplate parameter 2', 'Template signature', null, null, 'template signature'),
  26. this.addEntry('constraint', function()
  27. {
  28. var cell = new mxCell('Constraint1 specification', new mxGeometry(0, 0, 160, 60), 'shape=note2;boundedLbl=1;whiteSpace=wrap;html=1;size=25;verticalAlign=top;align=center;');
  29. cell.vertex = true;
  30. var label = new mxCell('<<keyword>>', new mxGeometry(0, 0, cell.geometry.width, 25), 'resizeWidth=1;part=1;strokeColor=none;fillColor=none;align=left;spacingLeft=5;');
  31. label.geometry.relative = true;
  32. label.vertex = true;
  33. cell.insert(label);
  34. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Constraint');
  35. }),
  36. this.addEntry(dt + 'classifier', function()
  37. {
  38. var cell1 = new mxCell('&lt;&lt;keyword&gt;&gt;<br><b>Classifier1</b><br>{abstract}', new mxGeometry(0, 0, 140, 183),
  39. 'swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=55;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;html=1;whiteSpace=wrap;');
  40. cell1.vertex = true;
  41. var field1 = new mxCell('attributes',
  42. new mxGeometry(0, 0, 140, 20), 'text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;');
  43. field1.vertex = true;
  44. cell1.insert(field1);
  45. var field2 = new mxCell('attribute1',
  46. new mxGeometry(0, 0, 140, 20), 'text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;');
  47. field2.vertex = true;
  48. cell1.insert(field2);
  49. var field3 = new mxCell('inherited attribute2',
  50. new mxGeometry(0, 0, 140, 20), 'text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fontColor=#808080;whiteSpace=wrap;');
  51. field3.vertex = true;
  52. cell1.insert(field3);
  53. var field4 = new mxCell('...',
  54. new mxGeometry(0, 0, 140, 20), 'text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;');
  55. field4.vertex = true;
  56. cell1.insert(field4);
  57. cell1.insert(divider.clone());
  58. var field5 = new mxCell('operations',
  59. new mxGeometry(0, 0, 140, 20), 'text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;');
  60. field5.vertex = true;
  61. cell1.insert(field5);
  62. var field6 = new mxCell('operation1',
  63. new mxGeometry(0, 0, 140, 20), 'text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;');
  64. field6.vertex = true;
  65. cell1.insert(field6);
  66. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Classifier');
  67. }),
  68. this.createVertexTemplateEntry('shape=process2;fixedSize=1;size=5;fontStyle=1;html=1;whiteSpace=wrap;', 140, 40, 'Classifier1', 'Classifier', null, null, 'classifier'),
  69. this.addEntry(dt + 'classifier', function()
  70. {
  71. var cell1 = new mxCell('Classifier1', new mxGeometry(0, 0, 140, 183),
  72. 'swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;html=1;whiteSpace=wrap;');
  73. cell1.vertex = true;
  74. var field1 = new mxCell('internal structure',
  75. new mxGeometry(0, 0, 140, 30), 'html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];resizeWidth=1;whiteSpace=wrap;');
  76. field1.vertex = true;
  77. cell1.insert(field1);
  78. var cell2 = new mxCell('', new mxGeometry(0, 0, 140, 140),
  79. 'swimlane;fontStyle=1;align=center;verticalAlign=top;horizontal=1;startSize=0;collapsible=0;marginBottom=0;html=1;strokeColor=none;fillColor=none;');
  80. cell2.vertex = true;
  81. cell1.insert(cell2);
  82. var field2 = new mxCell('property1',
  83. new mxGeometry(0, 0, 100, 30), 'html=1;align=center;verticalAlign=middle;rotatable=0;whiteSpace=wrap;');
  84. field2.geometry.relative = true;
  85. field2.geometry.offset = new mxPoint(20, 20);
  86. field2.vertex = true;
  87. cell2.insert(field2);
  88. var field3 = new mxCell('property2',
  89. new mxGeometry(0, 0, 100, 30), 'html=1;align=center;verticalAlign=middle;rotatable=0;whiteSpace=wrap;');
  90. field3.geometry.relative = true;
  91. field3.geometry.offset = new mxPoint(20, 90);
  92. field3.vertex = true;
  93. cell2.insert(field3);
  94. var assoc1 = new mxCell('connector1', new mxGeometry(0, 0, 0, 0), 'edgeStyle=none;endArrow=none;verticalAlign=middle;labelBackgroundColor=none;endSize=12;html=1;align=left;endFill=0;exitX=0.15;exitY=1;entryX=0.15;entryY=0;spacingLeft=4;');
  95. assoc1.geometry.relative = true;
  96. assoc1.edge = true;
  97. field2.insertEdge(assoc1, true);
  98. field3.insertEdge(assoc1, false);
  99. cell2.insert(assoc1);
  100. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Classifier');
  101. }),
  102. this.createVertexTemplateEntry('fontStyle=1;whiteSpace=wrap;html=1;', 140, 30, 'Association1', 'Association', null, null, 'association'),
  103. this.addEntry(dt + 'classifier', function()
  104. {
  105. var cell1 = new mxCell('Instance1', new mxGeometry(0, 0, 140, 138),
  106. 'swimlane;fontStyle=4;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;html=1;whiteSpace=wrap;');
  107. cell1.vertex = true;
  108. var field1 = new mxCell('slot1',
  109. new mxGeometry(0, 0, 140, 30), 'html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];resizeWidth=1;whiteSpace=wrap;');
  110. field1.vertex = true;
  111. cell1.insert(field1);
  112. cell1.insert(divider.clone());
  113. var field2 = new mxCell('internal structure',
  114. new mxGeometry(0, 0, 140, 20), 'html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];resizeWidth=1;whiteSpace=wrap;');
  115. field2.vertex = true;
  116. cell1.insert(field2);
  117. var cell2 = new mxCell('', new mxGeometry(0, 0, 140, 50),
  118. 'swimlane;fontStyle=1;align=center;verticalAlign=top;horizontal=1;startSize=0;collapsible=0;marginBottom=0;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;');
  119. cell2.vertex = true;
  120. cell1.insert(cell2);
  121. var field3 = new mxCell('instance2',
  122. new mxGeometry(0, 0, 80, 30), 'html=1;align=center;verticalAlign=middle;rotatable=0;whiteSpace=wrap;');
  123. field3.geometry.relative = true;
  124. field3.geometry.offset = new mxPoint(30, 10);
  125. field3.vertex = true;
  126. cell2.insert(field3);
  127. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Classifier');
  128. }),
  129. this.createVertexTemplateEntry('fontStyle=0;html=1;whiteSpace=wrap;', 120, 40, 'Instance1 value', 'Instance', null, null, 'instance'),
  130. this.addEntry(dt + 'classifier', function()
  131. {
  132. var cell1 = new mxCell('&lt;&lt;enumeration&gt;&gt;<br><b>Enum1</b>', new mxGeometry(0, 0, 140, 70),
  133. 'swimlane;fontStyle=0;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=40;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;html=1;whiteSpace=wrap;');
  134. cell1.vertex = true;
  135. var field1 = new mxCell('literal1',
  136. new mxGeometry(0, 0, 140, 30), 'text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;');
  137. field1.vertex = true;
  138. cell1.insert(field1);
  139. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Classifier');
  140. }),
  141. this.addEntry(dt + 'interface generalization', function()
  142. {
  143. var edge = new mxCell('Interface1, Interface2...', new mxGeometry(-1, 0, 0, 0), 'html=1;verticalAlign=bottom;labelBackgroundColor=none;startArrow=oval;startFill=0;startSize=8;endArrow=none;');
  144. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  145. edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  146. edge.geometry.relative = true;
  147. edge.geometry.x = -1;
  148. edge.geometry.y = 3;
  149. edge.edge = true;
  150. return sb.createEdgeTemplateFromCells([edge], 160, 0, 'Interface Generalization');
  151. }),
  152. this.addEntry(dt + 'required interface', function()
  153. {
  154. var edge = new mxCell('Interface1', new mxGeometry(-1, 0, 0, 0), 'html=1;verticalAlign=bottom;labelBackgroundColor=none;startArrow=halfCircle;startFill=0;startSize=2;endArrow=none;');
  155. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  156. edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  157. edge.geometry.relative = true;
  158. edge.geometry.x = -1;
  159. edge.geometry.y = 3;
  160. edge.edge = true;
  161. return sb.createEdgeTemplateFromCells([edge], 160, 0, 'Required Interface');
  162. }),
  163. this.addEntry(dt + 'property', function()
  164. {
  165. var cell1 = new mxCell('0..1', new mxGeometry(0, 0, 120, 50),
  166. 'align=right;verticalAlign=top;spacingRight=2;whiteSpace=wrap;html=1;');
  167. cell1.vertex = true;
  168. var field1 = new mxCell('Property1',
  169. new mxGeometry(0, 1, 120, 30), 'text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;resizeWidth=1;whiteSpace=wrap;');
  170. field1.geometry.relative = true;
  171. field1.geometry.offset = new mxPoint(0, -30);
  172. field1.vertex = true;
  173. cell1.insert(field1);
  174. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Property');
  175. }),
  176. this.createVertexTemplateEntry('fontStyle=0;dashed=1;html=1;whiteSpace=wrap;', 140, 30, 'Property1', 'Property', null, null, 'property'),
  177. this.createVertexTemplateEntry('fontStyle=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=2;', 30, 30, 'port1', 'Port', null, null, 'port'),
  178. this.addEntry(dt + 'port provided interface lollipop notation', function()
  179. {
  180. var cell1 = new mxCell('', new mxGeometry(0, 0, 30, 30), 'html=1;rounded=0;');
  181. cell1.vertex = true;
  182. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=none;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;endSize=2;');
  183. edge1.geometry.relative = true;
  184. edge1.edge = true;
  185. cell1.insertEdge(edge1, true);
  186. var cell2 = new mxCell('', new mxGeometry(52, 11, 8, 8), 'ellipse;html=1;fontSize=11;align=center;fillColor=none;points=[];aspect=fixed;resizable=0;verticalAlign=bottom;labelPosition=center;verticalLabelPosition=top;flipH=1;');
  187. cell2.vertex = true;
  188. cell2.insertEdge(edge1, false);
  189. return sb.createEdgeTemplateFromCells([cell1, edge1, cell2], 60, 30, 'Port with provided interface');
  190. }),
  191. this.addEntry(dt + 'port required interface lollipop notation', function()
  192. {
  193. var cell1 = new mxCell('', new mxGeometry(0, 0, 30, 30), 'html=1;rounded=0;');
  194. cell1.vertex = true;
  195. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=none;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;endSize=2;');
  196. edge1.geometry.relative = true;
  197. edge1.edge = true;
  198. cell1.insertEdge(edge1, true);
  199. var cell2 = new mxCell('', new mxGeometry(55, 10, 5, 10), 'shape=requiredInterface;html=1;fontSize=11;align=center;fillColor=none;points=[];aspect=fixed;resizable=0;verticalAlign=bottom;labelPosition=center;verticalLabelPosition=top;flipH=1;');
  200. cell2.vertex = true;
  201. cell2.insertEdge(edge1, false);
  202. return sb.createEdgeTemplateFromCells([cell1, edge1, cell2], 60, 30, 'Port with required interface');
  203. }),
  204. this.addEntry(dt + 'component', function()
  205. {
  206. var cell1 = new mxCell('', new mxGeometry(0, 0, 140, 161), 'fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;marginBottom=0;');
  207. cell1.vertex = true;
  208. var cell2 = new mxCell('Component', new mxGeometry(0, 0, 140, 40), 'html=1;align=left;spacingLeft=4;verticalAlign=top;strokeColor=none;fillColor=none;whiteSpace=wrap;');
  209. cell2.vertex = true;
  210. cell1.insert(cell2);
  211. var symbol = new mxCell('', new mxGeometry(1, 0, 16, 20), 'shape=module;jettyWidth=10;jettyHeight=4;');
  212. symbol.vertex = true;
  213. symbol.geometry.relative = true;
  214. symbol.geometry.offset = new mxPoint(-25, 9);
  215. cell2.insert(symbol);
  216. cell1.insert(divider.clone());
  217. var cell3 = new mxCell('provided interfaces', new mxGeometry(0, 0, 140, 25), 'html=1;align=center;spacingLeft=4;verticalAlign=top;strokeColor=none;fillColor=none;whiteSpace=wrap;');
  218. cell3.vertex = true;
  219. cell1.insert(cell3);
  220. var cell4 = new mxCell('Interface1', new mxGeometry(0, 0, 140, 25), 'html=1;align=left;spacingLeft=4;verticalAlign=top;strokeColor=none;fillColor=none;whiteSpace=wrap;');
  221. cell4.vertex = true;
  222. cell1.insert(cell4);
  223. cell1.insert(divider.clone());
  224. var cell5 = new mxCell('required interfaces', new mxGeometry(0, 0, 140, 25), 'html=1;align=center;spacingLeft=4;verticalAlign=top;strokeColor=none;fillColor=none;whiteSpace=wrap;');
  225. cell5.vertex = true;
  226. cell1.insert(cell5);
  227. var cell6 = new mxCell('Interface2', new mxGeometry(0, 0, 140, 30), 'html=1;align=left;spacingLeft=4;verticalAlign=top;strokeColor=none;fillColor=none;whiteSpace=wrap;');
  228. cell6.vertex = true;
  229. cell1.insert(cell6);
  230. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Component');
  231. }),
  232. this.addEntry(dt + 'classifier', function()
  233. {
  234. var cell1 = new mxCell('', new mxGeometry(0, 0, 270, 230),
  235. 'shape=ellipse;container=1;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;html=1;dashed=1;collapsible=0;');
  236. cell1.vertex = true;
  237. var field1 = new mxCell('Collaboration1',
  238. new mxGeometry(0, 0, 270, 30), 'html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];resizeWidth=1;whiteSpace=wrap;');
  239. field1.vertex = true;
  240. cell1.insert(field1);
  241. var divider1 = new mxCell('', new mxGeometry(39, 30, 192, 8), 'line;strokeWidth=1;fillColor=none;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;dashed=1;resizeWidth=1;');
  242. divider1.vertex = true;
  243. cell1.insert(divider1);
  244. var field2 = new mxCell('Classifier1',
  245. new mxGeometry(0, 0, 100, 30), 'html=1;align=center;verticalAlign=middle;rotatable=0;whiteSpace=wrap;');
  246. field2.geometry.relative = true;
  247. field2.geometry.offset = new mxPoint(85, 50);
  248. field2.vertex = true;
  249. cell1.insert(field2);
  250. var field3 = new mxCell('Collaboration use 1',
  251. new mxGeometry(0, 0, 140, 30), 'shape=ellipse;html=1;align=center;verticalAlign=middle;rotatable=0;dashed=1;whiteSpace=wrap;');
  252. field3.geometry.relative = true;
  253. field3.geometry.offset = new mxPoint(65, 110);
  254. field3.vertex = true;
  255. cell1.insert(field3);
  256. var assoc1 = new mxCell('property1', new mxGeometry(0, 0, 0, 0), 'edgeStyle=none;endArrow=none;verticalAlign=middle;labelBackgroundColor=none;endSize=12;html=1;align=left;endFill=0;spacingLeft=4;');
  257. assoc1.geometry.relative = true;
  258. assoc1.edge = true;
  259. field2.insertEdge(assoc1, true);
  260. field3.insertEdge(assoc1, false);
  261. cell1.insert(assoc1);
  262. var field4 = new mxCell('Classifier2',
  263. new mxGeometry(0, 0, 100, 30), 'html=1;align=center;verticalAlign=middle;rotatable=0;whiteSpace=wrap;');
  264. field4.geometry.relative = true;
  265. field4.geometry.offset = new mxPoint(85, 170);
  266. field4.vertex = true;
  267. cell1.insert(field4);
  268. var assoc2 = new mxCell('property1', new mxGeometry(0, 0, 0, 0), 'edgeStyle=none;endArrow=none;verticalAlign=middle;labelBackgroundColor=none;endSize=12;html=1;align=left;endFill=0;spacingLeft=4;');
  269. assoc2.geometry.relative = true;
  270. assoc2.edge = true;
  271. field3.insertEdge(assoc2, true);
  272. field4.insertEdge(assoc2, false);
  273. cell1.insert(assoc2);
  274. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Classifier');
  275. }),
  276. this.createVertexTemplateEntry('shape=folder;fontStyle=1;tabWidth=80;tabHeight=30;tabPosition=left;html=1;boundedLbl=1;whiteSpace=wrap;', 150, 80,
  277. 'Package1', 'Package', null, null, dt + 'package'),
  278. this.addEntry(dt + 'package', function()
  279. {
  280. var cell1 = new mxCell('Package1', new mxGeometry(0, 0, 150, 100),
  281. 'shape=folder;fontStyle=1;tabWidth=110;tabHeight=30;tabPosition=left;html=1;boundedLbl=1;labelInHeader=1;container=1;collapsible=0;recursiveResize=0;whiteSpace=wrap;');
  282. cell1.vertex = true;
  283. var field1 = new mxCell('Packaged element1',
  284. new mxGeometry(0, 0, 110, 30), 'html=1;whiteSpace=wrap;');
  285. field1.geometry.relative = true;
  286. field1.geometry.offset = new mxPoint(20, 50);
  287. field1.vertex = true;
  288. cell1.insert(field1);
  289. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Package');
  290. }),
  291. this.addEntry(dt + 'package', function()
  292. {
  293. var cell1 = new mxCell('Package', new mxGeometry(0, 0, 150, 100),
  294. 'shape=folder;fontStyle=1;tabWidth=110;tabHeight=30;tabPosition=left;html=1;boundedLbl=1;labelInHeader=1;container=1;collapsible=0;whiteSpace=wrap;');
  295. cell1.vertex = true;
  296. var field1 = new mxCell('Text',
  297. new mxGeometry(0, 0, 150, 70), 'html=1;strokeColor=none;resizeWidth=1;resizeHeight=1;fillColor=none;part=1;connectable=0;allowArrows=0;deletable=0;whiteSpace=wrap;');
  298. field1.geometry.relative = true;
  299. field1.geometry.offset = new mxPoint(0, 30);
  300. field1.vertex = true;
  301. cell1.insert(field1);
  302. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Package');
  303. }),
  304. this.addEntry(dt + 'model', function()
  305. {
  306. var cell1 = new mxCell('Model1', new mxGeometry(0, 0, 150, 80),
  307. 'shape=folder;fontStyle=1;tabWidth=110;tabHeight=30;tabPosition=left;html=1;boundedLbl=1;folderSymbol=triangle;whiteSpace=wrap;');
  308. cell1.vertex = true;
  309. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Model');
  310. }),
  311. this.addEntry(dt + 'stereotype', function()
  312. {
  313. var cell1 = new mxCell('', new mxGeometry(0, 0, 160, 75),
  314. 'shape=note2;size=25;childLayout=stackLayout;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;html=1;container=1;');
  315. cell1.vertex = true;
  316. var field1 = new mxCell('&lt;&lt;stereotype1&gt;&gt;',
  317. new mxGeometry(0, 0, 160, 25), 'text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;');
  318. field1.vertex = true;
  319. cell1.insert(field1);
  320. var field2 = new mxCell('stereotype property 1',
  321. new mxGeometry(0, 0, 160, 25), 'text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;');
  322. field2.vertex = true;
  323. cell1.insert(field2);
  324. var field3 = new mxCell('stereotype property 2',
  325. new mxGeometry(0, 0, 160, 25), 'text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;');
  326. field3.vertex = true;
  327. cell1.insert(field3);
  328. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Stereotype');
  329. }),
  330. this.addEntry(dt + 'class', function()
  331. {
  332. var cell1 = new mxCell('Class1', new mxGeometry(0, 0, 140, 79),
  333. 'swimlane;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=29;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;html=1;whiteSpace=wrap;');
  334. cell1.vertex = true;
  335. var field1 = new mxCell('&lt;&lt;stereotype1&gt;&gt;',
  336. new mxGeometry(0, 0, 140, 25), 'text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;');
  337. field1.vertex = true;
  338. cell1.insert(field1);
  339. var field2 = new mxCell('stereotype property 1',
  340. new mxGeometry(0, 0, 140, 25), 'text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;');
  341. field2.vertex = true;
  342. cell1.insert(field2);
  343. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Class');
  344. }),
  345. this.createVertexTemplateEntry('text;html=1;align=center;', 200, 25,
  346. '&lt;&lt;stereotype1, stereotype2...&gt;&gt;', 'Stereotype Label', null, null, dt + 'stereotype label'),
  347. this.createVertexTemplateEntry('ellipse;html=1;whiteSpace=wrap;', 50, 25,
  348. 'icon', 'Icon', null, null, dt + 'icon'),
  349. this.addEntry(dt + 'region', function()
  350. {
  351. var cell1 = new mxCell('', new mxGeometry(60, 0, 10, 100),
  352. 'line;strokeWidth=1;direction=south;html=1;dashed=1;dashPattern=20 20;');
  353. cell1.vertex = true;
  354. var cell2 = new mxCell('Region 1', new mxGeometry(0, 40, 60, 20),
  355. 'text;align=right;');
  356. cell2.vertex = true;
  357. var cell3 = new mxCell('Region 2', new mxGeometry(70, 40, 60, 20),
  358. 'text;align=left;');
  359. cell3.vertex = true;
  360. return sb.createVertexTemplateFromCells([cell1, cell2, cell3], 130, cell1.geometry.height, 'Region');
  361. }),
  362. this.addEntry(dt + 'state', function()
  363. {
  364. var cell1 = new mxCell('State1<br>[invariant1]<br>&lt;&lt;extended/final&gt;&gt;', new mxGeometry(0, 0, 140, 176),
  365. 'swimlane;fontStyle=4;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=60;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;html=1;rounded=1;absoluteArcSize=1;arcSize=50;whiteSpace=wrap;');
  366. cell1.vertex = true;
  367. var field1 = new mxCell('',
  368. new mxGeometry(0, 0, 140, 50), 'fillColor=none;strokeColor=none;container=1;collapsible=0;');
  369. field1.vertex = true;
  370. cell1.insert(field1);
  371. var field2 = new mxCell('State2',
  372. new mxGeometry(30, 10, 80, 30), 'html=1;align=center;verticalAlign=middle;rounded=1;absoluteArcSize=1;arcSize=10;whiteSpace=wrap;');
  373. field2.vertex = true;
  374. field1.insert(field2);
  375. cell1.insert(divider.clone());
  376. var field3 = new mxCell('behavior1',
  377. new mxGeometry(0, 0, 140, 25), 'fillColor=none;strokeColor=none;align=left;verticalAlign=middle;spacingLeft=5;whiteSpace=wrap;html=1;');
  378. field3.vertex = true;
  379. cell1.insert(field3);
  380. cell1.insert(divider.clone());
  381. var field4 = new mxCell('transition1',
  382. new mxGeometry(0, 0, 140, 25), 'fillColor=none;strokeColor=none;align=left;verticalAlign=middle;spacingLeft=5;whiteSpace=wrap;html=1;');
  383. field4.vertex = true;
  384. cell1.insert(field4);
  385. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'State');
  386. }),
  387. this.createVertexTemplateEntry('html=1;align=center;verticalAlign=top;rounded=1;absoluteArcSize=1;arcSize=10;dashed=1;whiteSpace=wrap;', 140, 40,
  388. 'State1', 'State', null, null, dt + 'state'),
  389. this.createVertexTemplateEntry('html=1;align=center;verticalAlign=top;rounded=1;absoluteArcSize=1;arcSize=10;dashed=0;whiteSpace=wrap;', 140, 40,
  390. 'State', 'State', null, null, dt + 'state'),
  391. this.createVertexTemplateEntry('shape=folder;align=center;verticalAlign=middle;fontStyle=0;tabWidth=100;tabHeight=30;tabPosition=left;html=1;boundedLbl=1;labelInHeader=1;rounded=1;absoluteArcSize=1;arcSize=10;whiteSpace=wrap;', 140, 90,
  392. 'State1', 'State', null, null, dt + 'state'),
  393. this.createVertexTemplateEntry('html=1;align=center;verticalAlign=top;rounded=1;absoluteArcSize=1;arcSize=10;dashed=0;whiteSpace=wrap;', 140, 40,
  394. 'State1, State2, ...', 'State', null, null, dt + 'state'),
  395. this.createVertexTemplateEntry('shape=umlState;rounded=1;verticalAlign=top;spacingTop=5;umlStateSymbol=collapseState;absoluteArcSize=1;arcSize=10;html=1;whiteSpace=wrap;', 140, 60,
  396. 'State1', 'State', null, null, dt + 'state'),
  397. this.addEntry(dt + 'state entry point', function()
  398. {
  399. var cell1 = new mxCell('State1', new mxGeometry(0, 0, 140, 50),
  400. 'shape=umlState;rounded=1;verticalAlign=middle;align=center;absoluteArcSize=1;arcSize=10;umlStateConnection=connPointRefEntry;boundedLbl=1;whiteSpace=wrap;html=1;');
  401. cell1.vertex = true;
  402. var field1 = new mxCell('Entry1',
  403. new mxGeometry(-40, 40, 50, 20), 'text;verticalAlign=middle;align=center;whiteSpace=wrap;html=1;');
  404. field1.vertex = true;
  405. cell1.insert(field1);
  406. return sb.createVertexTemplateFromCells([cell1], 140, 60, 'State with entry point');
  407. }),
  408. this.addEntry(dt + 'state exit point', function()
  409. {
  410. var cell1 = new mxCell('State1', new mxGeometry(0, 0, 140, 50),
  411. 'shape=umlState;rounded=1;verticalAlign=middle;spacingTop=0;absoluteArcSize=1;arcSize=10;umlStateConnection=connPointRefExit;boundedLbl=1;whiteSpace=wrap;html=1;');
  412. cell1.vertex = true;
  413. var field1 = new mxCell('Exit1',
  414. new mxGeometry(-40, 40, 50, 20), 'text;verticalAlign=middle;align=center;whiteSpace=wrap;html=1;');
  415. field1.vertex = true;
  416. cell1.insert(field1);
  417. return sb.createVertexTemplateFromCells([cell1], 140, 60, 'State with exit point');
  418. }),
  419. this.createVertexTemplateEntry('ellipse;fillColor=strokeColor;html=1;', 30, 30,
  420. '', 'Initial preudostate / node', null, null, dt + 'initial pseudostate'),
  421. this.createVertexTemplateEntry('ellipse;html=1;shape=endState;fillColor=strokeColor;', 30, 30,
  422. '', 'Final state / node', null, null, dt + 'final state'),
  423. this.createVertexTemplateEntry('ellipse;html=1;', 30, 30,
  424. 'H', 'Shallow History', null, null, dt + 'shallow history pseudostate'),
  425. this.createVertexTemplateEntry('ellipse;html=1;', 30, 30,
  426. 'H*', 'Deep History', null, null, dt + 'deep history pseudostate'),
  427. this.createVertexTemplateEntry('ellipse;', 30, 30,
  428. '', 'Entry Point', null, null, dt + 'entry point pseudostate'),
  429. this.createVertexTemplateEntry('shape=sumEllipse;perimeter=ellipsePerimeter;html=1;backgroundOutline=1;', 30, 30,
  430. '', 'Exit Point / Flow Final Node', null, null, dt + 'exit point pseudostate'),
  431. this.createVertexTemplateEntry('ellipse;fillColor=strokeColor;html=1;', 20, 20,
  432. '', 'Junction', null, null, dt + 'junction pseudostate'),
  433. this.createVertexTemplateEntry('rhombus;', 30, 30,
  434. '', 'Choice / Merge Node / Decision Node', null, null, dt + 'choice pseudostate merge decision node'),
  435. this.createVertexTemplateEntry('shape=umlDestroy;html=1;', 30, 30,
  436. '', 'Terminate', null, null, dt + 'terminate pseudostate'),
  437. this.createVertexTemplateEntry('html=1;points=[];perimeter=orthogonalPerimeter;fillColor=strokeColor;', 5, 80,
  438. '', 'Join/Fork Node', null, null, dt + 'join fork pseudostate'),
  439. this.createVertexTemplateEntry('text;align=center;verticalAlign=middle;dashed=0;whiteSpace=wrap;', 140, 40,
  440. 'OpaqueAction1 spec.', 'Opaque Action', null, null, dt + 'opaque action'),
  441. this.createVertexTemplateEntry('html=1;shape=mxgraph.infographic.ribbonSimple;notch1=20;notch2=0;align=center;verticalAlign=middle;fontSize=14;fontStyle=0;flipH=1;fillColor=#FFFFFF;whiteSpace=wrap;', 160, 40,
  442. 'Trigger1 spec.', 'Trigger', null, null, dt + 'trigger'),
  443. this.createVertexTemplateEntry('html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;align=center;verticalAlign=middle;fontSize=14;fontStyle=0;fillColor=#FFFFFF;whiteSpace=wrap;', 160, 40,
  444. 'SendSignalAction1', 'Send Signal Action', null, null, dt + 'send signal action'),
  445. this.createVertexTemplateEntry('html=1;align=right;verticalAlign=top;rounded=1;absoluteArcSize=1;arcSize=50;dashed=0;spacingTop=10;spacingRight=30;whiteSpace=wrap;', 300, 160,
  446. '&lt;&lt;singleExecution&gt;&gt;', 'Single Execution', null, null, dt + 'single execution'),
  447. this.addEntry(dt + 'parameter', function()
  448. {
  449. var cell1 = new mxCell('', new mxGeometry(0, 10, 30, 30), 'html=1;');
  450. cell1.vertex = true;
  451. var field1 = new mxCell('Parameter1 spec.',
  452. new mxGeometry(40, 0, 100, 20), 'text;verticalAlign=middle;align=center;html=1;');
  453. field1.vertex = true;
  454. cell1.insert(field1);
  455. var field2 = new mxCell('',
  456. new mxGeometry(50, 25, 30, 15), 'triangle;html=1;direction=north;');
  457. field2.vertex = true;
  458. cell1.insert(field2);
  459. return sb.createVertexTemplateFromCells([cell1, field1, field2], 140, 40, 'Parameter');
  460. }),
  461. this.createVertexTemplateEntry('html=1;align=center;verticalAlign=top;rounded=1;absoluteArcSize=1;arcSize=10;dashed=0;whiteSpace=wrap;', 140, 40,
  462. 'Action1', 'Action', null, null, dt + 'action'),
  463. this.createVertexTemplateEntry('html=1;align=center;verticalAlign=middle;rounded=1;absoluteArcSize=1;arcSize=10;dashed=0;whiteSpace=wrap;', 140, 70,
  464. '&lt;&lt;external&gt;&gt;<br>Action1<br>(partition1)', 'Activity Partition', null, null, dt + 'activity partition'),
  465. this.addEntry(dt + 'object node', function()
  466. {
  467. var cell1 = new mxCell('ObjectNode1<br><br>[State1, State2...]', new mxGeometry(0, 0, 140, 60),
  468. 'html=1;align=center;verticalAlign=middle;rounded=0;absoluteArcSize=1;arcSize=10;dashed=0;whiteSpace=wrap;');
  469. cell1.vertex = true;
  470. var field1 = new mxCell('{annotation1}',
  471. new mxGeometry(0, 60, 140, 30), 'text;verticalAlign=middle;align=center;html=1;');
  472. field1.vertex = true;
  473. cell1.insert(field1);
  474. return sb.createVertexTemplateFromCells([cell1, field1], 140, 90, 'Object Node');
  475. }),
  476. this.addEntry(dt + 'activity parameter node', function()
  477. {
  478. var cell1 = new mxCell('Parameter1 spec.', new mxGeometry(0, 0, 140, 60),
  479. 'html=1;align=center;verticalAlign=middle;rounded=0;absoluteArcSize=1;arcSize=10;dashed=0;whiteSpace=wrap;');
  480. cell1.vertex = true;
  481. var field1 = new mxCell('{stream}',
  482. new mxGeometry(0, 60, 140, 30), 'text;verticalAlign=middle;align=center;html=1;');
  483. field1.vertex = true;
  484. cell1.insert(field1);
  485. return sb.createVertexTemplateFromCells([cell1, field1], 140, 90, 'Activity Parameter Node');
  486. }),
  487. this.createVertexTemplateEntry('html=1;shape=mxgraph.infographic.ribbonSimple;notch1=20;notch2=20;align=center;verticalAlign=middle;fontSize=14;fontStyle=0;fillColor=#FFFFFF;whiteSpace=wrap;', 160, 40,
  488. 'ObjectNode1', 'Object Node', null, null, dt + 'object node'),
  489. this.addEntry('behavior selection transformation decision input', function()
  490. {
  491. var cell = new mxCell('Behavior1 spec.', new mxGeometry(0, 0, 160, 60), 'shape=note2;boundedLbl=1;whiteSpace=wrap;html=1;size=25;verticalAlign=top;align=left;spacingLeft=5;');
  492. cell.vertex = true;
  493. var label = new mxCell('&lt;&lt;keyword&gt;&gt;', new mxGeometry(0, 0, cell.geometry.width, 25), 'resizeWidth=1;part=1;strokeColor=none;fillColor=none;align=left;spacingLeft=5;html=1;whiteSpace=wrap;');
  494. label.geometry.relative = true;
  495. label.vertex = true;
  496. cell.insert(label);
  497. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Behavior');
  498. }),
  499. this.createVertexTemplateEntry('html=1;points=[];perimeter=orthogonalPerimeter;fillColor=strokeColor;align=left;verticalAlign=top;spacingLeft=10;', 5, 80,
  500. '{joinSpec = join spec}', 'Join Node', null, null, dt + 'join node'),
  501. this.addDataEntry('activity partition', 180, 200, 'Activity Partition', '7ZjRbtowFIafJrdTnMBobwltbzZpWvcCLjkQa45P5Jw20KefnRjCBikBnKlURUGyj30c5/vt/JggTvLVg+ZF9h1TkEF8F8SJRqSmlK8SkDKIQpEG8SyIotB8g+i+o5XVrWHBNSjqkxA1CS9cPkMTSUUOqhSo3FglraVrKjNe2CLxJxuaZpSbCc+YKVaZIHgs+Ny2V+ZxTKwkrulRvNqQmUY8naMiLhRolzRHKXlRinq0Wd0jEzL9xtf4TJv7bGrThZAyQYk2W6GyEygrkUuu4H6nKYjiRf2pZ6DxN/yT5J4YNMGqk1odcsgeAHMgvTZdKpFS5nrcNGTDDMQyc2lR6IK8bALLbW4rgik4HQ5rEu9p0qmEmTIJLn/CnLha9hFln3mqsfjF9RLIBQoUikDfvRgapYsdgE9YuEYJi03uExJh7iragdkOWkMZT81lMCXhl3EwNk+TmDpr6+ay3TUlqIyAZsHYMYCXVEFJF6kaHVZ1vRGvyTgu8uUaj4bVWCnbu9W4Uz7Wysd25WM78tkyGrILiZWpZiJNQV2kQ3x0d0UDcR/vcf9h8dKb77t3q8AlsFedi36oNf+1m/0Vrn4P7Fn4/+BPrslU+uri0VQ8+Meop39MPMh5072X4uvbSxlq8Wp/HEp3l15qTM5yER/0bz+Ae1+C+DTv8EGchZ/IT7EML8zZp2cM7RmM9TSNWx+C7p/2t64xur7tdJ5rsONH+0O24YX/wCf79/MS64J8mnF4Yf4RTto+mPd1jjOgm2r7j2Xd9tcfmn8A'),
  502. this.createVertexTemplateEntry('html=1;align=center;verticalAlign=top;rounded=1;absoluteArcSize=1;arcSize=20;dashed=1;whiteSpace=wrap;', 200, 100,
  503. '', 'Interruptible Activity Region', null, null, dt + 'interruptible activity region'),
  504. this.createVertexTemplateEntry('html=1;align=center;verticalAlign=middle;rounded=1;absoluteArcSize=1;arcSize=10;dashed=1;whiteSpace=wrap;', 140, 40,
  505. 'State1', 'State', null, null, dt + 'state'),
  506. this.addEntry('constraint precondition postcondition selection transformation decision input', function()
  507. {
  508. var cell = new mxCell('Constraint1 spec.', new mxGeometry(0, 0, 160, 60), 'shape=note2;boundedLbl=1;whiteSpace=wrap;html=1;size=25;verticalAlign=top;align=left;spacingLeft=5;whiteSpace=wrap;');
  509. cell.vertex = true;
  510. var label = new mxCell('&lt;&lt;keyword&gt;&gt;', new mxGeometry(0, 0, cell.geometry.width, 25), 'resizeWidth=1;part=1;html=1;strokeColor=none;fillColor=none;align=left;spacingLeft=5;whiteSpace=wrap;');
  511. label.geometry.relative = true;
  512. label.vertex = true;
  513. cell.insert(label);
  514. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Constraint / Precondition / Postcondition');
  515. }),
  516. this.createVertexTemplateEntry('fontStyle=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=2;html=1;', 30, 30,
  517. 'Pin1<br>[State1]<br>{control}<br>Parameter1 spec.',
  518. 'Port', null, null, 'port'),
  519. this.addEntry('object flow', function()
  520. {
  521. var cell1 = new mxCell('', new mxGeometry(50, 0, 30, 30), 'html=1;rounded=0;');
  522. cell1.vertex = true;
  523. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;endSize=6;');
  524. edge1.geometry.setTerminalPoint(new mxPoint(0, 15), true);
  525. edge1.geometry.relative = true;
  526. edge1.edge = true;
  527. cell1.insertEdge(edge1, false);
  528. var edge2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;endSize=6;');
  529. edge2.geometry.setTerminalPoint(new mxPoint(130, 15), false);
  530. edge2.geometry.relative = true;
  531. edge2.edge = true;
  532. cell1.insertEdge(edge2, true);
  533. return sb.createEdgeTemplateFromCells([cell1, edge1, edge2], 160, 30, 'Object Flow');
  534. }),
  535. this.createVertexTemplateEntry('fontStyle=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=2;html=1;points=[[0,0.5],[1,0.5]];fillColor=strokeColor;', 30, 30, '', 'Pin ', null, null, 'pin'),
  536. this.createVertexTemplateEntry('shape=mxgraph.uml25.inputPin;html=1;points=[[0,0.5],[1,0.5]];', 30, 30, '', 'Input Pin', null, null, 'input pin'),
  537. this.createVertexTemplateEntry('shape=mxgraph.uml25.inputPin;html=1;points=[[0,0.5],[1,0.5]];strokeColor=#ffffff;fillColor=#000000;', 30, 30, '', 'Input Pin', null, null, 'input pin'),
  538. this.createVertexTemplateEntry('shape=mxgraph.uml25.inputPin;html=1;points=[[0,0.5],[1,0.5]];flipH=1;', 30, 30, '', 'Output Pin', null, null, 'output pin'),
  539. this.createVertexTemplateEntry('shape=mxgraph.uml25.inputPin;html=1;points=[[0,0.5],[1,0.5]];strokeColor=#ffffff;fillColor=#000000;flipH=1;', 30, 30, '', 'Output Pin', null, null, 'output pin'),
  540. this.createVertexTemplateEntry('shape=mxgraph.uml25.behaviorAction;html=1;rounded=1;absoluteArcSize=1;arcSize=10;align=left;spacingLeft=5;whiteSpace=wrap;', 190, 60, 'CallBehaviorAction1', 'Behavior Action', null, null, 'behavior action'),
  541. this.createVertexTemplateEntry('html=1;align=center;verticalAlign=top;rounded=1;absoluteArcSize=1;arcSize=10;dashed=0;whiteSpace=wrap;', 140, 40,
  542. 'Action1<br>(Operation1)', 'Call Operation Action', null, null, dt + 'call operation action'),
  543. this.createVertexTemplateEntry('html=1;align=center;verticalAlign=middle;rounded=1;absoluteArcSize=1;arcSize=10;dashed=0;whiteSpace=wrap;', 140, 40,
  544. 'ValueSpecAction1 spec.', 'Value Specification Action', null, null, dt + 'value specification action'),
  545. this.addEntry(dt + 'action with output', function()
  546. {
  547. var cell1 = new mxCell('Action1', new mxGeometry(0, 20, 110, 40),
  548. 'shape=mxgraph.uml25.action;html=1;align=center;verticalAlign=middle;absoluteArcSize=1;arcSize=10;dashed=0;spacingRight=10;whiteSpace=wrap;');
  549. cell1.vertex = true;
  550. var field1 = new mxCell('variable1',
  551. new mxGeometry(110, 0, 60, 30), 'text;verticalAlign=middle;align=left;html=1;');
  552. field1.vertex = true;
  553. cell1.insert(field1);
  554. return sb.createVertexTemplateFromCells([cell1, field1], 170, 60, 'Action with output');
  555. }),
  556. this.addEntry(dt + 'action with input', function()
  557. {
  558. var cell1 = new mxCell('Action1', new mxGeometry(0, 0, 110, 40),
  559. 'shape=mxgraph.uml25.action;html=1;align=center;verticalAlign=middle;absoluteArcSize=1;arcSize=10;dashed=0;spacingLeft=10;flipH=1;whiteSpace=wrap;');
  560. cell1.vertex = true;
  561. var field1 = new mxCell('variable1',
  562. new mxGeometry(-60, 0, 60, 40), 'text;verticalAlign=middle;align=right;html=1;');
  563. field1.vertex = true;
  564. cell1.insert(field1);
  565. return sb.createVertexTemplateFromCells([cell1], 110, 40, 'Action with input');
  566. }),
  567. this.addEntry(dt + 'read self object action', function()
  568. {
  569. var cell1 = new mxCell('Action1', new mxGeometry(0, 0, 110, 40),
  570. 'shape=mxgraph.uml25.action;html=1;align=center;verticalAlign=middle;absoluteArcSize=1;arcSize=10;dashed=0;spacingLeft=10;flipH=1;whiteSpace=wrap;');
  571. cell1.vertex = true;
  572. var field1 = new mxCell('self',
  573. new mxGeometry(-60, 0, 60, 40), 'text;verticalAlign=middle;align=right;html=1;');
  574. field1.vertex = true;
  575. cell1.insert(field1);
  576. return sb.createVertexTemplateFromCells([cell1], 110, 40, 'Read self object action');
  577. }),
  578. this.addEntry(dt + 'value specification action', function()
  579. {
  580. var cell1 = new mxCell('Action1', new mxGeometry(0, 0, 110, 40),
  581. 'shape=mxgraph.uml25.action;html=1;align=center;verticalAlign=middle;absoluteArcSize=1;arcSize=10;dashed=0;spacingLeft=10;flipH=1;whiteSpace=wrap;');
  582. cell1.vertex = true;
  583. var field1 = new mxCell('value1',
  584. new mxGeometry(-60, 0, 60, 40), 'text;verticalAlign=middle;align=right;html=1;');
  585. field1.vertex = true;
  586. cell1.insert(field1);
  587. return sb.createVertexTemplateFromCells([cell1], 110, 40, 'Value specification action');
  588. }),
  589. this.createVertexTemplateEntry('html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;align=center;verticalAlign=middle;fontSize=14;fontStyle=0;fillColor=#FFFFFF;whiteSpace=wrap;', 160, 40,
  590. 'SendObjectAction1', 'Send Object Action', null, null, dt + 'send object action'),
  591. this.createVertexTemplateEntry('html=1;shape=mxgraph.infographic.ribbonSimple;notch1=20;notch2=0;align=center;verticalAlign=middle;fontSize=14;fontStyle=0;fillColor=#FFFFFF;flipH=0;spacingRight=0;spacingLeft=14;whiteSpace=wrap;', 170, 40,
  592. 'AcceptEventAction1', 'Accept Event Action', null, null, dt + 'acceppt event action'),
  593. this.createVertexTemplateEntry('shape=collate;html=1;', 40, 40,
  594. '', 'Time Event Trigger', null, null, dt + 'time event trigger'),
  595. this.createVertexTemplateEntry('shape=mxgraph.uml25.actionParams;html=1;align=center;verticalAlign=top;absoluteArcSize=1;arcSize=10;dashed=0;spacingLeft=10;spacingTop=5;whiteSpace=wrap;', 150, 50,
  596. 'Action1', 'Action with Parameters', null, null, dt + 'action with parameters'),
  597. this.createVertexTemplateEntry('dashed=1;rounded=1;absoluteArcSize=1;arcSize=20;html=1;verticalAlign=top;align=left;spacingTop=5;spacingLeft=10;whiteSpace=wrap;', 200, 100,
  598. '&lt;&lt;structured&gt;&gt;', 'Structured Activity Node', null, null, dt + 'structured activity node'),
  599. this.addDataEntry(dt + 'expansion', 300, 300, 'Expansion', '7Vtdb5swFP01PHbCdsjSxybduodNmtRJe/aCA2gmROB8sF8/EwMpKVHIlouxhZRIudfYXJ9jenp0E4cs4sNLSjfht8Rn3CGfHLJIk0SoT/FhwTh3sBv5Dnl2MHbl28GfL4yi46i7oSlbiy4TsJqwo3zLVMbBUxpvHDLncoF5M/rN8n2S+nUyaFxSRsV6mch5uV4oYrmrZyTHfJqFzC+DNNmu/Tqiv7KEbwV7Spev0R9WZetIboPMdywV0ZLyJx4Fa5kUSXFbWkacrYoCsg1dRuvgRzGmppWZr8dxldqHkWCvMl+svZfo15UX92CHi2geUyWULyyJmUhzeck+8kWoriCuQtwNWRSE4ixJM5UI6rkncuSHkp92rkgLV2dgBxLVYi8pyyRuP8uq3DrzparJ7bphfHXDs5b9lqfOTRmnItqxxvJtGJR3+J5E8sbYPVSwqRm5Ch/QGYrJapUx8Q7Dus5OsE6uw9oJzk1R+7Ewby5fstSF63hy+qKIPniNGFWRfJH5m2ekEynkKikYgJS7ou6NqN/0KGCIoz8dSbiJhAkECR9HEm4iYQpBwmxA2tqc0I/SPiDUh9Y+mnfWZ+ZrbUXlCLtOsUVoZEG/2qI2xzuy0LPcoiF52VyD3vbibBGgtUVnZx01zjr657OOLPC2CNDcWoY7qOAC2ls7aYBRXECDaycNMJJ7b4t7K6ad3K4OLe7J+yJA8wv2HFjgfqtiRty1qjEGtL920gCixhXqIw1a1Xiozdw2HGf3ktmmyhIQXA3s5trQzjWxn6sJ9xxSZA3s6OqlAUZkDezp6qUBRmSH1NW96Gx7lNyT070vzga2dW3o61b/QY24axVdYmBjVy8NIKJLAJ2tnTSAiC4ZkrO9+FUq030uMdDnEgt8LjHQ52rCHVRyDfS5emmAkVwDfa5eGmAkd0g+t2M/13zXSwx0vcQC11v9JRtx1yrBEwNdr14aQCR4YqDr1UuD9/j/NMjw9Bttdfnbn3D/BQ=='),
  600. this.addEntry(dt + 'execution region', function()
  601. {
  602. var cell1 = new mxCell('Action', new mxGeometry(0, 0, 160, 50),
  603. 'html=1;dashed=0;rounded=1;absoluteArcSize=1;arcSize=20;verticalAlign=middle;align=center;whiteSpace=wrap;');
  604. cell1.vertex = true;
  605. var label1 = new mxCell('*',
  606. new mxGeometry(1, 0.5, 20, 20), 'text;resizeWidth=0;resizeHeight=0;points=[];part=1;verticalAlign=middle;align=center;html=1;');
  607. label1.vertex = true;
  608. label1.geometry.relative = true;
  609. label1.geometry.offset = new mxPoint(-20, -10);
  610. cell1.insert(label1);
  611. return sb.createVertexTemplateFromCells([cell1], 160, 50, 'Execution region');
  612. }),
  613. this.addDataEntry(dt + 'execution node action', 210, 60, 'Execution node with action', '7VjbboMwDP2aPG5KQtt1jy3dupdJk/qw5ww8iBSaKqS3ff0cSC/0olZr0boJCSR8gh37nFgWkCDMFkMjJumrjkGR4IkEodHalk/ZIgSlCKcyJsGAcE7xJvz5yCorVulEGBjbcxx46TATagol0ous1GMfKLdL5fHUZpjdgJGgH4s8BReAomH0dBwXllsSH7lWUws9E43kF6zQtcWdywyMlZFQPSWTMYKZjGO3TV94IMLswSAwT6WF0UREzneOLCHmM8YYsDhadQH5koegM7Bmia/MZWxTXzkrmaEpyCT1bh2Piby0k7XrhkN88DQepjTYo3SPywRJc6UYyJGWd58UXSMvq5QctEX8WaXzk6V3D1Tuzwk1oISVM6iEP0SH3+FNS9yYU59P4MMsS/OO7RCqPz9zsHt0rvM8i+HWaYbPYnbici8Sa/fxwlRDStroHjrrvl2x2crCqyLKj89ocPqM1iDUVZVoN0pc3DK8jhbpNMJcLEyrDmEeGmEuFmZ3Sl9FmO5tju1lxeEfDfHH+hqB7TQCqzQCu2ojdP/+EF/J20hxa1OcsUaZ2xzjbP/DuVHmN+Y4mpu/JeXr2z9TvgE='),
  614. this.addEntry(dt + 'interaction', function()
  615. {
  616. var cell1 = new mxCell('Interaction heading', new mxGeometry(0, 0, 290, 160), frameStyle + 'width=170;');
  617. cell1.vertex = true;
  618. var field1 = new mxCell('Property1',
  619. new mxGeometry(0, 0, 100, 20), 'text;html=1;');
  620. field1.geometry.relative = true;
  621. field1.geometry.offset = new mxPoint(20, 40);
  622. field1.vertex = true;
  623. cell1.insert(field1);
  624. var field2 = new mxCell('Property2',
  625. new mxGeometry(0, 0, 150, 60), 'shape=note2;boundedLbl=1;whiteSpace=wrap;html=1;size=25;verticalAlign=top;align=left;spacingLeft=10;');
  626. field2.geometry.relative = true;
  627. field2.geometry.offset = new mxPoint(120, 80);
  628. field2.vertex = true;
  629. cell1.insert(field2);
  630. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Interaction');
  631. }),
  632. this.addDataEntry(dt + 'lifeline sequence participant', 220, 300, 'Lifelines',
  633. '7VRLboMwED2N98SWmnUhaTaNVDW9gANTsGRsd2wg6ek7gAlJW6RuumoXSOP3GXvwk5nI6tMOpav2tgDNxJaJDK0NY1WfMtCa8UQVTGwY5wl9jD8ssKuBTZxEMOEnBj4aWqkbGJFH9QpaGYitfDjryPhKur5saj2JmEgdoKohABKjI/w0Y2lXqQAHJ/Pe2tGghFWhpkk3Kypza4IkC8Z1gda9SCyhP34yCLSWzqvjcIweQcgb9KqFZ/DqfUJtE/qtM2sM5JPZWQyE+IC0Rw+C9KEDT2VqoNsWJRymAdcp43dvTf/nU7gQF4iJ+yteH+2Vexbx7JNooUELGFQu9YKVBmyhuPEmNwK0jSm+KNabodFwo7QBnBZTMUAxEjuwdFl4JkmnilBFRTImJ6lAlVW0iQmUfgTKi3cOGRUxZ99nTixmjv9n7u9lbjLEl+pXMkjL+U0duJsn9wM='),
  634. this.addDataEntry(dt + 'lifeline execution', 220, 300, 'Lifelines',
  635. '7ZbRjpwgFIafhssmKmO3vay63Zs2aTp9AVbPKgkKBRxn+vQ9II7OOjaTbrJp0o2awH/ODwKfJxKat8cHzVTzVVYgCL0nNNdS2rHVHnMQgiQRrwgtSJJE+JDk80Y09tFIMQ2dvcWQjIYDEz2Myhf+BIJ3ECLGnkSImIYp1+xbMSURminQvAULGiMiyN9mLRsabmGvWOmsAy4Utca2uNIixmYpO8vQokO/0lL9YLoG9/qRTxCCKcMf/Ws4RUPZa8MP8B0M/zWpsrdu6lx2HZSTWUltUTFW4xxOBGbsAAabWQfDfVXDflrgXUaS9z97t/MZnANnidBPi7h4lAv3nJTkz5I2BjiAtrxkYsOKCzxAdeGNLhK07LtqlXFX+IH8ieIEcNykwksBiQeQeFj6hCmTIVATDbyyTdCioDXA6yYMQyeRmVGoz2PN0GEjcHedQbpicIXeAhgl8ST9bGmGt9uW5ZOStHA7NUbiReTdHIo3TfFVU1o8Ax2xamQtOyaWqF9F0HqY9+7bMeuP5y/5fAkfT1yIXAqp/dbSD5G7buUm+SM3u3R0nMbux2sUrSE60/YSiHabhSx+K2T/XyF7lcKVvhWu1yxcN/Gw+0cKFHbnvzgfu/jJ+w0='),
  636. this.addDataEntry(dt + 'destruction occurence specification', 100, 300, 'Destruction Occurence Specification',
  637. 'lVTLbsMgEPwa7g6Oml5rO82llaqmP0DsrUHCxgX86td3wTiPJq7Sg6VldgbY3TEkTqthp1nDX1UBksRbEqdaKTtF1ZCClIRGoiBxRiiN8CP0eSG78tmoYRpqe4+AToKOyRYm5EV8ghQ1hK2MHWXIGM4aF7aVnEkkThrQogILGjMywG8nLOm5sLBvWO6kPRaKGLcVVpqtMMxVbRlKdFgXWjUfTJfgrh95gpSsMeLgr+EQDXmrjejgHYz4nlHVWnd0quoa8lncKG0RMVbjGQ4EZmwPBsOkhn5blLCfC9wkhD58ta7zCRwTR4jET2d5eVBn6hOJpr9ICxt0oK3ImVyQYoEdFBfa6IKgVVsXV4xN5jfyE8UDYFh0hYeCJXagcFh6REovCssDI5qcE3EQJQ+yeAaZmYDyqD2ZDIPgs9uei68895fVMpyWVqOzBjMcijBZ6z2ydzxz5cm7WkBvt2CYK50UYyA/hvVZh9Y3GrT+f39wefrffe7iOfgB'),
  638. this.addEntry(dt + 'interaction', function()
  639. {
  640. var cell1 = new mxCell('Interaction heading', new mxGeometry(0, 0, 290, 250), frameStyle + 'width=170;');
  641. cell1.vertex = true;
  642. var field1 = new mxCell('[constraint1]',
  643. new mxGeometry(0, 0, 100, 20), 'text;html=1;');
  644. field1.geometry.relative = true;
  645. field1.geometry.offset = new mxPoint(20, 40);
  646. field1.vertex = true;
  647. cell1.insert(field1);
  648. var field2 = new mxCell('[constraint2]',
  649. new mxGeometry(0, 125, 290, 10), 'line;strokeWidth=1;dashed=1;labelPosition=center;verticalLabelPosition=bottom;align=left;verticalAlign=top;spacingLeft=20;spacingTop=15;html=1;whiteSpace=wrap;');
  650. field2.geometry.relative = false;
  651. field2.vertex = true;
  652. cell1.insert(field2);
  653. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Interaction');
  654. }),
  655. this.addEntry(dt + 'lifeline continuation', function()
  656. {
  657. var cell1 = new mxCell('Continuation1', new mxGeometry(30, 60, 160, 30), 'rounded=1;dashed=0;whiteSpace=wrap;html=1;');
  658. cell1.vertex = true;
  659. var cell2 = new mxCell('Lifeline1', new mxGeometry(0, 0, 100, 200), lifelineStyle);
  660. cell2.vertex = true;
  661. var cell3 = new mxCell('Lifeline2', new mxGeometry(120, 0, 100, 200), lifelineStyle);
  662. cell3.vertex = true;
  663. return sb.createVertexTemplateFromCells([cell1, cell2, cell3], 220, 200, 'Lifeline Continuation');
  664. }),
  665. this.addEntry(dt + 'lifeline state invariant', function()
  666. {
  667. var cell1 = new mxCell('Lifeline1', new mxGeometry(0, 0, 100, 200), lifelineStyle);
  668. cell1.vertex = true;
  669. var cell2 = new mxCell('State1 inv.', new mxGeometry(10, 50, 80, 30),
  670. 'rounded=1;dashed=0;point=[];connectable=0;targetShapes=umlLifeline;html=1;');
  671. cell2.vertex = true;
  672. cell1.insert(cell2);
  673. var cell3 = new mxCell('{State2 inv.}', new mxGeometry(0, 140, 100, 30),
  674. 'text;align=center;point=[];connectable=0;targetShapes=umlLifeline;html=1;');
  675. cell3.vertex = true;
  676. cell1.insert(cell3);
  677. return sb.createVertexTemplateFromCells([cell1], 100, 200, 'Lifeline State Invariant');
  678. }),
  679. this.addEntry(dt + 'interaction use', function()
  680. {
  681. var cell1 = new mxCell('Ref', new mxGeometry(0, 0, 260, 120), frameStyle + 'width=50;');
  682. cell1.vertex = true;
  683. var field1 = new mxCell('Interaction1',
  684. new mxGeometry(0, 0, 100, 20), 'text;align=center;html=1;');
  685. field1.geometry.relative = true;
  686. field1.geometry.offset = new mxPoint(60, 50);
  687. field1.vertex = true;
  688. cell1.insert(field1);
  689. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Interaction');
  690. }),
  691. this.addEntry(dt + 'lifeline', function()
  692. {
  693. var cell1 = new mxCell('Lifeline1', new mxGeometry(0, 0, 100, 200), lifelineStyle);
  694. cell1.vertex = true;
  695. var cell2 = new mxCell('', new mxGeometry(30, 70, 40, 20),
  696. 'shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;fillColor=none;point=[];connectable=0;targetShapes=umlLifeline;');
  697. cell2.vertex = true;
  698. cell1.insert(cell2);
  699. var cell3 = new mxCell('', new mxGeometry(30, 150, 40, 20),
  700. 'shape=partialRectangle;whiteSpace=wrap;html=1;top=0;fillColor=none;point=[];connectable=0;targetShapes=umlLifeline;');
  701. cell3.vertex = true;
  702. cell1.insert(cell3);
  703. return sb.createVertexTemplateFromCells([cell1], 100, 200, 'Lifeline');
  704. }),
  705. this.addEntry(dt + 'use case', function()
  706. {
  707. var cell1 = new mxCell('Class1', new mxGeometry(0, 0, 180, 140),
  708. 'swimlane;fontStyle=1;align=center;horizontal=1;startSize=30;collapsible=0;html=1;whiteSpace=wrap;');
  709. cell1.vertex = true;
  710. var field1 = new mxCell('Heading1',
  711. new mxGeometry(0, 0, 140, 70), frameStyle + 'width=80;');
  712. field1.geometry.relative = true;
  713. field1.geometry.offset = new mxPoint(20, 50);
  714. field1.vertex = true;
  715. cell1.insert(field1);
  716. var field2 = new mxCell('Interaction1',
  717. new mxGeometry(0, 0, 100, 20), 'text;align=left;html=1;');
  718. field2.geometry.relative = true;
  719. field2.geometry.offset = new mxPoint(10, 40);
  720. field2.vertex = true;
  721. field1.insert(field2);
  722. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Use Case');
  723. }),
  724. this.addEntry('observation', function()
  725. {
  726. var edge = new mxCell('observation', new mxGeometry(0, 0, 0, 0), 'endArrow=none;html=1;endSize=12;startArrow=none;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=center;verticalAlign=bottom;endFill=0;');
  727. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  728. edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  729. edge.geometry.relative = true;
  730. edge.geometry.x = 0;
  731. edge.geometry.y = 3;
  732. edge.edge = true;
  733. return sb.createEdgeTemplateFromCells([edge], 160, 0, 'Observation');
  734. }),
  735. this.addEntry('time constraint', function()
  736. {
  737. var edge = new mxCell('{Time constraint 1}', new mxGeometry(0, 0, 0, 0), 'endArrow=none;html=1;endSize=12;startArrow=none;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=center;verticalAlign=bottom;endFill=0;');
  738. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  739. edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  740. edge.geometry.relative = true;
  741. edge.geometry.x = 0;
  742. edge.geometry.y = 3;
  743. edge.edge = true;
  744. return sb.createEdgeTemplateFromCells([edge], 160, 0, 'Time constraint');
  745. }),
  746. this.addEntry('duration constraint', function()
  747. {
  748. var edge = new mxCell('{Duration constraint 1}', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;endSize=12;startArrow=open;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=center;verticalAlign=bottom;endFill=0;');
  749. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  750. edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  751. edge.geometry.relative = true;
  752. edge.geometry.x = 0;
  753. edge.geometry.y = 3;
  754. edge.edge = true;
  755. return sb.createEdgeTemplateFromCells([edge], 160, 0, 'Duration constraint');
  756. }),
  757. this.addEntry(dt + 'classifier', function()
  758. {
  759. var cell1 = new mxCell('', new mxGeometry(0, 0, 180, 120),
  760. 'shape=ellipse;container=1;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;html=1;dashed=0;collapsible=0;');
  761. cell1.vertex = true;
  762. var field1 = new mxCell('UseCase1',
  763. new mxGeometry(0, 0, 180, 30), 'html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rotatable=0;whiteSpace=wrap;');
  764. field1.vertex = true;
  765. cell1.insert(field1);
  766. var divider1 = new mxCell('', new mxGeometry(9, 30, 162, 10), 'line;strokeWidth=1;fillColor=none;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;dashed=0;resizeWidth=1;');
  767. divider1.vertex = true;
  768. cell1.insert(divider1);
  769. var field2 = new mxCell('extension points',
  770. new mxGeometry(0, 40, 180, 30), 'text;html=1;align=center;verticalAlign=middle;rotatable=0;fillColor=none;strokeColor=none;whiteSpace=wrap;');
  771. field2.vertex = true;
  772. cell1.insert(field2);
  773. var field3 = new mxCell('Extension point 1',
  774. new mxGeometry(0, 70, 180, 30), 'text;html=1;align=left;verticalAlign=middle;rotatable=0;spacingLeft=25;fillColor=none;strokeColor=none;whiteSpace=wrap;');
  775. field3.vertex = true;
  776. cell1.insert(field3);
  777. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Classifier');
  778. }),
  779. this.addEntry(dt + 'extension point classifier', function()
  780. {
  781. var cell1 = new mxCell('', new mxGeometry(0, 0, 160, 88), 'fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;marginBottom=0;');
  782. cell1.vertex = true;
  783. var cell2 = new mxCell('UseCase1', new mxGeometry(0, 0, 160, 30), 'html=1;align=left;spacingLeft=4;verticalAlign=middle;strokeColor=none;fillColor=none;fontStyle=1;whiteSpace=wrap;');
  784. cell2.vertex = true;
  785. cell1.insert(cell2);
  786. var symbol = new mxCell('', new mxGeometry(1, 0, 20, 16), 'shape=ellipse;');
  787. symbol.vertex = true;
  788. symbol.geometry.relative = true;
  789. symbol.geometry.offset = new mxPoint(-25, 7);
  790. cell2.insert(symbol);
  791. cell1.insert(divider.clone());
  792. var cell3 = new mxCell('extension points', new mxGeometry(0, 0, 160, 25), 'html=1;align=center;spacingLeft=4;verticalAlign=top;strokeColor=none;fillColor=none;whiteSpace=wrap;');
  793. cell3.vertex = true;
  794. cell1.insert(cell3);
  795. var cell4 = new mxCell('Extension point 1', new mxGeometry(0, 0, 160, 25), 'html=1;align=left;spacingLeft=4;verticalAlign=top;strokeColor=none;fillColor=none;whiteSpace=wrap;');
  796. cell4.vertex = true;
  797. cell1.insert(cell4);
  798. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Extension Point Classifier');
  799. }),
  800. this.createVertexTemplateEntry('shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;', 30, 60, 'Actor', 'Actor', false, null, 'uml actor'),
  801. this.createVertexTemplateEntry('html=1;align=center;verticalAlign=middle;dashed=0;whiteSpace=wrap;', 160, 70,
  802. '&lt;&lt;actor&gt;&gt;<br><br><b>Actor1</b>',
  803. 'Actor', null, null, dt + 'actor'),
  804. this.addEntry('extension point extend', function()
  805. {
  806. var cell = new mxCell('Extension point 1', new mxGeometry(0, 0, 140, 60), 'shape=note2;boundedLbl=1;whiteSpace=wrap;html=1;size=25;verticalAlign=top;align=left;spacingLeft=5;');
  807. cell.vertex = true;
  808. var label = new mxCell('Extend condition 1', new mxGeometry(0, 0, cell.geometry.width, 25), 'resizeWidth=1;part=1;strokeColor=none;fillColor=none;align=left;spacingLeft=5;whiteSpace=wrap;html=1;');
  809. label.geometry.relative = true;
  810. label.vertex = true;
  811. cell.insert(label);
  812. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Extension');
  813. }),
  814. this.addEntry('deployment target diagram', function()
  815. {
  816. var cell1 = new mxCell('DeploymentTarget1', new mxGeometry(0, 0, 130, 140), 'verticalAlign=top;align=left;shape=cube;size=10;direction=south;fontStyle=0;html=1;boundedLbl=1;spacingLeft=5;whiteSpace=wrap;');
  817. cell1.vertex = true;
  818. var cell2 = new mxCell('Node1', new mxGeometry(0, 0, 100, 80), 'verticalAlign=top;align=center;shape=cube;size=10;direction=south;html=1;boundedLbl=1;spacingLeft=5;whiteSpace=wrap;');
  819. cell2.geometry.relative = true;
  820. cell2.geometry.offset = new mxPoint(10, 50);
  821. cell2.vertex = true;
  822. cell1.insert(cell2);
  823. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Deployment');
  824. }),
  825. this.createVertexTemplateEntry('html=1;align=center;verticalAlign=middle;dashed=0;whiteSpace=wrap;', 180, 60,
  826. '&lt;&lt;deployment spec&gt;&gt;<br><br><b>Deployment1</b>',
  827. 'Deployment Specification', null, null, dt + 'deployment specification'),
  828. this.createVertexTemplateEntry('html=1;align=center;verticalAlign=middle;dashed=0;whiteSpace=wrap;', 180, 60,
  829. '&lt;&lt;artifact&gt;&gt;<br><br><b>Artifact1</b>',
  830. 'Artifact', null, null, dt + 'artifact'),
  831. this.addEntry('information item', function()
  832. {
  833. var cell1 = new mxCell('InformationItem1', new mxGeometry(0, 0, 200, 50), 'align=left;spacingLeft=10;html=1;dashed=0;whiteSpace=wrap;');
  834. cell1.vertex = true;
  835. var cell2 = new mxCell('', new mxGeometry(1, 0.5, 30, 20), 'shape=triangle;fillColor=strokeColor;');
  836. cell2.geometry.relative = true;
  837. cell2.geometry.offset = new mxPoint(-45, -10);
  838. cell2.vertex = true;
  839. cell1.insert(cell2);
  840. return sb.createVertexTemplateFromCells([cell1], cell1.geometry.width, cell1.geometry.height, 'Information item');
  841. }),
  842. this.addEntry('template binding', function()
  843. {
  844. var edge = new mxCell('&lt;&lt;bind&gt;&gt;', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=bottom;dashed=1;endFill=0;labelBackgroundColor=none;');
  845. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  846. edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  847. edge.geometry.relative = true;
  848. edge.edge = true;
  849. var cell1 = new mxCell('Binding1 information', new mxGeometry(0, 0, 0, 0), 'resizable=0;html=1;align=center;verticalAlign=top;labelBackgroundColor=none;');
  850. cell1.geometry.relative = true;
  851. cell1.setConnectable(false);
  852. cell1.vertex = true;
  853. edge.insert(cell1);
  854. return sb.createEdgeTemplateFromCells([edge], 160, 0, 'Template Binding');
  855. }),
  856. this.createEdgeTemplateEntry('endArrow=circlePlus;startArrow=none;endFill=0;startFill=0;endSize=8;html=1;labelBackgroundColor=none;', 160, 0, '', 'Inner class', null, 'inner class'),
  857. this.createEdgeTemplateEntry('endArrow=open;startArrow=none;endFill=0;startFill=0;endSize=8;html=1;verticalAlign=bottom;dashed=1;labelBackgroundColor=none;', 160, 0, '&lt;&lt;keyword&gt;&gt;', 'Element / Package Merge / Package Import, Substitution', null, 'element package import substitution merge'),
  858. this.createEdgeTemplateEntry('endArrow=none;startArrow=none;endFill=0;startFill=0;endSize=8;html=1;verticalAlign=bottom;dashed=1;labelBackgroundColor=none;dashPattern=10 10;', 160, 0, '{constraint spec.}', 'Constraint', null, 'constraint'),
  859. this.addEntry('dependency', function()
  860. {
  861. var edge = new mxCell('&lt;&lt;keyword&gt;&gt;', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=bottom;dashed=1;endFill=0;labelBackgroundColor=none;');
  862. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  863. edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  864. edge.geometry.relative = true;
  865. edge.edge = true;
  866. var cell1 = new mxCell('Dependency1', new mxGeometry(0, 0, 0, 0), 'resizable=0;html=1;align=center;verticalAlign=top;labelBackgroundColor=none;');
  867. cell1.geometry.relative = true;
  868. cell1.setConnectable(false);
  869. cell1.vertex = true;
  870. edge.insert(cell1);
  871. return sb.createEdgeTemplateFromCells([edge], 160, 0, 'Dependency');
  872. }),
  873. this.addEntry('dependency', function()
  874. {
  875. var cell1 = new mxCell('', new mxGeometry(68, 38, 4, 4), 'ellipse;resizable=0;aspect=fixed;fillColor=strokeColor;');
  876. cell1.vertex = true;
  877. var edge1 = new mxCell('&lt;&lt;keyword&gt;&gt;', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=bottom;dashed=1;endFill=0;labelBackgroundColor=none;spacingBottom=35;');
  878. edge1.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  879. edge1.geometry.relative = true;
  880. edge1.edge = true;
  881. cell1.insertEdge(edge1, false);
  882. var edge2 = new mxCell('&lt;&lt;keyword&gt;&gt;', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=top;dashed=1;endFill=0;labelBackgroundColor=none;spacingTop=35;');
  883. edge2.geometry.setTerminalPoint(new mxPoint(0, 80), true);
  884. edge2.geometry.relative = true;
  885. edge2.edge = true;
  886. cell1.insertEdge(edge2, false);
  887. var edge3 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=bottom;dashed=1;endFill=0;labelBackgroundColor=none;spacingBottom=35;');
  888. edge3.geometry.setTerminalPoint(new mxPoint(140, 0), false);
  889. edge3.geometry.relative = true;
  890. edge3.edge = true;
  891. cell1.insertEdge(edge3, true);
  892. var edge4 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=top;dashed=1;endFill=0;labelBackgroundColor=none;spacingTop=35;');
  893. edge4.geometry.setTerminalPoint(new mxPoint(140, 80), false);
  894. edge4.geometry.relative = true;
  895. edge4.edge = true;
  896. cell1.insertEdge(edge4, true);
  897. return sb.createEdgeTemplateFromCells([cell1, edge1, edge2, edge3, edge4], 140, 80, 'Dependency');
  898. }),
  899. this.createEdgeTemplateEntry('endArrow=block;startArrow=none;endFill=0;startFill=0;endSize=8;html=1;verticalAlign=bottom;dashed=1;labelBackgroundColor=none;', 160, 0, '', 'Realization', null, 'realization'),
  900. this.addEntry('generalization set', function()
  901. {
  902. var edge = new mxCell('GeneralizationSet1', new mxGeometry(0, 0, 0, 0), 'endArrow=block;html=1;rounded=0;align=center;verticalAlign=bottom;endFill=0;labelBackgroundColor=none;endSize=8;');
  903. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  904. edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  905. edge.geometry.relative = true;
  906. edge.edge = true;
  907. var cell1 = new mxCell(':powertype {constraint1}', new mxGeometry(0, 0, 0, 0), 'resizable=0;html=1;align=center;verticalAlign=top;labelBackgroundColor=none;');
  908. cell1.geometry.relative = true;
  909. cell1.setConnectable(false);
  910. cell1.vertex = true;
  911. edge.insert(cell1);
  912. return sb.createEdgeTemplateFromCells([edge], 160, 0, 'Generalization Set');
  913. }),
  914. this.createEdgeTemplateEntry('endArrow=none;startArrow=none;endFill=0;startFill=0;endSize=8;html=1;verticalAlign=bottom;labelBackgroundColor=none;strokeWidth=3;', 160, 0, '', 'Association / Connector / Instance Specification / Property / Connector End', null, 'association connector instance specification property connector end'),
  915. this.createEdgeTemplateEntry('endArrow=open;startArrow=none;endFill=0;startFill=0;endSize=8;html=1;verticalAlign=bottom;labelBackgroundColor=none;strokeWidth=1;', 160, 0, '', 'Association / Connector / Instance Specification / Property / Connector End / Navigability notation', null, 'association connector instance specification property connector end navigability notation'),
  916. this.addEntry('association connector instance specification property connector end', function()
  917. {
  918. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=none;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;endSize=6;startArrow=oval;startFill=1;');
  919. edge1.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  920. edge1.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  921. edge1.geometry.relative = true;
  922. edge1.edge = true;
  923. return sb.createEdgeTemplateFromCells([edge1], 160, 0, 'Association / Connector / Instance Specification / Property / Connector End');
  924. }),
  925. this.createEdgeTemplateEntry('endArrow=none;startArrow=sysMLx;endFill=0;startFill=0;html=1;verticalAlign=bottom;labelBackgroundColor=none;strokeWidth=1;startSize=8;', 160, 0, '', 'Association / Connector / Instance Specification / Property / Connector End / Non-Navigability notation', null, 'association connector instance specification property connector end non navigability notation'),
  926. this.createEdgeTemplateEntry('endArrow=none;startArrow=diamondThin;endFill=0;startFill=0;html=1;verticalAlign=bottom;labelBackgroundColor=none;strokeWidth=1;startSize=8;endSize=8;', 160, 0, '', 'Association / Connector / Instance Specification / Property / Connector End / Shared Association', null, 'association connector instance specification property connector end shared'),
  927. this.createEdgeTemplateEntry('endArrow=none;startArrow=diamondThin;endFill=0;startFill=1;html=1;verticalAlign=bottom;labelBackgroundColor=none;strokeWidth=1;startSize=8;endSize=8;', 160, 0, '', 'Association / Connector / Instance Specification / Property / Connector End / Composite Association', null, 'association connector instance specification property connector end composite'),
  928. this.addEntry('association instance specification connector', function()
  929. {
  930. var cell1 = new mxCell('', new mxGeometry(60, 0, 20, 20), 'rhombus;aspect=fixed;');
  931. cell1.vertex = true;
  932. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=none;html=1;rounded=0;align=center;verticalAlign=bottom;labelBackgroundColor=none;');
  933. edge1.geometry.setTerminalPoint(new mxPoint(0, 10), true);
  934. edge1.geometry.relative = true;
  935. edge1.edge = true;
  936. cell1.insertEdge(edge1, false);
  937. var edge2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=none;html=1;rounded=0;align=center;verticalAlign=bottom;labelBackgroundColor=none;');
  938. edge2.geometry.setTerminalPoint(new mxPoint(140, 10), false);
  939. edge2.geometry.relative = true;
  940. edge2.edge = true;
  941. cell1.insertEdge(edge2, true);
  942. return sb.createEdgeTemplateFromCells([cell1, edge1, edge2], 140, 20, 'Association / Instance Secification');
  943. }),
  944. this.addEntry('association instance specification connector', function()
  945. {
  946. var cell1 = new mxCell('', new mxGeometry(65, 0, 6, 12), 'triangle;aspect=fixed;fillColor=strokeColor;');
  947. cell1.vertex = true;
  948. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=none;html=1;rounded=0;align=center;verticalAlign=bottom;labelBackgroundColor=none;');
  949. edge1.geometry.setTerminalPoint(new mxPoint(0, 22), true);
  950. edge1.geometry.setTerminalPoint(new mxPoint(140, 22), false);
  951. edge1.geometry.relative = true;
  952. edge1.edge = true;
  953. return sb.createVertexTemplateFromCells([cell1, edge1], 140, 22, 'Association / Instance Secification');
  954. }),
  955. this.addEntry('Redefine', function()
  956. {
  957. var edge = new mxCell('{redefines}', new mxGeometry(0, 0, 0, 0), 'endArrow=none;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;');
  958. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  959. edge.geometry.setTerminalPoint(new mxPoint(200, 0), false);
  960. edge.geometry.relative = true;
  961. edge.edge = true;
  962. var cell1 = new mxCell('end1', new mxGeometry(-1, 0, 0, 0), 'resizable=0;html=1;align=left;verticalAlign=bottom;labelBackgroundColor=none;');
  963. cell1.geometry.relative = true;
  964. cell1.setConnectable(false);
  965. cell1.vertex = true;
  966. edge.insert(cell1);
  967. var cell2 = new mxCell('0..1', new mxGeometry(-1, 0, 0, 0), 'resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=none;');
  968. cell2.geometry.relative = true;
  969. cell2.setConnectable(false);
  970. cell2.vertex = true;
  971. edge.insert(cell2);
  972. var cell3 = new mxCell('Association1', new mxGeometry(1, 0, 0, 0), 'resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=none;');
  973. cell3.geometry.relative = true;
  974. cell3.setConnectable(false);
  975. cell3.vertex = true;
  976. edge.insert(cell3);
  977. var cell4 = new mxCell('{modifier1}', new mxGeometry(1, 0, 0, 0), 'resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=none;');
  978. cell4.geometry.relative = true;
  979. cell4.setConnectable(false);
  980. cell4.vertex = true;
  981. edge.insert(cell4);
  982. return sb.createEdgeTemplateFromCells([edge], 200, 0, 'Redefine');
  983. }),
  984. this.createVertexTemplateEntry('html=1;align=center;verticalAlign=middle;dashed=0;whiteSpace=wrap;', 60, 30,
  985. 'qualifier1',
  986. 'Qualifier', null, null, dt + 'qualifier'),
  987. this.addEntry('connector', function()
  988. {
  989. var edge = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=none;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;');
  990. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  991. edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  992. edge.geometry.relative = true;
  993. edge.edge = true;
  994. var cell1 = new mxCell('end1', new mxGeometry(-1, 0, 0, 0), 'resizable=0;html=1;align=left;verticalAlign=bottom;labelBackgroundColor=none;');
  995. cell1.geometry.relative = true;
  996. cell1.setConnectable(false);
  997. cell1.vertex = true;
  998. edge.insert(cell1);
  999. var cell2 = new mxCell('0..1', new mxGeometry(-1, 0, 0, 0), 'resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=none;');
  1000. cell2.geometry.relative = true;
  1001. cell2.setConnectable(false);
  1002. cell2.vertex = true;
  1003. edge.insert(cell2);
  1004. var cell3 = new mxCell('Connector1', new mxGeometry(1, 0, 0, 0), 'resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=none;');
  1005. cell3.geometry.relative = true;
  1006. cell3.setConnectable(false);
  1007. cell3.vertex = true;
  1008. edge.insert(cell3);
  1009. return sb.createEdgeTemplateFromCells([edge], 160, 0, 'Connector');
  1010. }),
  1011. this.createEdgeTemplateEntry('html=1;verticalAlign=bottom;labelBackgroundColor=none;endArrow=oval;endFill=0;endSize=8;', 160, 0, '', 'Provided Interface', null, 'provided interface'),
  1012. this.createEdgeTemplateEntry('html=1;verticalAlign=bottom;labelBackgroundColor=none;endArrow=halfCircle;endFill=0;endSize=2;', 160, 0, '', 'Required Interface', null, 'required interface'),
  1013. this.addEntry('structural feature', function()
  1014. {
  1015. var edge = new mxCell('feature1', new mxGeometry(-1, 0, 0, 0), 'html=1;verticalAlign=bottom;labelBackgroundColor=none;endArrow=none;endFill=0;endSize=6;align=left;');
  1016. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  1017. edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  1018. edge.geometry.relative = true;
  1019. edge.edge = true;
  1020. return sb.createEdgeTemplateFromCells([edge], 160, 0, 'Structural Feature');
  1021. }),
  1022. this.addEntry('usage', function()
  1023. {
  1024. var cell1 = new mxCell('', new mxGeometry(0, 0, 60, 30), 'resizable=0;html=1;align=left;verticalAlign=bottom;labelBackgroundColor=none;');
  1025. cell1.vertex = true;
  1026. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=halfCircle;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;endSize=2;');
  1027. edge1.geometry.setTerminalPoint(new mxPoint(120, 15), false);
  1028. edge1.geometry.relative = true;
  1029. edge1.edge = true;
  1030. cell1.insertEdge(edge1, true);
  1031. return sb.createEdgeTemplateFromCells([cell1, edge1], 120, 30, 'Usage');
  1032. }),
  1033. this.addEntry('collaboration', function()
  1034. {
  1035. var cell1 = new mxCell('Collaboration1', new mxGeometry(0, 0, 100, 30), 'ellipse;html=1;dashed=1;dashPattern=10 10;whiteSpace=wrap;');
  1036. cell1.vertex = true;
  1037. var cell2 = new mxCell('Classifier1', new mxGeometry(10, 70, 80, 30), 'html=1;whiteSpace=wrap;');
  1038. cell2.vertex = true;
  1039. var edge1 = new mxCell('ConnectableElement', new mxGeometry(0, 0, 0, 0), 'html=1;rounded=0;labelBackgroundColor=none;align=left;spacingLeft=5;endArrow=none;endFill=0;');
  1040. edge1.geometry.relative = true;
  1041. edge1.edge = true;
  1042. cell1.insertEdge(edge1, true);
  1043. cell2.insertEdge(edge1, false);
  1044. return sb.createEdgeTemplateFromCells([cell1, cell2, edge1], 100, 100, 'Collaboration');
  1045. }),
  1046. this.createEdgeTemplateEntry('html=1;verticalAlign=bottom;labelBackgroundColor=none;endArrow=open;endFill=0;dashed=1;', 160, 0, '&lt;&lt;occurence&gt;&gt;', 'Collaboration Use', null, 'collaboration use'),
  1047. this.addEntry('Extension', function()
  1048. {
  1049. var edge = new mxCell('{required}', new mxGeometry(-1, 0, 0, 0), 'html=1;verticalAlign=bottom;labelBackgroundColor=none;endArrow=block;endFill=1;endSize=6;align=left;');
  1050. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  1051. edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  1052. edge.geometry.relative = true;
  1053. edge.edge = true;
  1054. return sb.createEdgeTemplateFromCells([edge], 160, 0, 'Extension');
  1055. }),
  1056. this.addEntry('transition', function()
  1057. {
  1058. var edge = new mxCell('Transition1 spec.', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=bottom;endFill=0;labelBackgroundColor=none;');
  1059. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  1060. edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  1061. edge.geometry.relative = true;
  1062. edge.edge = true;
  1063. var cell1 = new mxCell('(via connectionPoint1)', new mxGeometry(0, 0, 0, 0), 'resizable=0;html=1;align=center;verticalAlign=top;labelBackgroundColor=none;');
  1064. cell1.geometry.relative = true;
  1065. cell1.setConnectable(false);
  1066. cell1.vertex = true;
  1067. edge.insert(cell1);
  1068. return sb.createEdgeTemplateFromCells([edge], 160, 0, 'Transition');
  1069. }),
  1070. this.addEntry('activity', function()
  1071. {
  1072. var edge = new mxCell('{annotation1}', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;');
  1073. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  1074. edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  1075. edge.geometry.relative = true;
  1076. edge.edge = true;
  1077. var cell1 = new mxCell('Edge1', new mxGeometry(-1, 0, 0, 0), 'resizable=0;html=1;align=left;verticalAlign=bottom;labelBackgroundColor=none;');
  1078. cell1.geometry.relative = true;
  1079. cell1.setConnectable(false);
  1080. cell1.vertex = true;
  1081. edge.insert(cell1);
  1082. var cell2 = new mxCell('[guard]', new mxGeometry(1, 0, 0, 0), 'resizable=0;html=1;align=right;verticalAlign=bottom;labelBackgroundColor=none;');
  1083. cell2.geometry.relative = true;
  1084. cell2.setConnectable(false);
  1085. cell2.vertex = true;
  1086. edge.insert(cell2);
  1087. return sb.createEdgeTemplateFromCells([edge], 160, 0, 'Activity');
  1088. }),
  1089. this.createEdgeTemplateEntry('html=1;verticalAlign=top;labelBackgroundColor=none;endArrow=open;endFill=0;', 160, 0, '&lt;&lt;multicast/multireceive&gt;&gt;', 'Control Flow', null, 'control flow'),
  1090. this.addEntry('action', function()
  1091. {
  1092. var cell1 = new mxCell('Action1', new mxGeometry(0, 5, 100, 30), 'html=1;rounded=1;absoluteArcSize=1;arcSize=10;whiteSpace=wrap;');
  1093. cell1.vertex = true;
  1094. var cell2 = new mxCell('Action2', new mxGeometry(180, 5, 100, 30), 'html=1;rounded=1;absoluteArcSize=1;arcSize=10;whiteSpace=wrap;');
  1095. cell2.vertex = true;
  1096. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'html=1;rounded=0;labelBackgroundColor=none;align=left;spacingLeft=5;endArrow=open;endFill=0;');
  1097. edge1.geometry.relative = true;
  1098. edge1.edge = true;
  1099. cell1.insertEdge(edge1, true);
  1100. cell2.insertEdge(edge1, false);
  1101. var cell3 = new mxCell('', new mxGeometry(132, 0, 16, 16), 'html=1;');
  1102. cell3.vertex = true;
  1103. return sb.createEdgeTemplateFromCells([cell1, cell2, cell3, edge1], 300, 35, 'Action');
  1104. }),
  1105. this.addEntry('object node', function()
  1106. {
  1107. var cell1 = new mxCell('ObjectNode1', new mxGeometry(40, 0, 80, 30), 'html=1;whiteSpace=wrap;');
  1108. cell1.vertex = true;
  1109. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=block;html=1;rounded=0;align=center;verticalAlign=top;endFill=1;labelBackgroundColor=none;endSize=6;');
  1110. edge1.geometry.setTerminalPoint(new mxPoint(0, 15), true);
  1111. edge1.geometry.relative = true;
  1112. edge1.edge = true;
  1113. cell1.insertEdge(edge1, false);
  1114. return sb.createEdgeTemplateFromCells([cell1, edge1], 120, 30, 'Object Node');
  1115. }),
  1116. this.addEntry('activity', function()
  1117. {
  1118. var cell1 = new mxCell('', new mxGeometry(40, 0, 30, 30), 'ellipse;html=1;');
  1119. cell1.vertex = true;
  1120. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;endSize=6;');
  1121. edge1.geometry.setTerminalPoint(new mxPoint(0, 15), true);
  1122. edge1.geometry.relative = true;
  1123. edge1.edge = true;
  1124. cell1.insertEdge(edge1, false);
  1125. return sb.createEdgeTemplateFromCells([cell1, edge1], 70, 30, 'Activity');
  1126. }),
  1127. this.addEntry('activity', function()
  1128. {
  1129. var cell1 = new mxCell('', new mxGeometry(0, 0, 30, 30), 'ellipse;html=1;');
  1130. cell1.vertex = true;
  1131. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;endSize=6;');
  1132. edge1.geometry.setTerminalPoint(new mxPoint(70, 15), false);
  1133. edge1.geometry.relative = true;
  1134. edge1.edge = true;
  1135. cell1.insertEdge(edge1, true);
  1136. return sb.createEdgeTemplateFromCells([cell1, edge1], 70, 30, 'Activity');
  1137. }),
  1138. this.createEdgeTemplateEntry('shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;', 160, 0, '', 'Activity', null, 'activity'),
  1139. this.addEntry('activity', function()
  1140. {
  1141. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;endSize=6;');
  1142. edge1.geometry.setTerminalPoint(new mxPoint(0, 40), true);
  1143. edge1.geometry.setTerminalPoint(new mxPoint(160, 40), false);
  1144. edge1.geometry.relative = true;
  1145. edge1.edge = true;
  1146. var edge2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;');
  1147. edge2.geometry.setTerminalPoint(new mxPoint(60, 0), true);
  1148. edge2.geometry.setTerminalPoint(new mxPoint(100, 20), false);
  1149. edge2.geometry.relative = true;
  1150. edge2.edge = true;
  1151. return sb.createEdgeTemplateFromCells([edge1, edge2], 70, 30, 'Activity');
  1152. }),
  1153. this.createEdgeTemplateEntry('html=1;verticalAlign=bottom;labelBackgroundColor=none;endArrow=open;endFill=0;', 160, 0, 'Message1 label', 'Message', null, 'message async asynchronous signal call'),
  1154. this.createEdgeTemplateEntry('html=1;verticalAlign=bottom;labelBackgroundColor=none;endArrow=block;endFill=1;', 160, 0, '', 'Message, synchronous call', null, 'message sync synchronous call'),
  1155. this.createEdgeTemplateEntry('html=1;verticalAlign=bottom;labelBackgroundColor=none;endArrow=block;endFill=1;dashed=1;', 160, 0, '', 'Message, reply', null, 'message reply'),
  1156. this.createEdgeTemplateEntry('html=1;verticalAlign=bottom;labelBackgroundColor=none;endArrow=open;endFill=0;dashed=1;', 160, 0, '', 'Message, create', null, 'message create'),
  1157. this.addEntry('message lost', function()
  1158. {
  1159. var cell1 = new mxCell('', new mxGeometry(160, 0, 4, 4), 'ellipse;html=1;fillColor=strokeColor;');
  1160. cell1.vertex = true;
  1161. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;endSize=6;');
  1162. edge1.geometry.setTerminalPoint(new mxPoint(0, 2), true);
  1163. edge1.geometry.relative = true;
  1164. edge1.edge = true;
  1165. cell1.insertEdge(edge1, false);
  1166. return sb.createEdgeTemplateFromCells([cell1, edge1], 164, 4, 'Message lost');
  1167. }),
  1168. this.addEntry('message found', function()
  1169. {
  1170. var cell1 = new mxCell('', new mxGeometry(0, 0, 4, 4), 'ellipse;html=1;fillColor=strokeColor;');
  1171. cell1.vertex = true;
  1172. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;endSize=6;');
  1173. edge1.geometry.setTerminalPoint(new mxPoint(164, 2), false);
  1174. edge1.geometry.relative = true;
  1175. edge1.edge = true;
  1176. cell1.insertEdge(edge1, true);
  1177. return sb.createEdgeTemplateFromCells([cell1, edge1], 164, 4, 'Message found');
  1178. }),
  1179. this.addEntry(dt + 'lifeline execution', function()
  1180. {
  1181. var cell1 = new mxCell('', new mxGeometry(0, 0, 160, 160),
  1182. 'rounded=0;dashed=0;container=0;collapsible=0;recursiveResize=0;');
  1183. cell1.vertex = true;
  1184. var cell2 = new mxCell('LifeLine1', new mxGeometry(30, 10, 100, 30),
  1185. 'rounded=0;dashed=0;whiteSpace=wrap;html=1;');
  1186. cell2.vertex = true;
  1187. cell1.insert(cell2);
  1188. var cell3 = new mxCell('', new mxGeometry(75, 60, 10, 60),
  1189. 'rounded=0;dashed=0;');
  1190. cell3.vertex = true;
  1191. cell1.insert(cell3);
  1192. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'html=1;verticalAlign=bottom;startArrow=none;endArrow=none;dashed=1;');
  1193. edge1.geometry.relative = true;
  1194. edge1.edge = true;
  1195. cell2.insertEdge(edge1, false);
  1196. cell3.insertEdge(edge1, true);
  1197. var edge2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'html=1;verticalAlign=bottom;startArrow=none;endArrow=none;dashed=1;');
  1198. edge2.geometry.setTerminalPoint(new mxPoint(80, 150), true);
  1199. edge2.geometry.relative = true;
  1200. edge2.edge = true;
  1201. cell3.insertEdge(edge2, false);
  1202. var edge3 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'html=1;verticalAlign=bottom;startArrow=none;endArrow=open;endFill=0;');
  1203. edge3.geometry.setTerminalPoint(new mxPoint(0, 60), true);
  1204. edge3.geometry.setTerminalPoint(new mxPoint(75, 60), false);
  1205. edge3.geometry.relative = true;
  1206. edge3.edge = true;
  1207. cell1.insert(edge1);
  1208. cell1.insert(edge2);
  1209. cell1.insert(edge3);
  1210. return sb.createVertexTemplateFromCells([cell1], 160, 160, 'Lifeline');
  1211. }),
  1212. this.addEntry('message', function()
  1213. {
  1214. var cell1 = new mxCell('Message1', new mxGeometry(40, 0, 80, 30), 'html=1;rounded=1;absoluteArcSize=1;arcSize=10;whiteSpace=wrap;');
  1215. cell1.vertex = true;
  1216. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;endSize=6;');
  1217. edge1.geometry.setTerminalPoint(new mxPoint(0, 15), true);
  1218. edge1.geometry.relative = true;
  1219. edge1.edge = true;
  1220. cell1.insertEdge(edge1, false);
  1221. return sb.createEdgeTemplateFromCells([cell1, edge1], 120, 30, 'Message');
  1222. }),
  1223. this.addEntry('message', function()
  1224. {
  1225. var cell1 = new mxCell('Message1', new mxGeometry(0, 0, 80, 30), 'html=1;rounded=1;absoluteArcSize=1;arcSize=10;whiteSpace=wrap;');
  1226. cell1.vertex = true;
  1227. var edge1 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=open;html=1;rounded=0;align=center;verticalAlign=top;endFill=0;labelBackgroundColor=none;endSize=6;');
  1228. edge1.geometry.setTerminalPoint(new mxPoint(120, 15), false);
  1229. edge1.geometry.relative = true;
  1230. edge1.edge = true;
  1231. cell1.insertEdge(edge1, true);
  1232. return sb.createEdgeTemplateFromCells([cell1, edge1], 120, 30, 'Message');
  1233. }),
  1234. this.createEdgeTemplateEntry('html=1;verticalAlign=bottom;labelBackgroundColor=none;endArrow=open;endFill=0;dashed=1;', 160, 0, '&lt;&lt;extend&gt;&gt;', 'Extend', null, 'extend'),
  1235. this.createEdgeTemplateEntry('html=1;verticalAlign=bottom;labelBackgroundColor=none;endArrow=open;endFill=0;dashed=1;', 160, 0, '&lt;&lt;include&gt;&gt;', 'Include', null, 'include'),
  1236. this.createEdgeTemplateEntry('html=1;verticalAlign=bottom;labelBackgroundColor=none;endArrow=open;endFill=0;dashed=1;', 160, 0, '&lt;&lt;deploy&gt;&gt;', 'Deploy', null, 'deploy')
  1237. ];
  1238. this.addPalette('uml25', mxResources.get('uml') + ' 2.5', false, mxUtils.bind(this, function(content)
  1239. {
  1240. for (var i = 0; i < fns.length; i++)
  1241. {
  1242. content.appendChild(fns[i](content));
  1243. }
  1244. }));
  1245. this.setCurrentSearchEntryLibrary();
  1246. };
  1247. })();