1/**2 * Copyright (c) 2006-2016, JGraph Holdings Ltd3 */45//**********************************************************************************************************************************************************6//Application7//**********************************************************************************************************************************************************8/**9* Extends mxShape.10*/11function mxArchiMate3Application(bounds, fill, stroke, strokewidth)12{13 mxShape.call(this);14 this.bounds = bounds;15 this.fill = fill;16 this.stroke = stroke;17 this.strokewidth = (strokewidth != null) ? strokewidth : 1;18};1920/**21* Extends mxShape.22*/23mxUtils.extend(mxArchiMate3Application, mxShape);2425mxArchiMate3Application.prototype.cst = {26 APPLICATION : 'mxgraph.archimate3.application',27 TYPE : 'appType',28 COMPONENT : 'comp',29 COLLABORATION : 'collab',30 CONTRACT : 'contract',31 INTERFACE : 'interface',32 INTERFACE2 : 'interface2',33 LOCATION : 'location',34 FACILITY : 'facility',35 FUNCTION : 'func',36 GAP : 'gap',37 INTERACTION : 'interaction',38 SERVICE : 'serv',39 EQUIPMENT : 'equipment',40 EVENT : 'event',41 EVENT2 : 'event2',42 NODE : 'node',43 GENERIC : 'generic',44 NETWORK : 'netw',45 COMM_PATH : 'commPath',46 ACTOR : 'actor',47 ASSESSMENT : 'assess',48 GOAL : 'goal',49 GROUPING : 'grouping',50 OUTCOME : 'outcome',51 ROLE : 'role',52 PASSIVE : 'passive',53 PLATEAU : 'plateau',54 PROCESS : 'proc',55 PRODUCT : 'product',56 DRIVER : 'driver',57 DELIVERABLE : 'deliverable',58 DEVICE : 'device',59 PRINCIPLE : 'principle',60 REQUIREMENT : 'requirement',61 REPRESENTATION : 'representation',62 CONSTRAINT : 'constraint',63 RESOURCE : 'resource',64 CAPABILITY : 'capability',65 COURSE : 'course',66 MATERIAL : 'material',67 MEANING : 'meaning',68 DISTRIBUTION : 'distribution',69 SYS_SW : 'sysSw',70 ARTIFACT : 'artifact',71 PATH : 'path',72 ARCHI_TYPE : 'archiType',73 TYPE_SQUARE : 'square',74 TYPE_ROUNDED : 'rounded',75 TYPE_OCT : 'oct',76 AMVALUE : 'amValue',77 VALUE_STREAM : 'valueStream',78 WORK_PACKAGE : 'workPackage'79};8081mxArchiMate3Application.prototype.customProperties = [82 {name: 'archiType', dispName: 'Type', type: 'enum', 83 enumList: [{val: 'square', dispName: 'Square'}, 84 {val: 'rounded', dispName: 'Rounded'}, 85 {val: 'oct', dispName: 'Octagonal'}]86 },87 {name: 'appType', dispName: 'App Type', type: 'enum', 88 enumList: [{val: 'generic', dispName: 'Generic'},89 {val: 'comp', dispName: 'Component'}, 90 {val: 'collab', dispName: 'Collaboration'}, 91 {val: 'contract', dispName: 'Contract'}, 92 {val: 'interface', dispName: 'Interface'}, 93 {val: 'interface2', dispName: 'Interface2'}, 94 {val: 'facility', dispName: 'Facility'}, 95 {val: 'func', dispName: 'Function'}, 96 {val: 'gap', dispName: 'Gap'}, 97 {val: 'interaction', dispName: 'Interaction'}, 98 {val: 'location', dispName: 'Location'}, 99 {val: 'serv', dispName: 'Service'}, 100 {val: 'equipment', dispName: 'Equipment'}, 101 {val: 'event', dispName: 'Event'}, 102 {val: 'event2', dispName: 'Event2'}, 103 {val: 'node', dispName: 'Node'}, 104 {val: 'netw', dispName: 'Network'}, 105 {val: 'commPath', dispName: 'Comm Path'}, 106 {val: 'actor', dispName: 'Actor'}, 107 {val: 'assess', dispName: 'Assessment'}, 108 {val: 'goal', dispName: 'Goal'}, 109 {val: 'grouping', dispName: 'Grouping'}, 110 {val: 'outcome', dispName: 'Outcome'}, 111 {val: 'role', dispName: 'Stakeholder'}, 112 {val: 'passive', dispName: 'Passive'}, 113 {val: 'plateau', dispName: 'Plateau'}, 114 {val: 'proc', dispName: 'Process'}, 115 {val: 'product', dispName: 'Product'}, 116 {val: 'deliverable', dispName: 'Deliverable'}, 117 {val: 'device', dispName: 'Device'}, 118 {val: 'driver', dispName: 'Driver'}, 119 {val: 'principle', dispName: 'Principle'}, 120 {val: 'requirement', dispName: 'Requirement'}, 121 {val: 'representation', dispName: 'Representation'}, 122 {val: 'constraint', dispName: 'Constraint'}, 123 {val: 'resource', dispName: 'Resource'}, 124 {val: 'capability', dispName: 'Capability'}, 125 {val: 'course', dispName: 'Course'}, 126 {val: 'material', dispName: 'Material'}, 127 {val: 'meaning', dispName: 'Meaning'}, 128 {val: 'distribution', dispName: 'Distribution'}, 129 {val: 'sysSw', dispName: 'System Sw'}, 130 {val: 'artifact', dispName: 'Artifact'}, 131 {val: 'path', dispName: 'Path'},132 {val: 'amValue', dispName: 'Value'},133 {val: 'valueStream', dispName: 'Value Stream'},134 {val: 'workPackage', dispName: 'Work Package'}]135}];136137/**138* Function: paintVertexShape139* 140* Paints the vertex shape.141*/142mxArchiMate3Application.prototype.paintVertexShape = function(c, x, y, w, h)143{144 c.translate(x, y);145 this.background(c, 0, 0, w, h);146 c.setShadow(false);147 c.translate(w - 20, 5);148 this.foreground(c, w - 20, 5, 15, 15);149};150151mxArchiMate3Application.prototype.background = function(c, x, y, w, h)152{153 var archiType = mxUtils.getValue(this.style, mxArchiMate3Application.prototype.cst.ARCHI_TYPE, 'square');154155 if (archiType === 'rounded')156 {157 c.roundrect(0, 0, w, h, 10, 10);158 }159 else if ((archiType === 'oct') && w >= 20 && h >= 20)160 {161 c.begin();162 c.moveTo(0, 10);163 c.lineTo(10, 0);164 c.lineTo(w - 10, 0);165 c.lineTo(w, 10);166 c.lineTo(w, h - 10);167 c.lineTo(w - 10, h);168 c.lineTo(10, h);169 c.lineTo(0, h - 10);170 c.close();171 c.fillAndStroke();172 }173 else174 {175 c.rect(0, 0, w, h);176 }177178 c.fillAndStroke();179};180181mxArchiMate3Application.prototype.foreground = function(c, x, y, w, h)182{183 var type = mxUtils.getValue(this.style, mxArchiMate3Application.prototype.cst.TYPE, '');184 185 c.setDashed(false);186 187 if (type === mxArchiMate3Application.prototype.cst.COMPONENT)188 {189 c.translate(1, 0);190 w = w - 2;191192 mxArchiMate3Component.prototype.background(c, x, y, w, h);193 }194 else if (type === mxArchiMate3Application.prototype.cst.COLLABORATION)195 {196 c.translate(0, 3);197 h = h - 6;198 199 mxArchiMate3Collaboration.prototype.background(c, x, y, w, h);200 }201 else if (type === mxArchiMate3Application.prototype.cst.INTERFACE)202 {203 c.translate(0, 4);204 h = h - 8;205 206 mxArchiMate3Interface.prototype.background(c, x, y, w, h);207 }208 else if (type === mxArchiMate3Application.prototype.cst.INTERFACE2)209 {210 c.translate(0, 1);211 h = h - 2;212 213 c.begin();214 c.moveTo(0, h * 0.5);215 c.lineTo(w * 0.6, h * 0.5);216 c.moveTo(w, 0);217 c.arcTo(w * 0.4, h * 0.5, 0, 0, 0, w, h);218 c.stroke();219 }220 else if (type === mxArchiMate3Application.prototype.cst.FACILITY)221 {222 mxArchiMate3Facility.prototype.background(c, x, y, w, h);223 }224 else if (type === mxArchiMate3Application.prototype.cst.FUNCTION)225 {226 mxArchiMate3Function.prototype.background(c, x, y, w, h);227 }228 else if (type === mxArchiMate3Application.prototype.cst.GAP)229 {230 mxArchiMate3GapIcon.prototype.background(c, x, y, w, h);231 }232 else if (type === mxArchiMate3Application.prototype.cst.INTERACTION)233 {234 mxArchiMate3Interaction.prototype.background(c, x, y, w, h);235 }236 else if (type === mxArchiMate3Application.prototype.cst.LOCATION)237 {238 mxArchiMate3LocationIcon.prototype.background(c, x, y, w, h);239 }240 else if (type === mxArchiMate3Application.prototype.cst.SERVICE)241 {242 c.translate(0, 3);243 h = h - 6;244 245 mxArchiMate3Service.prototype.background(c, x, y, w, h);246 }247 else if (type === mxArchiMate3Application.prototype.cst.EQUIPMENT)248 {249 mxArchiMate3Equipment.prototype.background(c, x, y, w, h);250 }251 else if (type === mxArchiMate3Application.prototype.cst.EVENT)252 {253 c.translate(0, 3);254 h = h - 6;255 256 mxArchiMate3Event.prototype.background(c, x, y, w, h);257 }258 else if (type === mxArchiMate3Application.prototype.cst.EVENT2)259 {260 c.translate(0, 3);261 h = h - 6;262 263 mxArchiMate3Event2.prototype.background(c, x, y, w, h);264 }265 else if (type === mxArchiMate3Application.prototype.cst.NODE)266 {267 mxArchiMate3Node.prototype.background(c, x, y, w, h);268 }269 else if (type === mxArchiMate3Application.prototype.cst.GENERIC)270 {271 }272 else if (type === mxArchiMate3Application.prototype.cst.NETWORK)273 {274 mxArchiMate3Network.prototype.background(c, x, y, w, h);275 }276 else if (type === mxArchiMate3Application.prototype.cst.COMM_PATH)277 {278 c.translate(0, 5);279 h = h - 10;280 281 c.begin();282 c.moveTo(w * 0.1, 0);283 c.lineTo(0, h * 0.5);284 c.lineTo(w * 0.1, h);285 c.moveTo(w * 0.9, 0);286 c.lineTo(w, h * 0.5);287 c.lineTo(w * 0.9, h);288 c.stroke();289 290 c.setDashed(true);291 c.begin();292 c.moveTo(0, h * 0.5);293 c.lineTo(w, h * 0.5);294 c.stroke();295 }296 else if (type === mxArchiMate3Application.prototype.cst.ARTIFACT)297 {298 c.translate(2, 0);299 w = w - 4;300301 c.begin();302 c.moveTo(0, 0);303 c.lineTo(w * 0.7, 0);304 c.lineTo(w, h * 0.22);305 c.lineTo(w, h);306 c.lineTo(0, h);307 c.close();308 c.moveTo(w * 0.7, 0);309 c.lineTo(w * 0.7, h * 0.22);310 c.lineTo(w, h * 0.22);311 c.stroke();312 }313 else if (type === mxArchiMate3Application.prototype.cst.ACTOR)314 {315 c.translate(3, 0);316 w = w - 6;317 318 mxArchiMate3Actor.prototype.background(c, x, y, w, h);319 }320 else if (type === mxArchiMate3Application.prototype.cst.ROLE)321 {322 c.translate(0, 3);323 h = h - 6;324325 mxArchiMate3Role.prototype.background(c, x, y, w, h);326 }327 else if (type === mxArchiMate3Application.prototype.cst.PASSIVE)328 {329 c.translate(0, 3);330 h = h - 6;331332 mxArchiMate3Passive.prototype.background(c, x, y, w, h);333 }334 else if (type === mxArchiMate3Application.prototype.cst.PLATEAU)335 {336 c.translate(0, 2);337 h = h - 4;338339 mxArchiMate3Plateau.prototype.background(c, x, y, w, h);340 }341 else if (type === mxArchiMate3Application.prototype.cst.PRODUCT)342 {343 c.translate(0, 3);344 h = h - 6;345346 mxArchiMate3ProductSmall.prototype.background(c, x, y, w, h);347 }348 else if (type === mxArchiMate3Application.prototype.cst.CONTRACT)349 {350 c.translate(0, 3);351 h = h - 6;352353 mxArchiMate3ContractSmall.prototype.background(c, x, y, w, h);354 }355 else if (type === mxArchiMate3Application.prototype.cst.PROCESS)356 {357 c.translate(0, 3);358 h = h - 6;359360 mxArchiMate3Process.prototype.background(c, x, y, w, h);361 }362 else if (type === mxArchiMate3Application.prototype.cst.DELIVERABLE)363 {364 c.translate(0, 2);365 h = h - 4;366367 mxArchiMate3Deliverable.prototype.background(c, x, y, w, h);368 }369 else if (type === mxArchiMate3Application.prototype.cst.DEVICE)370 {371 mxArchiMate3Device.prototype.background(c, x, y, w, h);372 }373 else if (type === mxArchiMate3Application.prototype.cst.DRIVER)374 {375 mxArchiMate3Driver.prototype.background(c, x, y, w, h);376 }377 else if (type === mxArchiMate3Application.prototype.cst.ASSESSMENT)378 {379 mxArchiMate3Assessment.prototype.background(c, x, y, w, h);380 }381 else if (type === mxArchiMate3Application.prototype.cst.GOAL)382 {383 mxArchiMate3Goal.prototype.background(c, x, y, w, h);384 }385 else if (type === mxArchiMate3Application.prototype.cst.GROUPING)386 {387 c.translate(0, 2);388 h = h - 4;389 c.setDashed(true);390391 mxArchiMate3Grouping.prototype.background(c, x, y, w, h);392 }393 else if (type === mxArchiMate3Application.prototype.cst.OUTCOME)394 {395 mxArchiMate3Outcome.prototype.background(c, x, y, w, h);396 }397 else if (type === mxArchiMate3Application.prototype.cst.PRINCIPLE)398 {399 mxArchiMate3Principle.prototype.background(c, x, y, w, h);400 }401 else if (type === mxArchiMate3Application.prototype.cst.REPRESENTATION)402 {403 c.translate(0, 3);404 h = h - 6;405406 mxArchiMate3RepresentationSmall.prototype.background(c, x, y, w, h);407 }408 else if (type === mxArchiMate3Application.prototype.cst.REQUIREMENT)409 {410 c.translate(0, 4);411 h = h - 8;412413 mxArchiMate3Requirement.prototype.background(c, x, y, w, h);414 }415 else if (type === mxArchiMate3Application.prototype.cst.CONSTRAINT)416 {417 c.translate(0, 4);418 h = h - 8;419420 mxArchiMate3Constraint.prototype.background(c, x, y, w, h);421 }422 else if (type === mxArchiMate3Application.prototype.cst.MATERIAL)423 {424 c.translate(0, 1);425 h = h - 2;426 427 mxArchiMate3Material.prototype.background(c, x, y, w, h);428 }429 else if (type === mxArchiMate3Application.prototype.cst.MEANING)430 {431 c.translate(0, 2);432 h = h - 4;433434 var frame = mxStencilRegistry.getStencil('mxgraph.basic.cloud_callout');435 436 frame.drawShape(c, this, 0, 0, w, h);437 }438 else if (type === mxArchiMate3Application.prototype.cst.DISTRIBUTION)439 {440 c.translate(0, 4);441 h = h - 8;442 443 mxArchiMate3Distribution.prototype.background(c, x, y, w, h);444 }445 else if (type === mxArchiMate3Application.prototype.cst.RESOURCE)446 {447 c.translate(0, 1);448 h = h - 2;449 450 mxArchiMate3Resource.prototype.background(c, x, y, w, h);451 }452 else if (type === mxArchiMate3Application.prototype.cst.CAPABILITY)453 {454 mxArchiMate3Capability.prototype.background(c, x, y, w, h);455 }456 else if (type === mxArchiMate3Application.prototype.cst.COURSE)457 {458 mxArchiMate3Course.prototype.background(c, x, y, w, h);459 }460 else if (type === mxArchiMate3Application.prototype.cst.SYS_SW)461 {462 mxArchiMate3SysSw.prototype.background(c, x, y, w, h);463 }464 else if (type === mxArchiMate3Application.prototype.cst.ARTIFACT)465 {466 c.translate(2, 0);467 w = w - 4;468 469 mxArchiMate3Artifact.prototype.background(c, x, y, w, h);470 }471 else if (type === mxArchiMate3Application.prototype.cst.PATH)472 {473 c.translate(0, 5);474 h = h - 10;475 476 mxArchiMate3Path.prototype.background(c, x, y, w, h);477 }478 else if (type === mxArchiMate3Application.prototype.cst.AMVALUE)479 {480 c.translate(0, 3);481 h = h - 6;482483 mxEllipse.prototype.paintVertexShape(c, 0, 0, w, h);484 }485 else if (type === mxArchiMate3Application.prototype.cst.VALUE_STREAM)486 {487 c.translate(0, 2);488 h = h - 4;489490 mxArchiMate3ValueStream.prototype.background(c, x, y, w, h);491 }492 else if (type === mxArchiMate3Application.prototype.cst.WORK_PACKAGE)493 {494 c.translate(0, 1);495 h = h - 2;496497 mxArchiMate3WorkPackage.prototype.background(c, x, y, w, h);498 }499};500501mxCellRenderer.registerShape(mxArchiMate3Application.prototype.cst.APPLICATION, mxArchiMate3Application);502503mxArchiMate3Application.prototype.getConstraints = function(style, w, h)504{505 var constr = [];506 var archiType = mxUtils.getValue(this.style, mxArchiMate3Application.prototype.cst.ARCHI_TYPE, 'square');507508 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));509 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));510 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));511 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.25), false));512 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));513 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.75), false));514 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));515 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));516 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));517 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.75), false));518 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));519 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.25), false));520521 if (archiType === 'rounded')522 {523 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 2.9, 2.9));524 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false, null, -2.9, 2.9));525 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false, null, -2.9, -2.9));526 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false, null, 2.9, -2.9));527 }528 else if ((archiType === 'oct') && w >= 20 && h >= 20)529 {530 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 5, 5));531 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false, null, -5, 5));532 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false, null, -5, -5));533 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false, null, 5, -5));534 }535 else536 {537 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));538 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));539 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));540 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));541 }542543 return (constr);544};545546//**********************************************************************************************************************************************************547//Component548//**********************************************************************************************************************************************************549/**550* Extends mxShape.551*/552function mxArchiMate3Component(bounds, fill, stroke, strokewidth)553{554 mxShape.call(this);555 this.bounds = bounds;556 this.fill = fill;557 this.stroke = stroke;558 this.strokewidth = (strokewidth != null) ? strokewidth : 1;559};560561/**562* Extends mxShape.563*/564mxUtils.extend(mxArchiMate3Component, mxShape);565566mxArchiMate3Component.prototype.cst = {567 COMPONENT : 'mxgraph.archimate3.component'568};569570/**571* Function: paintVertexShape572* 573* Paints the vertex shape.574*/575mxArchiMate3Component.prototype.paintVertexShape = function(c, x, y, w, h)576{577 c.translate(x, y);578 this.background(c, 0, 0, w, h);579 c.setShadow(false);580};581582mxArchiMate3Component.prototype.background = function(c, x, y, w, h)583{584 c.rect(w * 0.25, 0, w * 0.75, h);585 c.fillAndStroke();586 587 c.rect(0, h * 0.25, w * 0.5, h * 0.15);588 c.fillAndStroke();589 590 c.rect(0, h * 0.6, w * 0.5, h * 0.15);591 c.fillAndStroke();592};593594mxCellRenderer.registerShape(mxArchiMate3Component.prototype.cst.COMPONENT, mxArchiMate3Component);595596mxArchiMate3Component.prototype.getConstraints = function(style, w, h)597{598 var constr = [];599600 constr.push(new mxConnectionConstraint(new mxPoint(0.625, 0), false));601 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));602 constr.push(new mxConnectionConstraint(new mxPoint(0.625, 1), false));603 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.325), false));604 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.675), false));605 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));606 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));607 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));608 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));609610 return (constr);611};612613//**********************************************************************************************************************************************************614//Collaboration615//**********************************************************************************************************************************************************616/**617* Extends mxShape.618*/619function mxArchiMate3Collaboration(bounds, fill, stroke, strokewidth)620{621 mxShape.call(this);622 this.bounds = bounds;623 this.fill = fill;624 this.stroke = stroke;625 this.strokewidth = (strokewidth != null) ? strokewidth : 1;626};627628/**629* Extends mxShape.630*/631mxUtils.extend(mxArchiMate3Collaboration, mxShape);632633mxArchiMate3Collaboration.prototype.cst = {634 COLLABORATION : 'mxgraph.archimate3.collaboration'635};636637/**638* Function: paintVertexShape639* 640* Paints the vertex shape.641*/642mxArchiMate3Collaboration.prototype.paintVertexShape = function(c, x, y, w, h)643{644 c.translate(x, y);645 this.background(c, 0, 0, w, h);646 c.setShadow(false);647};648649mxArchiMate3Collaboration.prototype.background = function(c, x, y, w, h)650{651 c.ellipse(0, 0, w * 0.6, h);652 c.fillAndStroke();653 c.ellipse(w * 0.4, 0, w * 0.6, h);654 c.fillAndStroke();655};656657mxCellRenderer.registerShape(mxArchiMate3Collaboration.prototype.cst.COLLABORATION, mxArchiMate3Collaboration);658659mxArchiMate3Collaboration.prototype.getConstraints = function(style, w, h)660{661 var constr = [];662663 constr.push(new mxConnectionConstraint(new mxPoint(0.11, 0.11), false));664 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0.125), false));665 constr.push(new mxConnectionConstraint(new mxPoint(0.89, 0.11), false));666 constr.push(new mxConnectionConstraint(new mxPoint(0.11, 0.89), false));667 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0.875), false));668 constr.push(new mxConnectionConstraint(new mxPoint(0.89, 0.89), false));669 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0), false));670 constr.push(new mxConnectionConstraint(new mxPoint(0.7, 0), false));671 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 1), false));672 constr.push(new mxConnectionConstraint(new mxPoint(0.7, 1), false));673 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));674 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));675676 return (constr);677};678679//**********************************************************************************************************************************************************680//Interface681//**********************************************************************************************************************************************************682/**683* Extends mxShape.684*/685function mxArchiMate3Interface(bounds, fill, stroke, strokewidth)686{687 mxShape.call(this);688 this.bounds = bounds;689 this.fill = fill;690 this.stroke = stroke;691 this.strokewidth = (strokewidth != null) ? strokewidth : 1;692};693694/**695* Extends mxShape.696*/697mxUtils.extend(mxArchiMate3Interface, mxShape);698699mxArchiMate3Interface.prototype.cst = {700 INTERFACE : 'mxgraph.archimate3.interface'701};702703/**704* Function: paintVertexShape705* 706* Paints the vertex shape.707*/708mxArchiMate3Interface.prototype.paintVertexShape = function(c, x, y, w, h)709{710 c.translate(x, y);711 this.background(c, 0, 0, w, h);712 c.setShadow(false);713};714715mxArchiMate3Interface.prototype.background = function(c, x, y, w, h)716{717 c.ellipse(w * 0.5, 0, w * 0.5, h);718 c.fillAndStroke();719 720 c.begin();721 c.moveTo(0, h * 0.5);722 c.lineTo(w * 0.5, h * 0.5);723 c.stroke();724};725726mxCellRenderer.registerShape(mxArchiMate3Interface.prototype.cst.INTERFACE, mxArchiMate3Interface);727728mxArchiMate3Interface.prototype.getConstraints = function(style, w, h)729{730 var constr = [];731732 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));733 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));734 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));735 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));736737 return (constr);738};739740//**********************************************************************************************************************************************************741//Contract Small742//**********************************************************************************************************************************************************743/**744* Extends mxShape.745*/746function mxArchiMate3ContractSmall(bounds, fill, stroke, strokewidth)747{748 mxShape.call(this);749 this.bounds = bounds;750 this.fill = fill;751 this.stroke = stroke;752 this.strokewidth = (strokewidth != null) ? strokewidth : 1;753};754755/**756* Extends mxShape.757*/758mxUtils.extend(mxArchiMate3ContractSmall, mxShape);759760mxArchiMate3ContractSmall.prototype.cst = {761 CONTRACT_SMALL : 'mxgraph.archimate3.contractSmall'762};763764/**765* Function: paintVertexShape766* 767* Paints the vertex shape.768*/769mxArchiMate3ContractSmall.prototype.paintVertexShape = function(c, x, y, w, h)770{771 c.translate(x, y);772 this.background(c, 0, 0, w, h);773 c.setShadow(false);774};775776mxArchiMate3ContractSmall.prototype.background = function(c, x, y, w, h)777{778 c.begin();779 c.moveTo(0, 0);780 c.lineTo(w, 0);781 c.lineTo(w, h);782 c.lineTo(0, h);783 c.close();784 c.moveTo(0, h * 0.2);785 c.lineTo(w, h * 0.2);786 c.moveTo(0, h * 0.8);787 c.lineTo(w, h * 0.8);788 c.fillAndStroke();789};790791mxCellRenderer.registerShape(mxArchiMate3ContractSmall.prototype.cst.CONTRACT_SMALL, mxArchiMate3ContractSmall);792793mxArchiMate3ContractSmall.prototype.getConstraints = function(style, w, h)794{795 var constr = [];796 797 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.3), false));798 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.3), false));799 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.3), false));800 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0), false));801 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));802 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 1), false));803 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.7), false));804 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.7), false));805 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.7), false));806 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));807808 return (constr);809};810811//**********************************************************************************************************************************************************812//Representation Small813//**********************************************************************************************************************************************************814/**815* Extends mxShape.816*/817function mxArchiMate3RepresentationSmall(bounds, fill, stroke, strokewidth)818{819 mxShape.call(this);820 this.bounds = bounds;821 this.fill = fill;822 this.stroke = stroke;823 this.strokewidth = (strokewidth != null) ? strokewidth : 1;824};825826/**827* Extends mxShape.828*/829mxUtils.extend(mxArchiMate3RepresentationSmall, mxShape);830831mxArchiMate3RepresentationSmall.prototype.cst = {832 REPRESENTATION_SMALL : 'mxgraph.archimate3.representationSmall'833};834835/**836* Function: paintVertexShape837* 838* Paints the vertex shape.839*/840mxArchiMate3RepresentationSmall.prototype.paintVertexShape = function(c, x, y, w, h)841{842 c.translate(x, y);843 this.background(c, 0, 0, w, h);844 c.setShadow(false);845};846847mxArchiMate3RepresentationSmall.prototype.background = function(c, x, y, w, h)848{849 c.begin();850 c.moveTo(0, 0);851 c.lineTo(w, 0);852 c.lineTo(w, h * 0.85);853 c.arcTo(w * 0.35, h * 0.35, 0, 0, 0, w * 0.5, h * 0.85);854 c.arcTo(w * 0.35, h * 0.35, 0, 0, 1, 0, h * 0.85);855 c.close();856 c.moveTo(0, h * 0.2);857 c.lineTo(w, h * 0.2);858 c.fillAndStroke();859};860861mxCellRenderer.registerShape(mxArchiMate3RepresentationSmall.prototype.cst.REPRESENTATION_SMALL, mxArchiMate3RepresentationSmall);862863mxArchiMate3RepresentationSmall.prototype.getConstraints = function(style, w, h)864{865 var constr = [];866 867 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.3), false));868 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.3), false));869 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.3), false));870 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0), false));871 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));872 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 1), false));873 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.7), false));874 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.7), false));875 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.7), false));876 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));877878 return (constr);879};880881//**********************************************************************************************************************************************************882//Passive883//**********************************************************************************************************************************************************884/**885* Extends mxShape.886*/887function mxArchiMate3Passive(bounds, fill, stroke, strokewidth)888{889 mxShape.call(this);890 this.bounds = bounds;891 this.fill = fill;892 this.stroke = stroke;893 this.strokewidth = (strokewidth != null) ? strokewidth : 1;894};895896/**897* Extends mxShape.898*/899mxUtils.extend(mxArchiMate3Passive, mxShape);900901mxArchiMate3Passive.prototype.cst = {902 PASSIVE : 'mxgraph.archimate3.passive'903};904905/**906* Function: paintVertexShape907* 908* Paints the vertex shape.909*/910mxArchiMate3Passive.prototype.paintVertexShape = function(c, x, y, w, h)911{912 c.translate(x, y);913 this.background(c, 0, 0, w, h);914 c.setShadow(false);915};916917mxArchiMate3Passive.prototype.background = function(c, x, y, w, h)918{919 c.begin();920 c.moveTo(0, 0);921 c.lineTo(w, 0);922 c.lineTo(w, h);923 c.lineTo(0, h);924 c.close();925 c.moveTo(0, h * 0.2);926 c.lineTo(w, h * 0.2);927 c.fillAndStroke();928};929930mxCellRenderer.registerShape(mxArchiMate3Passive.prototype.cst.PASSIVE, mxArchiMate3Passive);931932mxArchiMate3Passive.prototype.getConstraints = function(style, w, h)933{934 var constr = [];935 936 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.3), false));937 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.3), false));938 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.3), false));939 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0), false));940 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));941 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 1), false));942 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.7), false));943 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.7), false));944 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.7), false));945 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));946947 return (constr);948};949950//**********************************************************************************************************************************************************951//Plateau952//**********************************************************************************************************************************************************953/**954* Extends mxShape.955*/956function mxArchiMate3Plateau(bounds, fill, stroke, strokewidth)957{958 mxShape.call(this);959 this.bounds = bounds;960 this.fill = fill;961 this.stroke = stroke;962 this.strokewidth = (strokewidth != null) ? strokewidth : 1;963};964965/**966* Extends mxShape.967*/968mxUtils.extend(mxArchiMate3Plateau, mxShape);969970mxArchiMate3Plateau.prototype.cst = {971 PLATEAU : 'mxgraph.archimate3.plateau'972};973974/**975* Function: paintVertexShape976* 977* Paints the vertex shape.978*/979mxArchiMate3Plateau.prototype.paintVertexShape = function(c, x, y, w, h)980{981 c.translate(x, y);982 this.background(c, 0, 0, w, h);983 c.setShadow(false);984};985986mxArchiMate3Plateau.prototype.background = function(c, x, y, w, h)987{988 var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#000000');989 c.setFillColor(strokeColor);990 991 c.rect(w * 0.4, 0, w * 0.6, h * 0.2);992 c.fill();993 994 c.rect(w * 0.2, h * 0.4, w * 0.6, h * 0.2);995 c.fill();996 997 c.rect(0, h * 0.8, w * 0.6, h * 0.2);998 c.fill();999};10001001mxCellRenderer.registerShape(mxArchiMate3Plateau.prototype.cst.PLATEAU, mxArchiMate3Plateau);10021003mxArchiMate3Plateau.prototype.getConstraints = function(style, w, h)1004{1005 var constr = [];1006 1007 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.3), false));1008 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.3), false));1009 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.3), false));1010 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0), false));1011 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));1012 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 1), false));1013 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.7), false));1014 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.7), false));1015 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.7), false));1016 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));10171018 return (constr);1019};10201021//**********************************************************************************************************************************************************1022//Product Small1023//**********************************************************************************************************************************************************1024/**1025* Extends mxShape.1026*/1027function mxArchiMate3ProductSmall(bounds, fill, stroke, strokewidth)1028{1029 mxShape.call(this);1030 this.bounds = bounds;1031 this.fill = fill;1032 this.stroke = stroke;1033 this.strokewidth = (strokewidth != null) ? strokewidth : 1;1034};10351036/**1037* Extends mxShape.1038*/1039mxUtils.extend(mxArchiMate3ProductSmall, mxShape);10401041mxArchiMate3ProductSmall.prototype.cst = {1042 PRODUCT_SMALL : 'mxgraph.archimate3.productSmall'1043};10441045/**1046* Function: paintVertexShape1047* 1048* Paints the vertex shape.1049*/1050mxArchiMate3ProductSmall.prototype.paintVertexShape = function(c, x, y, w, h)1051{1052 c.translate(x, y);1053 this.background(c, 0, 0, w, h);1054 c.setShadow(false);1055};10561057mxArchiMate3ProductSmall.prototype.background = function(c, x, y, w, h)1058{1059 c.begin();1060 c.moveTo(0, 0);1061 c.lineTo(w, 0);1062 c.lineTo(w, h);1063 c.lineTo(0, h);1064 c.close();1065 c.moveTo(0, h * 0.2);1066 c.lineTo(w * 0.5, h * 0.2);1067 c.lineTo(w * 0.5, 0);1068 c.fillAndStroke();1069};10701071mxCellRenderer.registerShape(mxArchiMate3ProductSmall.prototype.cst.PRODUCT_SMALL, mxArchiMate3ProductSmall);10721073mxArchiMate3ProductSmall.prototype.getConstraints = function(style, w, h)1074{1075 var constr = [];1076 1077 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.3), false));1078 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.3), false));1079 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.3), false));1080 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0), false));1081 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));1082 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 1), false));1083 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.7), false));1084 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.7), false));1085 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.7), false));1086 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));10871088 return (constr);1089};10901091//**********************************************************************************************************************************************************1092//Process1093//**********************************************************************************************************************************************************1094/**1095* Extends mxShape.1096*/1097function mxArchiMate3Process(bounds, fill, stroke, strokewidth)1098{1099 mxShape.call(this);1100 this.bounds = bounds;1101 this.fill = fill;1102 this.stroke = stroke;1103 this.strokewidth = (strokewidth != null) ? strokewidth : 1;1104};11051106/**1107* Extends mxShape.1108*/1109mxUtils.extend(mxArchiMate3Process, mxShape);11101111mxArchiMate3Process.prototype.cst = {1112 PROCESS : 'mxgraph.archimate3.process'1113};11141115/**1116* Function: paintVertexShape1117* 1118* Paints the vertex shape.1119*/1120mxArchiMate3Process.prototype.paintVertexShape = function(c, x, y, w, h)1121{1122 c.translate(x, y);1123 this.background(c, 0, 0, w, h);1124 c.setShadow(false);1125};11261127mxArchiMate3Process.prototype.background = function(c, x, y, w, h)1128{1129 c.begin();1130 c.moveTo(0, h * 0.3);1131 c.lineTo(w * 0.6, h * 0.3);1132 c.lineTo(w * 0.6, 0);1133 c.lineTo(w, h * 0.5);1134 c.lineTo(w * 0.6, h);1135 c.lineTo(w * 0.6, h * 0.7);1136 c.lineTo(0, h * 0.7);1137 c.close();1138 c.fillAndStroke();1139};11401141mxCellRenderer.registerShape(mxArchiMate3Process.prototype.cst.PROCESS, mxArchiMate3Process);11421143mxArchiMate3Process.prototype.getConstraints = function(style, w, h)1144{1145 var constr = [];1146 1147 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.3), false));1148 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.3), false));1149 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.3), false));1150 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0), false));1151 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));1152 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 1), false));1153 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.7), false));1154 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.7), false));1155 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.7), false));1156 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));11571158 return (constr);1159};11601161//**********************************************************************************************************************************************************1162//Driver1163//**********************************************************************************************************************************************************1164/**1165* Extends mxShape.1166*/1167function mxArchiMate3Driver(bounds, fill, stroke, strokewidth)1168{1169 mxShape.call(this);1170 this.bounds = bounds;1171 this.fill = fill;1172 this.stroke = stroke;1173 this.strokewidth = (strokewidth != null) ? strokewidth : 1;1174};11751176/**1177* Extends mxShape.1178*/1179mxUtils.extend(mxArchiMate3Driver, mxShape);11801181mxArchiMate3Driver.prototype.cst = {1182 DRIVER : 'mxgraph.archimate3.driver'1183};11841185/**1186* Function: paintVertexShape1187* 1188* Paints the vertex shape.1189*/1190mxArchiMate3Driver.prototype.paintVertexShape = function(c, x, y, w, h)1191{1192 c.translate(x, y);1193 this.background(c, 0, 0, w, h);1194 c.setShadow(false);1195};11961197mxArchiMate3Driver.prototype.background = function(c, x, y, w, h)1198{1199 c.begin();1200 c.moveTo(0, h * 0.5);1201 c.lineTo(w, h * 0.5);1202 c.moveTo(w * 0.5, 0);1203 c.lineTo(w * 0.5, h);1204 c.moveTo(w * 0.145, h * 0.145);1205 c.lineTo(w * 0.855, h * 0.855);1206 c.moveTo(w * 0.145, h * 0.855);1207 c.lineTo(w * 0.855, h * 0.145);1208 c.stroke();1209 1210 var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#000000');1211 c.setFillColor(strokeColor);1212 1213 c.ellipse(w * 0.35, h * 0.35, w * 0.3, h * 0.3);1214 c.fillAndStroke();12151216 c.setStrokeWidth(2);1217 c.ellipse(w * 0.1, h * 0.1, w * 0.8, h * 0.8);1218 c.stroke();1219};12201221mxCellRenderer.registerShape(mxArchiMate3Driver.prototype.cst.DRIVER, mxArchiMate3Driver);12221223mxArchiMate3Driver.prototype.getConstraints = function(style, w, h)1224{1225 var constr = [];1226 1227 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.3), false));1228 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.3), false));1229 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.3), false));1230 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0), false));1231 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));1232 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 1), false));1233 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.7), false));1234 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.7), false));1235 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.7), false));1236 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));12371238 return (constr);1239};12401241//**********************************************************************************************************************************************************1242//Assessment1243//**********************************************************************************************************************************************************1244/**1245* Extends mxShape.1246*/1247function mxArchiMate3Assessment(bounds, fill, stroke, strokewidth)1248{1249 mxShape.call(this);1250 this.bounds = bounds;1251 this.fill = fill;1252 this.stroke = stroke;1253 this.strokewidth = (strokewidth != null) ? strokewidth : 1;1254};12551256/**1257* Extends mxShape.1258*/1259mxUtils.extend(mxArchiMate3Assessment, mxShape);12601261mxArchiMate3Assessment.prototype.cst = {1262 ASSESSMENT : 'mxgraph.archimate3.assess'1263};12641265/**1266* Function: paintVertexShape1267* 1268* Paints the vertex shape.1269*/1270mxArchiMate3Assessment.prototype.paintVertexShape = function(c, x, y, w, h)1271{1272 c.translate(x, y);1273 this.background(c, 0, 0, w, h);1274 c.setShadow(false);1275};12761277mxArchiMate3Assessment.prototype.background = function(c, x, y, w, h)1278{1279 c.ellipse(w * 0.2, 0, w * 0.8, h * 0.8);1280 c.fillAndStroke();1281 1282 c.begin();1283 c.moveTo(0, h);1284 c.lineTo(w * 0.32, h * 0.68);1285 c.stroke();1286};12871288mxCellRenderer.registerShape(mxArchiMate3Assessment.prototype.cst.ASSESSMENT, mxArchiMate3Assessment);12891290mxArchiMate3Assessment.prototype.getConstraints = function(style, w, h)1291{1292 var constr = [];1293 1294 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.3), false));1295 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.3), false));1296 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.3), false));1297 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0), false));1298 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));1299 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 1), false));1300 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.7), false));1301 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.7), false));1302 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.7), false));1303 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));13041305 return (constr);1306};13071308//**********************************************************************************************************************************************************1309//Goal1310//**********************************************************************************************************************************************************1311/**1312* Extends mxShape.1313*/1314function mxArchiMate3Goal(bounds, fill, stroke, strokewidth)1315{1316 mxShape.call(this);1317 this.bounds = bounds;1318 this.fill = fill;1319 this.stroke = stroke;1320 this.strokewidth = (strokewidth != null) ? strokewidth : 1;1321};13221323/**1324* Extends mxShape.1325*/1326mxUtils.extend(mxArchiMate3Goal, mxShape);13271328mxArchiMate3Goal.prototype.cst = {1329 GOAL : 'mxgraph.archimate3.goal'1330};13311332/**1333* Function: paintVertexShape1334* 1335* Paints the vertex shape.1336*/1337mxArchiMate3Goal.prototype.paintVertexShape = function(c, x, y, w, h)1338{1339 c.translate(x, y);1340 this.background(c, 0, 0, w, h);1341 c.setShadow(false);1342};13431344mxArchiMate3Goal.prototype.background = function(c, x, y, w, h)1345{1346 c.ellipse(0, 0, w, h);1347 c.fillAndStroke();1348 c.ellipse(w * 0.15, h * 0.15, w * 0.7, h * 0.7);1349 c.stroke();1350 var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#000000');1351 c.setFillColor(strokeColor);1352 c.ellipse(w * 0.3, h * 0.3, w * 0.4, h * 0.4);1353 c.fillAndStroke();1354};13551356mxCellRenderer.registerShape(mxArchiMate3Goal.prototype.cst.GOAL, mxArchiMate3Goal);13571358mxArchiMate3Goal.prototype.getConstraints = function(style, w, h)1359{1360 var constr = [];1361 1362 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.3), false));1363 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.3), false));1364 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.3), false));1365 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0), false));1366 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));1367 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 1), false));1368 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.7), false));1369 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.7), false));1370 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.7), false));1371 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));13721373 return (constr);1374};13751376//**********************************************************************************************************************************************************1377//Outcome1378//**********************************************************************************************************************************************************1379/**1380* Extends mxShape.1381*/1382function mxArchiMate3Outcome(bounds, fill, stroke, strokewidth)1383{1384 mxShape.call(this);1385 this.bounds = bounds;1386 this.fill = fill;1387 this.stroke = stroke;1388 this.strokewidth = (strokewidth != null) ? strokewidth : 1;1389};13901391/**1392* Extends mxShape.1393*/1394mxUtils.extend(mxArchiMate3Outcome, mxShape);13951396mxArchiMate3Outcome.prototype.cst = {1397 OUTCOME : 'mxgraph.archimate3.outcome'1398};13991400/**1401* Function: paintVertexShape1402* 1403* Paints the vertex shape.1404*/1405mxArchiMate3Outcome.prototype.paintVertexShape = function(c, x, y, w, h)1406{1407 c.translate(x, y);1408 this.background(c, 0, 0, w, h);1409 c.setShadow(false);1410};14111412mxArchiMate3Outcome.prototype.background = function(c, x, y, w, h)1413{1414 var sw = mxUtils.getValue(this.style, mxConstants.STYLE_STROKEWIDTH, 1);14151416 c.ellipse(0, w * 0.2, w * 0.8, h * 0.8);1417 c.fillAndStroke();1418 c.ellipse(w * 0.15, w * 0.35, w * 0.5, h * 0.5);1419 c.stroke();1420 c.ellipse(w * 0.3, w * 0.5, w * 0.2, h * 0.2);1421 c.stroke();14221423 c.setStrokeWidth(3 * sw);1424 c.setLineCap('round'); 1425 c.begin();1426 c.moveTo(w * 0.4, h * 0.6);1427 c.lineTo(w * 0.9, h * 0.1);1428 c.moveTo(w * 0.42, h * 0.4);1429 c.lineTo(w * 0.4, h * 0.6);1430 c.lineTo(w * 0.6, h * 0.58);1431 c.moveTo(w * 0.8, 0);1432 c.lineTo(w * 0.75, h * 0.25);1433 c.lineTo(w, h * 0.2);1434 c.stroke();1435};14361437mxCellRenderer.registerShape(mxArchiMate3Outcome.prototype.cst.OUTCOME, mxArchiMate3Outcome);14381439mxArchiMate3Outcome.prototype.getConstraints = function(style, w, h)1440{1441 var constr = [];1442 1443 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.3), false));1444 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.3), false));1445 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.3), false));1446 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0), false));1447 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));1448 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 1), false));1449 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.7), false));1450 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.7), false));1451 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.7), false));1452 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));14531454 return (constr);1455};14561457//**********************************************************************************************************************************************************1458//Principle1459//**********************************************************************************************************************************************************1460/**1461* Extends mxShape.1462*/1463function mxArchiMate3Principle(bounds, fill, stroke, strokewidth)1464{1465 mxShape.call(this);1466 this.bounds = bounds;1467 this.fill = fill;1468 this.stroke = stroke;1469 this.strokewidth = (strokewidth != null) ? strokewidth : 1;1470};14711472/**1473* Extends mxShape.1474*/1475mxUtils.extend(mxArchiMate3Principle, mxShape);14761477mxArchiMate3Principle.prototype.cst = {1478 PRINCIPLE : 'mxgraph.archimate3.principle'1479};14801481/**1482* Function: paintVertexShape1483* 1484* Paints the vertex shape.1485*/1486mxArchiMate3Principle.prototype.paintVertexShape = function(c, x, y, w, h)1487{1488 c.translate(x, y);1489 this.background(c, 0, 0, w, h);1490 c.setShadow(false);1491};14921493mxArchiMate3Principle.prototype.background = function(c, x, y, w, h)1494{1495 c.begin();1496 c.moveTo(w * 0.05, h * 0.05);1497 c.arcTo(w * 2.3, h * 2.3, 0, 0, 1, w * 0.95, h * 0.05);1498 c.arcTo(w * 2.3, h * 2.3, 0, 0, 1, w * 0.95, h * 0.95);1499 c.arcTo(w * 2.3, h * 2.3, 0, 0, 1, w * 0.05, h * 0.95);1500 c.arcTo(w * 2.3, h * 2.3, 0, 0, 1, w * 0.05, h * 0.05);1501 c.close();1502 c.fillAndStroke();1503 1504 var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#000000');1505 c.setFillColor(strokeColor);1506 1507 c.begin();1508 c.moveTo(w * 0.45, h * 0.7);1509 c.lineTo(w * 0.42, h * 0.15);1510 c.lineTo(w * 0.58, h * 0.15);1511 c.lineTo(w * 0.55, h * 0.7);1512 c.close();1513 c.fill();1514 1515 c.rect(w * 0.45, h * 0.75, w * 0.1, h * 0.1);1516 c.fill();1517};15181519mxCellRenderer.registerShape(mxArchiMate3Principle.prototype.cst.PRINCIPLE, mxArchiMate3Principle);15201521mxArchiMate3Principle.prototype.getConstraints = function(style, w, h)1522{1523 var constr = [];1524 1525 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.3), false));1526 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.3), false));1527 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.3), false));1528 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0), false));1529 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));1530 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 1), false));1531 constr.push(new mxConnectionConstraint(new mxPoint(0.6, 0.7), false));1532 constr.push(new mxConnectionConstraint(new mxPoint(0.3, 0.7), false));1533 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.7), false));1534 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));15351536 return (constr);1537};15381539//**********************************************************************************************************************************************************1540//Facility1541//**********************************************************************************************************************************************************1542/**1543* Extends mxShape.1544*/1545function mxArchiMate3Facility(bounds, fill, stroke, strokewidth)1546{1547 mxShape.call(this);1548 this.bounds = bounds;1549 this.fill = fill;1550 this.stroke = stroke;1551 this.strokewidth = (strokewidth != null) ? strokewidth : 1;1552};15531554/**1555* Extends mxShape.1556*/1557mxUtils.extend(mxArchiMate3Facility, mxShape);15581559mxArchiMate3Facility.prototype.cst = {1560 FACILITY : 'mxgraph.archimate3.facility'1561};15621563/**1564* Function: paintVertexShape1565* 1566* Paints the vertex shape.1567*/1568mxArchiMate3Facility.prototype.paintVertexShape = function(c, x, y, w, h)1569{1570 c.translate(x, y);1571 this.background(c, 0, 0, w, h);1572 c.setShadow(false);1573};15741575mxArchiMate3Facility.prototype.background = function(c, x, y, w, h)1576{1577 c.begin();1578 c.moveTo(0, h);1579 c.lineTo(0, 0);1580 c.lineTo(w * 0.13, 0);1581 c.lineTo(w * 0.13, h * 0.7);1582 c.lineTo(w * 0.42, h * 0.55);1583 c.lineTo(w * 0.42, h * 0.7);1584 c.lineTo(w * 0.71, h * 0.55);1585 c.lineTo(w * 0.71, h * 0.7);1586 c.lineTo(w, h * 0.55);1587 c.lineTo(w, h);1588 c.close();1589 c.fillAndStroke();1590};15911592mxCellRenderer.registerShape(mxArchiMate3Facility.prototype.cst.FACILITY, mxArchiMate3Facility);15931594mxArchiMate3Facility.prototype.getConstraints = function(style, w, h)1595{1596 var constr = [];1597 1598 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));1599 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.2), false));1600 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.6), false));1601 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));1602 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0.8), false));1603 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));1604 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.6), false));1605 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.2), false));16061607 return (constr);1608};16091610//**********************************************************************************************************************************************************1611//Function1612//**********************************************************************************************************************************************************1613/**1614* Extends mxShape.1615*/1616function mxArchiMate3Function(bounds, fill, stroke, strokewidth)1617{1618 mxShape.call(this);1619 this.bounds = bounds;1620 this.fill = fill;1621 this.stroke = stroke;1622 this.strokewidth = (strokewidth != null) ? strokewidth : 1;1623};16241625/**1626* Extends mxShape.1627*/1628mxUtils.extend(mxArchiMate3Function, mxShape);16291630mxArchiMate3Function.prototype.cst = {1631 FUNCTION : 'mxgraph.archimate3.function'1632};16331634/**1635* Function: paintVertexShape1636* 1637* Paints the vertex shape.1638*/1639mxArchiMate3Function.prototype.paintVertexShape = function(c, x, y, w, h)1640{1641 c.translate(x, y);1642 this.background(c, 0, 0, w, h);1643 c.setShadow(false);1644};16451646mxArchiMate3Function.prototype.background = function(c, x, y, w, h)1647{1648 c.begin();1649 c.moveTo(w * 0.5, 0);1650 c.lineTo(w, h * 0.2);1651 c.lineTo(w, h);1652 c.lineTo(w * 0.5, h * 0.8);1653 c.lineTo(0, h);1654 c.lineTo(0, h * 0.2);1655 c.close();1656 c.fillAndStroke();1657};16581659mxCellRenderer.registerShape(mxArchiMate3Function.prototype.cst.FUNCTION, mxArchiMate3Function);16601661mxArchiMate3Function.prototype.getConstraints = function(style, w, h)1662{1663 var constr = [];1664 1665 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));1666 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.2), false));1667 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.6), false));1668 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));1669 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0.8), false));1670 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));1671 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.6), false));1672 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.2), false));16731674 return (constr);1675};16761677//**********************************************************************************************************************************************************1678//Grouping1679//**********************************************************************************************************************************************************1680/**1681* Extends mxShape.1682*/1683function mxArchiMate3Grouping(bounds, fill, stroke, strokewidth)1684{1685 mxShape.call(this);1686 this.bounds = bounds;1687 this.fill = fill;1688 this.stroke = stroke;1689 this.strokewidth = (strokewidth != null) ? strokewidth : 1;1690};16911692/**1693* Extends mxShape.1694*/1695mxUtils.extend(mxArchiMate3Grouping, mxShape);16961697mxArchiMate3Grouping.prototype.cst = {1698 GROUPING : 'mxgraph.archimate3.grouping'1699};17001701/**1702* Function: paintVertexShape1703* 1704* Paints the vertex shape.1705*/1706mxArchiMate3Grouping.prototype.paintVertexShape = function(c, x, y, w, h)1707{1708 c.translate(x, y);1709 this.background(c, 0, 0, w, h);1710 c.setShadow(false);1711};17121713mxArchiMate3Grouping.prototype.background = function(c, x, y, w, h)1714{1715 c.begin();1716 c.moveTo(0, h * 0.3);1717 c.lineTo(w, h * 0.3);1718 c.lineTo(w, h);1719 c.lineTo(0, h);1720 c.close();1721 c.moveTo(0, h * 0.3);1722 c.lineTo(0, 0);1723 c.lineTo(w * 0.75, 0);1724 c.lineTo(w * 0.75, h * 0.3);1725 c.fillAndStroke();1726};17271728mxCellRenderer.registerShape(mxArchiMate3Grouping.prototype.cst.GROUPING, mxArchiMate3Grouping);17291730mxArchiMate3Grouping.prototype.getConstraints = function(style, w, h)1731{1732 var constr = [];1733 1734 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));1735 constr.push(new mxConnectionConstraint(new mxPoint(0.86, 0.14), false));1736 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));1737 constr.push(new mxConnectionConstraint(new mxPoint(0.86, 0.86), false));1738 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));1739 constr.push(new mxConnectionConstraint(new mxPoint(0.14, 0.86), false));1740 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));1741 constr.push(new mxConnectionConstraint(new mxPoint(0.14, 0.14), false));17421743 return (constr);1744};17451746//**********************************************************************************************************************************************************1747//Interaction1748//**********************************************************************************************************************************************************1749/**1750* Extends mxShape.1751*/1752function mxArchiMate3Interaction(bounds, fill, stroke, strokewidth)1753{1754 mxShape.call(this);1755 this.bounds = bounds;1756 this.fill = fill;1757 this.stroke = stroke;1758 this.strokewidth = (strokewidth != null) ? strokewidth : 1;1759};17601761/**1762* Extends mxShape.1763*/1764mxUtils.extend(mxArchiMate3Interaction, mxShape);17651766mxArchiMate3Interaction.prototype.cst = {1767 INTERACTION : 'mxgraph.archimate3.interaction'1768};17691770/**1771* Function: paintVertexShape1772* 1773* Paints the vertex shape.1774*/1775mxArchiMate3Interaction.prototype.paintVertexShape = function(c, x, y, w, h)1776{1777 c.translate(x, y);1778 this.background(c, 0, 0, w, h);1779 c.setShadow(false);1780};17811782mxArchiMate3Interaction.prototype.background = function(c, x, y, w, h)1783{1784 c.begin();1785 c.moveTo(w * 0.55, 0);1786 c.arcTo(w * 0.45, h * 0.5, 0, 0, 1, w * 0.55, h);1787 c.close();1788 c.moveTo(w * 0.45, 0);1789 c.arcTo(w * 0.45, h * 0.5, 0, 0, 0, w * 0.45, h);1790 c.close();1791 c.fillAndStroke();1792};17931794mxCellRenderer.registerShape(mxArchiMate3Interaction.prototype.cst.INTERACTION, mxArchiMate3Interaction);17951796mxArchiMate3Interaction.prototype.getConstraints = function(style, w, h)1797{1798 var constr = [];1799 1800 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));1801 constr.push(new mxConnectionConstraint(new mxPoint(0.86, 0.14), false));1802 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));1803 constr.push(new mxConnectionConstraint(new mxPoint(0.86, 0.86), false));1804 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));1805 constr.push(new mxConnectionConstraint(new mxPoint(0.14, 0.86), false));1806 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));1807 constr.push(new mxConnectionConstraint(new mxPoint(0.14, 0.14), false));18081809 return (constr);1810};18111812//**********************************************************************************************************************************************************1813//Material1814//**********************************************************************************************************************************************************1815/**1816* Extends mxShape.1817*/1818function mxArchiMate3Material(bounds, fill, stroke, strokewidth)1819{1820 mxShape.call(this);1821 this.bounds = bounds;1822 this.fill = fill;1823 this.stroke = stroke;1824 this.strokewidth = (strokewidth != null) ? strokewidth : 1;1825};18261827/**1828* Extends mxShape.1829*/1830mxUtils.extend(mxArchiMate3Material, mxShape);18311832mxArchiMate3Material.prototype.cst = {1833 MATERIAL : 'mxgraph.archimate3.material'1834};18351836/**1837* Function: paintVertexShape1838* 1839* Paints the vertex shape.1840*/1841mxArchiMate3Material.prototype.paintVertexShape = function(c, x, y, w, h)1842{1843 c.translate(x, y);1844 this.background(c, 0, 0, w, h);1845 c.setShadow(false);1846};18471848mxArchiMate3Material.prototype.background = function(c, x, y, w, h)1849{1850 c.begin();1851 c.moveTo(0, h * 0.5);1852 c.lineTo(w * 0.25, 0);1853 c.lineTo(w * 0.75, 0);1854 c.lineTo(w, h * 0.5);1855 c.lineTo(w * 0.75, h);1856 c.lineTo(w * 0.25, h);1857 c.close();1858 c.moveTo(w * 0.15, h * 0.5);1859 c.lineTo(w * 0.31, h * 0.2);1860 c.moveTo(w * 0.69, h * 0.2);1861 c.lineTo(w * 0.85, h * 0.5);1862 c.moveTo(w * 0.68, h * 0.80);1863 c.lineTo(w * 0.32, h * 0.80);1864 c.fillAndStroke();1865};18661867mxCellRenderer.registerShape(mxArchiMate3Material.prototype.cst.MATERIAL, mxArchiMate3Material);18681869mxArchiMate3Material.prototype.getConstraints = function(style, w, h)1870{1871 var constr = [];1872 1873 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));1874 constr.push(new mxConnectionConstraint(new mxPoint(0.86, 0.14), false));1875 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));1876 constr.push(new mxConnectionConstraint(new mxPoint(0.86, 0.86), false));1877 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));1878 constr.push(new mxConnectionConstraint(new mxPoint(0.14, 0.86), false));1879 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));1880 constr.push(new mxConnectionConstraint(new mxPoint(0.14, 0.14), false));18811882 return (constr);1883};18841885//**********************************************************************************************************************************************************1886//Location Icon1887//**********************************************************************************************************************************************************1888/**1889* Extends mxShape.1890*/1891function mxArchiMate3LocationIcon(bounds, fill, stroke, strokewidth)1892{1893 mxShape.call(this);1894 this.bounds = bounds;1895 this.fill = fill;1896 this.stroke = stroke;1897 this.strokewidth = (strokewidth != null) ? strokewidth : 1;1898};18991900/**1901* Extends mxShape.1902*/1903mxUtils.extend(mxArchiMate3LocationIcon, mxShape);19041905mxArchiMate3LocationIcon.prototype.cst = {1906 LOCATION_ICON : 'mxgraph.archimate3.locationIcon'1907};19081909/**1910* Function: paintVertexShape1911* 1912* Paints the vertex shape.1913*/1914mxArchiMate3LocationIcon.prototype.paintVertexShape = function(c, x, y, w, h)1915{1916 c.translate(x, y);1917 this.background(c, 0, 0, w, h);1918 c.setShadow(false);1919};19201921mxArchiMate3LocationIcon.prototype.background = function(c, x, y, w, h)1922{1923 c.translate(3, 0);1924 w = w - 6;1925 c.begin();19261927 c.moveTo(w * 0.5, 0);1928 c.curveTo(w * 0.2842, 0, 0, h * 0.1006, 0, h * 0.3001);1929 c.curveTo(0, h * 0.4071, w * 0.0776, h * 0.4777, w * 0.1524, h * 0.5485);1930 c.curveTo(w * 0.2901, h * 0.6788, w * 0.4275, h * 0.7993, w * 0.5, h);1931 c.curveTo(w * 0.5725, h * 0.7993, w * 0.7099, h * 0.6788, w * 0.8476, h * 0.5485);1932 c.curveTo(w * 0.9224, h * 0.4777, w, h * 0.4071, w, h * 0.3001);1933 c.curveTo(w, h * 0.1006, w * 0.7158, 0, w * 0.5, 0);1934 c.close();1935 c.fillAndStroke();1936};19371938mxCellRenderer.registerShape(mxArchiMate3LocationIcon.prototype.cst.LOCATION_ICON, mxArchiMate3LocationIcon);19391940mxArchiMate3LocationIcon.prototype.getConstraints = function(style, w, h)1941{1942 var constr = [];1943 1944 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));1945 constr.push(new mxConnectionConstraint(new mxPoint(0.86, 0.14), false));1946 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));1947 constr.push(new mxConnectionConstraint(new mxPoint(0.86, 0.86), false));1948 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));1949 constr.push(new mxConnectionConstraint(new mxPoint(0.14, 0.86), false));1950 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));1951 constr.push(new mxConnectionConstraint(new mxPoint(0.14, 0.14), false));19521953 return (constr);1954};19551956//**********************************************************************************************************************************************************1957//Service1958//**********************************************************************************************************************************************************1959/**1960* Extends mxShape.1961*/1962function mxArchiMate3Service(bounds, fill, stroke, strokewidth)1963{1964 mxShape.call(this);1965 this.bounds = bounds;1966 this.fill = fill;1967 this.stroke = stroke;1968 this.strokewidth = (strokewidth != null) ? strokewidth : 1;1969};19701971/**1972* Extends mxShape.1973*/1974mxUtils.extend(mxArchiMate3Service, mxShape);19751976mxArchiMate3Service.prototype.cst = {1977 SERVICE : 'mxgraph.archimate3.service'1978};19791980/**1981* Function: paintVertexShape1982* 1983* Paints the vertex shape.1984*/1985mxArchiMate3Service.prototype.paintVertexShape = function(c, x, y, w, h)1986{1987 c.translate(x, y);1988 this.background(c, 0, 0, w, h);1989 c.setShadow(false);1990};19911992mxArchiMate3Service.prototype.background = function(c, x, y, w, h)1993{1994 var w1 = Math.max(w - h * 0.5, w * 0.5);1995 var w2 = Math.min(h * 0.5, w * 0.5);1996 1997 c.begin();1998 c.moveTo(w1, 0);1999 c.arcTo(h * 0.5, h * 0.5, 0, 0, 1, w1, h);2000 c.lineTo(w2, h);2001 c.arcTo(h * 0.5, h * 0.5, 0, 0, 1, w2, 0);2002 c.close();2003 c.fillAndStroke();2004};20052006mxCellRenderer.registerShape(mxArchiMate3Service.prototype.cst.SERVICE, mxArchiMate3Service);20072008mxArchiMate3Service.prototype.getConstraints = function(style, w, h)2009{2010 var constr = [];2011 var w1 = Math.max(w - h * 0.5, w * 0.5);2012 var w2 = Math.min(h * 0.5, w * 0.5);2013 2014 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));2015 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));2016 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w1, 0));2017 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w1, h));2018 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w2, h));2019 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w2, 0));2020 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w1 + h * 0.355, h * 0.145));2021 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w1 + h * 0.5, h * 0.5));2022 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w1 + h * 0.355, h * 0.855));2023 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w2 - h * 0.355, h * 0.145));2024 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w2 - h * 0.5, h * 0.5));2025 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w2 - h * 0.355, h * 0.855));20262027 return (constr);2028};20292030//**********************************************************************************************************************************************************2031//Requirement2032//**********************************************************************************************************************************************************2033/**2034* Extends mxShape.2035*/2036function mxArchiMate3Requirement(bounds, fill, stroke, strokewidth)2037{2038 mxShape.call(this);2039 this.bounds = bounds;2040 this.fill = fill;2041 this.stroke = stroke;2042 this.strokewidth = (strokewidth != null) ? strokewidth : 1;2043};20442045/**2046* Extends mxShape.2047*/2048mxUtils.extend(mxArchiMate3Requirement, mxShape);20492050mxArchiMate3Requirement.prototype.cst = {2051 REQUIREMENT : 'mxgraph.archimate3.requirement'2052};20532054/**2055* Function: paintVertexShape2056* 2057* Paints the vertex shape.2058*/2059mxArchiMate3Requirement.prototype.paintVertexShape = function(c, x, y, w, h)2060{2061 c.translate(x, y);2062 this.background(c, 0, 0, w, h);2063 c.setShadow(false);2064};20652066mxArchiMate3Requirement.prototype.background = function(c, x, y, w, h)2067{2068 c.begin();2069 c.moveTo(w * 0.25, 0);2070 c.lineTo(w, 0);2071 c.lineTo(w * 0.75, h);2072 c.lineTo(0, h);2073 c.close();2074 c.fillAndStroke();2075};20762077mxCellRenderer.registerShape(mxArchiMate3Requirement.prototype.cst.REQUIREMENT, mxArchiMate3Requirement);20782079mxArchiMate3Requirement.prototype.getConstraints = function(style, w, h)2080{2081 var constr = [];20822083 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));2084 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));2085 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));2086 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));2087 constr.push(new mxConnectionConstraint(new mxPoint(0.9375, 0.25), false));2088 constr.push(new mxConnectionConstraint(new mxPoint(0.875, 0.5), false));2089 constr.push(new mxConnectionConstraint(new mxPoint(0.8125, 0.75), false));2090 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));2091 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));2092 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));2093 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));2094 constr.push(new mxConnectionConstraint(new mxPoint(0.0625, 0.75), false));2095 constr.push(new mxConnectionConstraint(new mxPoint(0.125, 0.5), false));2096 constr.push(new mxConnectionConstraint(new mxPoint(0.1875, 0.25), false));20972098 return (constr);2099};21002101//**********************************************************************************************************************************************************2102//Constraint2103//**********************************************************************************************************************************************************2104/**2105* Extends mxShape.2106*/2107function mxArchiMate3Constraint(bounds, fill, stroke, strokewidth)2108{2109 mxShape.call(this);2110 this.bounds = bounds;2111 this.fill = fill;2112 this.stroke = stroke;2113 this.strokewidth = (strokewidth != null) ? strokewidth : 1;2114};21152116/**2117* Extends mxShape.2118*/2119mxUtils.extend(mxArchiMate3Constraint, mxShape);21202121mxArchiMate3Constraint.prototype.cst = {2122 CONSTRAINT : 'mxgraph.archimate3.constraint'2123};21242125/**2126* Function: paintVertexShape2127* 2128* Paints the vertex shape.2129*/2130mxArchiMate3Constraint.prototype.paintVertexShape = function(c, x, y, w, h)2131{2132 c.translate(x, y);2133 this.background(c, 0, 0, w, h);2134 c.setShadow(false);2135};21362137mxArchiMate3Constraint.prototype.background = function(c, x, y, w, h)2138{2139 c.begin();2140 c.moveTo(w * 0.25, 0);2141 c.lineTo(w, 0);2142 c.lineTo(w * 0.75, h);2143 c.lineTo(0, h);2144 c.close();2145 c.moveTo(w * 0.45, 0);2146 c.lineTo(w * 0.2, h);2147 c.fillAndStroke();2148};21492150mxCellRenderer.registerShape(mxArchiMate3Constraint.prototype.cst.CONSTRAINT, mxArchiMate3Constraint);21512152mxArchiMate3Constraint.prototype.getConstraints = function(style, w, h)2153{2154 var constr = [];21552156 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));2157 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));2158 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));2159 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));2160 constr.push(new mxConnectionConstraint(new mxPoint(0.9375, 0.25), false));2161 constr.push(new mxConnectionConstraint(new mxPoint(0.875, 0.5), false));2162 constr.push(new mxConnectionConstraint(new mxPoint(0.8125, 0.75), false));2163 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));2164 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));2165 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));2166 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));2167 constr.push(new mxConnectionConstraint(new mxPoint(0.0625, 0.75), false));2168 constr.push(new mxConnectionConstraint(new mxPoint(0.125, 0.5), false));2169 constr.push(new mxConnectionConstraint(new mxPoint(0.1875, 0.25), false));21702171 return (constr);2172};21732174//**********************************************************************************************************************************************************2175//Equipment2176//**********************************************************************************************************************************************************2177/**2178* Extends mxShape.2179*/2180function mxArchiMate3Equipment(bounds, fill, stroke, strokewidth)2181{2182 mxShape.call(this);2183 this.bounds = bounds;2184 this.fill = fill;2185 this.stroke = stroke;2186 this.strokewidth = (strokewidth != null) ? strokewidth : 1;2187};21882189/**2190* Extends mxShape.2191*/2192mxUtils.extend(mxArchiMate3Equipment, mxShape);21932194mxArchiMate3Equipment.prototype.cst = {2195 EQUIPMENT : 'mxgraph.archimate3.equipment'2196};21972198/**2199* Function: paintVertexShape2200* 2201* Paints the vertex shape.2202*/2203mxArchiMate3Equipment.prototype.paintVertexShape = function(c, x, y, w, h)2204{2205 c.translate(x, y);2206 this.background(c, 0, 0, w, h);2207 c.setShadow(false);2208};22092210mxArchiMate3Equipment.prototype.background = function(c, x, y, w, h)2211{2212 c.begin();2213 c.moveTo(w * 0.72, h * 0.38);2214 c.curveTo(w * 0.78, w * 0.38, w * 0.85, h * 0.34, w * 0.85, h * 0.26);2215 c.curveTo(w * 0.85, w * 0.18, w * 0.78, h * 0.14, w * 0.73, h * 0.14);2216 c.curveTo(w * 0.64, w * 0.14, w * 0.59, h * 0.2, w * 0.59, h * 0.26);2217 c.curveTo(w * 0.59, h * 0.33, w * 0.65, w * 0.38, w * 0.72, h * 0.38);2218 c.close();2219 c.moveTo(w * 0.68, h * 0.52);2220 c.lineTo(w * 0.67, h * 0.45);2221 c.lineTo(w * 0.61, h * 0.43);2222 c.lineTo(w * 0.56, h * 0.48);2223 c.lineTo(w * 0.5, h * 0.42);2224 c.lineTo(w * 0.54, h * 0.36);2225 c.lineTo(w * 0.52, h * 0.31);2226 c.lineTo(w * 0.45, h * 0.31);2227 c.lineTo(w * 0.45, h * 0.22);2228 c.lineTo(w * 0.52, h * 0.21);2229 c.lineTo(w * 0.54, h * 0.16);2230 c.lineTo(w * 0.5, h * 0.11);2231 c.lineTo(w * 0.56, h * 0.05);2232 c.lineTo(w * 0.62, h * 0.09);2233 c.lineTo(w * 0.67, h * 0.07);2234 c.lineTo(w * 0.68, 0);2235 c.lineTo(w * 0.77, 0);2236 c.lineTo(w * 0.78, h * 0.07);2237 c.lineTo(w * 0.83, h * 0.09);2238 c.lineTo(w * 0.89, h * 0.05);2239 c.lineTo(w * 0.95, h * 0.11);2240 c.lineTo(w * 0.91, h * 0.16);2241 c.lineTo(w * 0.93, h * 0.21);2242 c.lineTo(w, h * 0.22);2243 c.lineTo(w, h * 0.31);2244 c.lineTo(w * 0.93, h * 0.31);2245 c.lineTo(w * 0.91, h * 0.36);2246 c.lineTo(w * 0.95, h * 0.41);2247 c.lineTo(w * 0.89, h * 0.47);2248 c.lineTo(w * 0.83, h * 0.43);2249 c.lineTo(w * 0.78, h * 0.45);2250 c.lineTo(w * 0.77, h * 0.52);2251 c.lineTo(w * 0.68, h * 0.52);2252 c.close();2253 c.moveTo(w * 0.36, h * 0.81);2254 c.curveTo(w * 0.44, h * 0.81, w * 0.52, h * 0.75, w * 0.52, h * 0.67);2255 c.curveTo(w * 0.52, h * 0.59, w * 0.45, h * 0.51, w * 0.35, h * 0.51);2256 c.curveTo(w * 0.27, h * 0.51, w * 0.19, h * 0.58, w * 0.19, h * 0.67);2257 c.curveTo(w * 0.19, h * 0.74, w * 0.27, h * 0.82, w * 0.36, h * 0.81);2258 c.close();2259 c.moveTo(w * 0.21, h * 0.98);2260 c.lineTo(w * 0.22, h * 0.89);2261 c.lineTo(w * 0.16, h * 0.85);2262 c.lineTo(w * 0.08, h * 0.88);2263 c.lineTo(w * 0.02, h * 0.79);2264 c.lineTo(w * 0.09, h * 0.74);2265 c.lineTo(w * 0.08, h * 0.67);2266 c.lineTo(0, h * 0.63);2267 c.lineTo(w * 0.03, h * 0.53);2268 c.lineTo(w * 0.12, h * 0.54);2269 c.lineTo(w * 0.16, h * 0.48);2270 c.lineTo(w * 0.13, h * 0.4);2271 c.lineTo(w * 0.22, h * 0.35);2272 c.lineTo(w * 0.28, h * 0.42);2273 c.lineTo(w * 0.36, h * 0.41);2274 c.lineTo(w * 0.39, h * 0.33);2275 c.lineTo(w * 0.5, h * 0.36);2276 c.lineTo(w * 0.49, h * 0.45);2277 c.lineTo(w * 0.55, h * 0.49);2278 c.lineTo(w * 0.63, h * 0.45);2279 c.lineTo(w * 0.69, h * 0.54);2280 c.lineTo(w * 0.62, h * 0.6);2281 c.lineTo(w * 0.63, h * 0.67);2282 c.lineTo(w * 0.71, h * 0.7);2283 c.lineTo(w * 0.68, h * 0.8);2284 c.lineTo(w * 0.59, h * 0.79);2285 c.lineTo(w * 0.55, h * 0.85);2286 c.lineTo(w * 0.59, h * 0.79);2287 c.lineTo(w * 0.55, h * 0.85);2288 c.lineTo(w * 0.59, h * 0.93);2289 c.lineTo(w * 0.49, h * 0.98);2290 c.lineTo(w * 0.43, h * 0.91);2291 c.lineTo(w * 0.36, h * 0.92);2292 c.lineTo(w * 0.32, h);2293 c.lineTo(w * 0.21, h * 0.98);2294 c.close();2295 c.fillAndStroke();2296};22972298mxCellRenderer.registerShape(mxArchiMate3Equipment.prototype.cst.EQUIPMENT, mxArchiMate3Equipment);22992300mxArchiMate3Equipment.prototype.getConstraints = function(style, w, h)2301{2302 var constr = [];2303 var w1 = Math.max(w - h * 0.5, w * 0.5);2304 var w2 = Math.min(h * 0.5, w * 0.5);2305 2306 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - h * 0.5, 0));2307 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - h * 0.5, h));2308 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h));2309 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, h * 0.5, h * 0.5));2310 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));2311 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));2312 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - h * 0.5) * 0.5, 0));2313 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - h * 0.5) * 0.5, h));23142315 return (constr);2316};23172318//**********************************************************************************************************************************************************2319//Event2320//**********************************************************************************************************************************************************2321/**2322* Extends mxShape.2323*/2324function mxArchiMate3Event(bounds, fill, stroke, strokewidth)2325{2326 mxShape.call(this);2327 this.bounds = bounds;2328 this.fill = fill;2329 this.stroke = stroke;2330 this.strokewidth = (strokewidth != null) ? strokewidth : 1;2331};23322333/**2334* Extends mxShape.2335*/2336mxUtils.extend(mxArchiMate3Event, mxShape);23372338mxArchiMate3Event.prototype.cst = {2339 EVENT : 'mxgraph.archimate3.event'2340};23412342/**2343* Function: paintVertexShape2344* 2345* Paints the vertex shape.2346*/2347mxArchiMate3Event.prototype.paintVertexShape = function(c, x, y, w, h)2348{2349 c.translate(x, y);2350 this.background(c, 0, 0, w, h);2351 c.setShadow(false);2352};23532354mxArchiMate3Event.prototype.background = function(c, x, y, w, h)2355{2356 c.begin();2357 c.moveTo(w - h * 0.5, 0);2358 c.arcTo(h * 0.5, h * 0.5, 0, 0, 1, w - h * 0.5, h);2359 c.lineTo(0, h);2360 c.lineTo(h * 0.5, h * 0.5);2361 c.lineTo(0, 0);2362 c.close();2363 c.fillAndStroke();2364};23652366mxCellRenderer.registerShape(mxArchiMate3Event.prototype.cst.EVENT, mxArchiMate3Event);23672368mxArchiMate3Event.prototype.getConstraints = function(style, w, h)2369{2370 var constr = [];2371 var w1 = Math.max(w - h * 0.5, w * 0.5);2372 var w2 = Math.min(h * 0.5, w * 0.5);2373 2374 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - h * 0.5, 0));2375 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - h * 0.5, h));2376 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h));2377 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, h * 0.5, h * 0.5));2378 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));2379 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));2380 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - h * 0.5) * 0.5, 0));2381 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - h * 0.5) * 0.5, h));23822383 return (constr);2384};23852386//**********************************************************************************************************************************************************2387//Event 22388//**********************************************************************************************************************************************************2389/**2390* Extends mxShape.2391*/2392function mxArchiMate3Event2(bounds, fill, stroke, strokewidth)2393{2394 mxShape.call(this);2395 this.bounds = bounds;2396 this.fill = fill;2397 this.stroke = stroke;2398 this.strokewidth = (strokewidth != null) ? strokewidth : 1;2399};24002401/**2402* Extends mxShape.2403*/2404mxUtils.extend(mxArchiMate3Event2, mxShape);24052406mxArchiMate3Event2.prototype.cst = {2407 EVENT2 : 'mxgraph.archimate3.event2'2408};24092410/**2411* Function: paintVertexShape2412* 2413* Paints the vertex shape.2414*/2415mxArchiMate3Event2.prototype.paintVertexShape = function(c, x, y, w, h)2416{2417 c.translate(x, y);2418 this.background(c, 0, 0, w, h);2419 c.setShadow(false);2420};24212422mxArchiMate3Event2.prototype.background = function(c, x, y, w, h)2423{2424 c.begin();2425 c.moveTo(w - h * 0.5, 0);2426 c.arcTo(h * 0.5, h * 0.5, 0, 0, 1, w - h * 0.5, h);2427 c.lineTo(0, h);2428 c.arcTo(h * 0.5, h * 0.5, 0, 0, 0, 0, 0);2429 c.close();2430 c.fillAndStroke();2431};24322433mxCellRenderer.registerShape(mxArchiMate3Event2.prototype.cst.EVENT2, mxArchiMate3Event2);24342435//**********************************************************************************************************************************************************2436//Actor2437//**********************************************************************************************************************************************************2438/**2439* Extends mxShape.2440*/2441function mxArchiMate3Actor(bounds, fill, stroke, strokewidth)2442{2443 mxShape.call(this);2444 this.bounds = bounds;2445 this.fill = fill;2446 this.stroke = stroke;2447 this.strokewidth = (strokewidth != null) ? strokewidth : 1;2448};24492450/**2451* Extends mxShape.2452*/2453mxUtils.extend(mxArchiMate3Actor, mxShape);24542455mxArchiMate3Actor.prototype.cst = {2456 ACTOR : 'mxgraph.archimate3.actor'2457};24582459/**2460* Function: paintVertexShape2461* 2462* Paints the vertex shape.2463*/2464mxArchiMate3Actor.prototype.paintVertexShape = function(c, x, y, w, h)2465{2466 c.translate(x, y);2467 this.background(c, 0, 0, w, h);2468 c.setShadow(false);2469};24702471mxArchiMate3Actor.prototype.background = function(c, x, y, w, h)2472{2473 c.ellipse(w * 0.2, 0, w * 0.6, h * 0.3);2474 c.fillAndStroke();2475 2476 c.begin();2477 c.moveTo(w * 0.5, h * 0.3);2478 c.lineTo(w * 0.5, h * 0.75);2479 c.moveTo(0, h * 0.45);2480 c.lineTo(w, h * 0.45);2481 c.moveTo(0, h);2482 c.lineTo(w * 0.5, h * 0.75);2483 c.lineTo(w, h);2484 c.stroke();2485};24862487mxCellRenderer.registerShape(mxArchiMate3Actor.prototype.cst.ACTOR, mxArchiMate3Actor);24882489mxArchiMate3Actor.prototype.getConstraints = function(style, w, h)2490{2491 var constr = [];2492 2493 constr.push(new mxConnectionConstraint(new mxPoint(0.2, 0.15), false));2494 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));2495 constr.push(new mxConnectionConstraint(new mxPoint(0.8, 0.15), false));2496 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.45), false));2497 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.45), false));2498 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));2499 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));25002501 return (constr);2502};25032504//**********************************************************************************************************************************************************2505//Role2506//**********************************************************************************************************************************************************2507/**2508* Extends mxShape.2509*/2510function mxArchiMate3Role(bounds, fill, stroke, strokewidth)2511{2512 mxShape.call(this);2513 this.bounds = bounds;2514 this.fill = fill;2515 this.stroke = stroke;2516 this.strokewidth = (strokewidth != null) ? strokewidth : 1;2517};25182519/**2520* Extends mxShape.2521*/2522mxUtils.extend(mxArchiMate3Role, mxShape);25232524mxArchiMate3Role.prototype.cst = {2525 ROLE : 'mxgraph.archimate3.role'2526};25272528/**2529* Function: paintVertexShape2530* 2531* Paints the vertex shape.2532*/2533mxArchiMate3Role.prototype.paintVertexShape = function(c, x, y, w, h)2534{2535 c.translate(x, y);2536 this.background(c, 0, 0, w, h);2537 c.setShadow(false);2538};25392540mxArchiMate3Role.prototype.background = function(c, x, y, w, h)2541{2542 c.begin();2543 c.moveTo(w * 0.8, 0);2544 c.lineTo(w * 0.2, 0);2545 c.arcTo(w * 0.2, h * 0.5, 0, 0, 0, w * 0.2, h);2546 c.lineTo(w * 0.8, h);2547 c.fillAndStroke();25482549 c.ellipse(w * 0.6, 0, w * 0.4, h);2550 c.fillAndStroke();2551};25522553mxCellRenderer.registerShape(mxArchiMate3Role.prototype.cst.ROLE, mxArchiMate3Role);25542555mxArchiMate3Role.prototype.getConstraints = function(style, w, h)2556{2557 var constr = [];2558 2559 constr.push(new mxConnectionConstraint(new mxPoint(0.2, 0), false));2560 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));2561 constr.push(new mxConnectionConstraint(new mxPoint(0.8, 0), false));2562 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));2563 constr.push(new mxConnectionConstraint(new mxPoint(0.8, 1), false));2564 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));2565 constr.push(new mxConnectionConstraint(new mxPoint(0.2, 1), false));2566 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));25672568 return (constr);2569};25702571//**********************************************************************************************************************************************************2572//Business Object2573//**********************************************************************************************************************************************************2574/**2575* Extends mxShape.2576*/2577function mxArchiMate3BusinessObject(bounds, fill, stroke, strokewidth)2578{2579 mxShape.call(this);2580 this.bounds = bounds;2581 this.fill = fill;2582 this.stroke = stroke;2583 this.strokewidth = (strokewidth != null) ? strokewidth : 1;2584};25852586/**2587* Extends mxShape.2588*/2589mxUtils.extend(mxArchiMate3BusinessObject, mxShape);25902591mxArchiMate3BusinessObject.prototype.cst = {2592 BUSINESS_OBJECT : 'mxgraph.archimate3.businessObject'2593};25942595/**2596* Function: paintVertexShape2597* 2598* Paints the vertex shape.2599*/2600mxArchiMate3BusinessObject.prototype.paintVertexShape = function(c, x, y, w, h)2601{2602 c.translate(x, y);2603 this.background(c, 0, 0, w, h);2604 c.setShadow(false);2605 this.foreground(c, 0, 0, w, h);2606};26072608mxArchiMate3BusinessObject.prototype.background = function(c, x, y, w, h)2609{2610 c.rect(0, 0, w, h);2611 c.fillAndStroke();2612};26132614mxArchiMate3BusinessObject.prototype.foreground = function(c, x, y, w, h)2615{2616 if (h >= 15)2617 {2618 c.begin();2619 c.moveTo(0, 15);2620 c.lineTo(w, 15);2621 c.stroke();2622 }2623};26242625mxCellRenderer.registerShape(mxArchiMate3BusinessObject.prototype.cst.BUSINESS_OBJECT, mxArchiMate3BusinessObject);26262627mxArchiMate3BusinessObject.prototype.getConstraints = function(style, w, h)2628{2629 var constr = [];2630 2631 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));2632 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));2633 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));2634 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));2635 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));2636 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.25), false));2637 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));2638 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.75), false));2639 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));2640 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));2641 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));2642 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));2643 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));2644 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.75), false));2645 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));2646 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.25), false));26472648 return (constr);2649};26502651//**********************************************************************************************************************************************************2652//Contract2653//**********************************************************************************************************************************************************2654/**2655* Extends mxShape.2656*/2657function mxArchiMate3Contract(bounds, fill, stroke, strokewidth)2658{2659 mxShape.call(this);2660 this.bounds = bounds;2661 this.fill = fill;2662 this.stroke = stroke;2663 this.strokewidth = (strokewidth != null) ? strokewidth : 1;2664};26652666/**2667* Extends mxShape.2668*/2669mxUtils.extend(mxArchiMate3Contract, mxShape);26702671mxArchiMate3Contract.prototype.cst = {2672 CONTRACT : 'mxgraph.archimate3.contract'2673};26742675/**2676* Function: paintVertexShape2677* 2678* Paints the vertex shape.2679*/2680mxArchiMate3Contract.prototype.paintVertexShape = function(c, x, y, w, h)2681{2682 c.translate(x, y);2683 this.background(c, 0, 0, w, h);2684 c.setShadow(false);2685 this.foreground(c, 0, 0, w, h);2686};26872688mxArchiMate3Contract.prototype.background = function(c, x, y, w, h)2689{2690 c.rect(0, 0, w, h);2691 c.fillAndStroke();2692};26932694mxArchiMate3Contract.prototype.foreground = function(c, x, y, w, h)2695{2696 if (h >= 15)2697 {2698 c.begin();2699 c.moveTo(0, 15);2700 c.lineTo(w, 15);2701 c.stroke();2702 }2703 2704 if (h >= 30)2705 {2706 c.begin();2707 c.moveTo(0, h - 15);2708 c.lineTo(w, h - 15);2709 c.stroke();2710 }27112712};27132714mxCellRenderer.registerShape(mxArchiMate3Contract.prototype.cst.CONTRACT, mxArchiMate3Contract);27152716mxArchiMate3Contract.prototype.getConstraints = function(style, w, h)2717{2718 var constr = [];2719 2720 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));2721 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));2722 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));2723 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));2724 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));2725 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.25), false));2726 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));2727 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.75), false));2728 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));2729 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));2730 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));2731 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));2732 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));2733 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.75), false));2734 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));2735 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.25), false));27362737 return (constr);2738};27392740//**********************************************************************************************************************************************************2741//Product2742//**********************************************************************************************************************************************************2743/**2744* Extends mxShape.2745*/2746function mxArchiMate3Product(bounds, fill, stroke, strokewidth)2747{2748 mxShape.call(this);2749 this.bounds = bounds;2750 this.fill = fill;2751 this.stroke = stroke;2752 this.strokewidth = (strokewidth != null) ? strokewidth : 1;2753};27542755/**2756* Extends mxShape.2757*/2758mxUtils.extend(mxArchiMate3Product, mxShape);27592760mxArchiMate3Product.prototype.cst = {2761 PRODUCT : 'mxgraph.archimate3.product'2762};27632764/**2765* Function: paintVertexShape2766* 2767* Paints the vertex shape.2768*/2769mxArchiMate3Product.prototype.paintVertexShape = function(c, x, y, w, h)2770{2771 c.translate(x, y);2772 this.background(c, 0, 0, w, h);2773 c.setShadow(false);2774 this.foreground(c, 0, 0, w, h);2775};27762777mxArchiMate3Product.prototype.background = function(c, x, y, w, h)2778{2779 c.rect(0, 0, w, h);2780 c.fillAndStroke();2781};27822783mxArchiMate3Product.prototype.foreground = function(c, x, y, w, h)2784{2785 if (h >= 15)2786 {2787 c.begin();2788 c.moveTo(0, 15);2789 c.lineTo(w * 0.6, 15);2790 c.lineTo(w * 0.6, 0);2791 c.stroke();2792 }2793};27942795mxCellRenderer.registerShape(mxArchiMate3Product.prototype.cst.PRODUCT, mxArchiMate3Product);27962797mxArchiMate3Product.prototype.getConstraints = function(style, w, h)2798{2799 var constr = [];2800 2801 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));2802 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));2803 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));2804 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));2805 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));2806 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.25), false));2807 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));2808 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.75), false));2809 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));2810 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));2811 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));2812 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));2813 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));2814 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.75), false));2815 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));2816 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.25), false));28172818 return (constr);2819};28202821//**********************************************************************************************************************************************************2822//Representation2823//**********************************************************************************************************************************************************2824/**2825* Extends mxShape.2826*/2827function mxArchiMate3Representation(bounds, fill, stroke, strokewidth)2828{2829 mxShape.call(this);2830 this.bounds = bounds;2831 this.fill = fill;2832 this.stroke = stroke;2833 this.strokewidth = (strokewidth != null) ? strokewidth : 1;2834};28352836/**2837* Extends mxShape.2838*/2839mxUtils.extend(mxArchiMate3Representation, mxShape);28402841mxArchiMate3Representation.prototype.cst = {2842 REPRESENTATION : 'mxgraph.archimate3.representation'2843};28442845/**2846* Function: paintVertexShape2847* 2848* Paints the vertex shape.2849*/2850mxArchiMate3Representation.prototype.paintVertexShape = function(c, x, y, w, h)2851{2852 c.translate(x, y);2853 this.background(c, 0, 0, w, h);2854};28552856mxArchiMate3Representation.prototype.background = function(c, x, y, w, h)2857{2858 c.begin();2859 c.moveTo(0, 0);2860 c.lineTo(w, 0);2861 c.lineTo(w, h * 0.85);2862 c.arcTo(w * 0.35, h * 0.35, 0, 0, 0, w * 0.5, h * 0.85);2863 c.arcTo(w * 0.35, h * 0.35, 0, 0, 1, 0, h * 0.85);2864 c.close();2865 c.fillAndStroke();2866 2867 if (h >= 20)2868 c.begin();2869 c.moveTo(0, 15);2870 c.lineTo(w, 15);2871 c.stroke();2872};28732874mxCellRenderer.registerShape(mxArchiMate3Representation.prototype.cst.REPRESENTATION, mxArchiMate3Representation);28752876mxArchiMate3Representation.prototype.getConstraints = function(style, w, h)2877{2878 var constr = [];2879 2880 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));2881 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));2882 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));2883 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));2884 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));2885 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.25), false));2886 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));2887 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.75), false));2888 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.85), false));2889 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0.745), false));2890 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0.85), false));2891 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0.955), false));2892 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.85), false));2893 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.75), false));2894 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));2895 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.25), false));28962897 return (constr);2898};28992900//**********************************************************************************************************************************************************2901//Deliverable2902//**********************************************************************************************************************************************************2903/**2904* Extends mxShape.2905*/2906function mxArchiMate3Deliverable(bounds, fill, stroke, strokewidth)2907{2908 mxShape.call(this);2909 this.bounds = bounds;2910 this.fill = fill;2911 this.stroke = stroke;2912 this.strokewidth = (strokewidth != null) ? strokewidth : 1;2913};29142915/**2916* Extends mxShape.2917*/2918mxUtils.extend(mxArchiMate3Deliverable, mxShape);29192920mxArchiMate3Deliverable.prototype.cst = {2921 DELIVERABLE : 'mxgraph.archimate3.deliverable'2922};29232924/**2925* Function: paintVertexShape2926* 2927* Paints the vertex shape.2928*/2929mxArchiMate3Deliverable.prototype.paintVertexShape = function(c, x, y, w, h)2930{2931 c.translate(x, y);2932 this.background(c, 0, 0, w, h);2933};29342935mxArchiMate3Deliverable.prototype.background = function(c, x, y, w, h)2936{2937 c.begin();2938 c.moveTo(0, 0);2939 c.lineTo(w, 0);2940 c.lineTo(w, h * 0.85);2941 c.arcTo(w * 0.35, h * 0.35, 0, 0, 0, w * 0.5, h * 0.85);2942 c.arcTo(w * 0.35, h * 0.35, 0, 0, 1, 0, h * 0.85);2943 c.close();2944 c.fillAndStroke();2945};29462947mxCellRenderer.registerShape(mxArchiMate3Deliverable.prototype.cst.DELIVERABLE, mxArchiMate3Deliverable);29482949mxArchiMate3Deliverable.prototype.getConstraints = function(style, w, h)2950{2951 var constr = [];2952 2953 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));2954 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));2955 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));2956 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));2957 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));2958 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.25), false));2959 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));2960 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.75), false));2961 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.85), false));2962 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0.745), false));2963 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0.85), false));2964 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0.955), false));2965 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.85), false));2966 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.75), false));2967 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));2968 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.25), false));29692970 return (constr);2971};29722973//**********************************************************************************************************************************************************2974//Location2975//**********************************************************************************************************************************************************2976/**2977* Extends mxShape.2978*/2979function mxArchiMate3Location(bounds, fill, stroke, strokewidth)2980{2981 mxShape.call(this);2982 this.bounds = bounds;2983 this.fill = fill;2984 this.stroke = stroke;2985 this.strokewidth = (strokewidth != null) ? strokewidth : 1;2986};29872988/**2989* Extends mxShape.2990*/2991mxUtils.extend(mxArchiMate3Location, mxShape);29922993mxArchiMate3Location.prototype.cst = {2994 LOCATION : 'mxgraph.archimate3.location'2995};29962997/**2998* Function: paintVertexShape2999* 3000* Paints the vertex shape.3001*/3002mxArchiMate3Location.prototype.paintVertexShape = function(c, x, y, w, h)3003{3004 c.translate(x, y);3005 this.background(c, 0, 0, w, h);3006 c.setShadow(false);3007 c.translate(w - 20, 5);3008 this.foreground(c, w - 20, 5, 15, 15);3009};30103011mxArchiMate3Location.prototype.background = function(c, x, y, w, h)3012{3013 c.rect(0, 0, w, h);3014 c.fillAndStroke();3015};30163017mxArchiMate3Location.prototype.foreground = function(c, x, y, w, h)3018{3019 c.setDashed(false);3020 3021 c.translate(3 ,0);3022 w = w - 6;3023 c.begin();3024 c.moveTo(w * 0.5, h);3025 c.arcTo(w * 0.1775, h * 0.3, 0, 0, 0, w * 0.345, h * 0.7);3026 c.arcTo(w * 0.538, h * 0.364, 0, 0, 1, w * 0.5, 0);3027 c.arcTo(w * 0.538, h * 0.364, 0, 0, 1, w * 0.655, h * 0.7);3028 c.arcTo(w * 0.1775, h * 0.3, 0, 0, 0, w * 0.5, h);3029 c.stroke();3030};30313032mxCellRenderer.registerShape(mxArchiMate3Location.prototype.cst.LOCATION, mxArchiMate3Location);30333034//**********************************************************************************************************************************************************3035//Gap3036//**********************************************************************************************************************************************************3037/**3038* Extends mxShape.3039*/3040function mxArchiMate3Gap(bounds, fill, stroke, strokewidth)3041{3042 mxShape.call(this);3043 this.bounds = bounds;3044 this.fill = fill;3045 this.stroke = stroke;3046 this.strokewidth = (strokewidth != null) ? strokewidth : 1;3047};30483049/**3050* Extends mxShape.3051*/3052mxUtils.extend(mxArchiMate3Gap, mxShape);30533054mxArchiMate3Gap.prototype.cst = {3055 GAP : 'mxgraph.archimate3.gap'3056};30573058/**3059* Function: paintVertexShape3060* 3061* Paints the vertex shape.3062*/3063mxArchiMate3Gap.prototype.paintVertexShape = function(c, x, y, w, h)3064{3065 c.translate(x, y);3066 this.background(c, 0, 0, w, h);3067 c.setShadow(false);3068 c.translate(w - 20, 5);3069 this.foreground(c, w - 20, 5, 15, 15);3070};30713072mxArchiMate3Gap.prototype.background = function(c, x, y, w, h)3073{3074 c.begin();3075 c.moveTo(0, 0);3076 c.lineTo(w, 0);3077 c.lineTo(w, h * 0.85);3078 c.arcTo(w * 0.35, h * 0.35, 0, 0, 0, w * 0.5, h * 0.85);3079 c.arcTo(w * 0.35, h * 0.35, 0, 0, 1, 0, h * 0.85);3080 c.close();3081 c.fillAndStroke();3082};30833084mxArchiMate3Gap.prototype.foreground = function(c, x, y, w, h)3085{3086 c.setDashed(false);3087 3088 c.translate(0, 2);3089 h = h - 4;30903091 c.ellipse(w * 0.15, 0, w * 0.7, h);3092 c.stroke();3093 3094 c.begin();3095 c.moveTo(0, h * 0.35);3096 c.lineTo(w, h * 0.35);3097 c.moveTo(0, h * 0.65);3098 c.lineTo(w, h * 0.65);3099 c.stroke();3100};31013102mxCellRenderer.registerShape(mxArchiMate3Gap.prototype.cst.GAP, mxArchiMate3Gap);31033104mxArchiMate3Gap.prototype.getConstraints = function(style, w, h)3105{3106 var constr = [];3107 3108 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));3109 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));3110 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));3111 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));3112 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));3113 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.25), false));3114 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));3115 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.75), false));3116 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.85), false));3117 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0.745), false));3118 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0.85), false));3119 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0.955), false));3120 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.85), false));3121 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.75), false));3122 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));3123 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.25), false));31243125 return (constr);3126};31273128//**********************************************************************************************************************************************************3129//Gap Icon3130//**********************************************************************************************************************************************************3131/**3132* Extends mxShape.3133*/3134function mxArchiMate3GapIcon(bounds, fill, stroke, strokewidth)3135{3136 mxShape.call(this);3137 this.bounds = bounds;3138 this.fill = fill;3139 this.stroke = stroke;3140 this.strokewidth = (strokewidth != null) ? strokewidth : 1;3141};31423143/**3144* Extends mxShape.3145*/3146mxUtils.extend(mxArchiMate3GapIcon, mxShape);31473148mxArchiMate3GapIcon.prototype.cst = {3149 GAP_ICON : 'mxgraph.archimate3.gapIcon'3150};31513152/**3153* Function: paintVertexShape3154* 3155* Paints the vertex shape.3156*/3157mxArchiMate3GapIcon.prototype.paintVertexShape = function(c, x, y, w, h)3158{3159 c.translate(x, y);3160 this.background(c, 0, 0, w, h);3161};31623163mxArchiMate3GapIcon.prototype.background = function(c, x, y, w, h)3164{3165 c.setDashed(false);3166 3167 c.translate(0, 2);3168 h = h - 4;31693170 c.ellipse(w * 0.15, 0, w * 0.7, h);3171 c.fillAndStroke();3172 3173 c.begin();3174 c.moveTo(0, h * 0.35);3175 c.lineTo(w, h * 0.35);3176 c.moveTo(0, h * 0.65);3177 c.lineTo(w, h * 0.65);3178 c.stroke();3179};31803181mxCellRenderer.registerShape(mxArchiMate3GapIcon.prototype.cst.GAP_ICON, mxArchiMate3GapIcon);31823183mxArchiMate3GapIcon.prototype.getConstraints = function(style, w, h)3184{3185 var constr = [];3186 3187 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));3188 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));3189 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));3190 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));3191 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));3192 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.25), false));3193 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));3194 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.75), false));3195 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.85), false));3196 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0.745), false));3197 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0.85), false));3198 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0.955), false));3199 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.85), false));3200 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.75), false));3201 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));3202 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.25), false));32033204 return (constr);3205};32063207//**********************************************************************************************************************************************************3208//Tech3209//**********************************************************************************************************************************************************3210/**3211* Extends mxShape.3212*/3213function mxArchiMate3Tech(bounds, fill, stroke, strokewidth)3214{3215 mxShape.call(this);3216 this.bounds = bounds;3217 this.fill = fill;3218 this.stroke = stroke;3219 this.strokewidth = (strokewidth != null) ? strokewidth : 1;3220};32213222/**3223* Extends mxShape.3224*/3225mxUtils.extend(mxArchiMate3Tech, mxShape);32263227mxArchiMate3Tech.prototype.cst = {3228 TECH : 'mxgraph.archimate3.tech',3229 TYPE : 'techType',3230 DEVICE : 'device',3231 PLATEAU : 'plateau',3232 FACILITY : 'facility',3233 EQUIPMENT : 'equipment',3234 SYS_SW : 'sysSw'3235};32363237/**3238* Function: paintVertexShape3239* 3240* Paints the vertex shape.3241*/3242mxArchiMate3Tech.prototype.paintVertexShape = function(c, x, y, w, h)3243{3244 c.translate(x, y);3245 this.background(c, 0, 0, w, h);3246 c.setShadow(false);3247 c.translate(w - 30, 15);3248 this.foreground(c, w - 30, 15, 15, 15);3249};32503251mxArchiMate3Tech.prototype.background = function(c, x, y, w, h)3252{3253 c.begin();3254 c.moveTo(0, 10);3255 c.lineTo(10, 0);3256 c.lineTo(w, 0);3257 c.lineTo(w, h - 10);3258 c.lineTo(w - 10, h);3259 c.lineTo(0, h);3260 c.close();3261 c.moveTo(0, 10);3262 c.lineTo(w - 10, 10);3263 c.lineTo(w - 10, h);3264 c.moveTo(w, 0);3265 c.lineTo(w - 10, 10);3266 c.fillAndStroke();3267};32683269mxArchiMate3Tech.prototype.foreground = function(c, x, y, w, h)3270{3271 var type = mxUtils.getValue(this.style, mxArchiMate3Tech.prototype.cst.TYPE, mxArchiMate3Tech.prototype.cst.DEVICE);3272 3273 c.setDashed(false);3274 3275 if (type === mxArchiMate3Tech.prototype.cst.PLATEAU)3276 {3277 var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#000000');3278 c.setFillColor(strokeColor);3279 3280 c.rect(w * 0.4, 0, w * 0.6, h * 0.2);3281 c.fill();3282 3283 c.rect(w * 0.2, h * 0.4, w * 0.6, h * 0.2);3284 c.fill();3285 3286 c.rect(0, h * 0.8, w * 0.6, h * 0.2);3287 c.fill();3288 }3289 else if (type === mxArchiMate3Tech.prototype.cst.FACILITY)3290 {3291 c.begin();3292 c.moveTo(0, h);3293 c.lineTo(0, 0);3294 c.lineTo(w * 0.13, 0);3295 c.lineTo(w * 0.13, h * 0.7);3296 c.lineTo(w * 0.42, h * 0.55);3297 c.lineTo(w * 0.42, h * 0.7);3298 c.lineTo(w * 0.71, h * 0.55);3299 c.lineTo(w * 0.71, h * 0.7);3300 c.lineTo(w, h * 0.55);3301 c.lineTo(w, h);3302 c.close();3303 c.stroke();3304 }3305 else if (type === mxArchiMate3Tech.prototype.cst.EQUIPMENT)3306 {3307 c.begin();3308 c.moveTo(w * 0.72, h * 0.38);3309 c.curveTo(w * 0.78, w * 0.38, w * 0.85, h * 0.34, w * 0.85, h * 0.26);3310 c.curveTo(w * 0.85, w * 0.18, w * 0.78, h * 0.14, w * 0.73, h * 0.14);3311 c.curveTo(w * 0.64, w * 0.14, w * 0.59, h * 0.2, w * 0.59, h * 0.26);3312 c.curveTo(w * 0.59, h * 0.33, w * 0.65, w * 0.38, w * 0.72, h * 0.38);3313 c.close();3314 c.moveTo(w * 0.68, h * 0.52);3315 c.lineTo(w * 0.67, h * 0.45);3316 c.lineTo(w * 0.61, h * 0.43);3317 c.lineTo(w * 0.56, h * 0.48);3318 c.lineTo(w * 0.5, h * 0.42);3319 c.lineTo(w * 0.54, h * 0.36);3320 c.lineTo(w * 0.52, h * 0.31);3321 c.lineTo(w * 0.45, h * 0.31);3322 c.lineTo(w * 0.45, h * 0.22);3323 c.lineTo(w * 0.52, h * 0.21);3324 c.lineTo(w * 0.54, h * 0.16);3325 c.lineTo(w * 0.5, h * 0.11);3326 c.lineTo(w * 0.56, h * 0.05);3327 c.lineTo(w * 0.62, h * 0.09);3328 c.lineTo(w * 0.67, h * 0.07);3329 c.lineTo(w * 0.68, 0);3330 c.lineTo(w * 0.77, 0);3331 c.lineTo(w * 0.78, h * 0.07);3332 c.lineTo(w * 0.83, h * 0.09);3333 c.lineTo(w * 0.89, h * 0.05);3334 c.lineTo(w * 0.95, h * 0.11);3335 c.lineTo(w * 0.91, h * 0.16);3336 c.lineTo(w * 0.93, h * 0.21);3337 c.lineTo(w, h * 0.22);3338 c.lineTo(w, h * 0.31);3339 c.lineTo(w * 0.93, h * 0.31);3340 c.lineTo(w * 0.91, h * 0.36);3341 c.lineTo(w * 0.95, h * 0.41);3342 c.lineTo(w * 0.89, h * 0.47);3343 c.lineTo(w * 0.83, h * 0.43);3344 c.lineTo(w * 0.78, h * 0.45);3345 c.lineTo(w * 0.77, h * 0.52);3346 c.lineTo(w * 0.68, h * 0.52);3347 c.close();3348 c.moveTo(w * 0.36, h * 0.81);3349 c.curveTo(w * 0.44, h * 0.81, w * 0.52, h * 0.75, w * 0.52, h * 0.67);3350 c.curveTo(w * 0.52, h * 0.59, w * 0.45, h * 0.51, w * 0.35, h * 0.51);3351 c.curveTo(w * 0.27, h * 0.51, w * 0.19, h * 0.58, w * 0.19, h * 0.67);3352 c.curveTo(w * 0.19, h * 0.74, w * 0.27, h * 0.82, w * 0.36, h * 0.81);3353 c.close();3354 c.moveTo(w * 0.21, h * 0.98);3355 c.lineTo(w * 0.22, h * 0.89);3356 c.lineTo(w * 0.16, h * 0.85);3357 c.lineTo(w * 0.08, h * 0.88);3358 c.lineTo(w * 0.02, h * 0.79);3359 c.lineTo(w * 0.09, h * 0.74);3360 c.lineTo(w * 0.08, h * 0.67);3361 c.lineTo(0, h * 0.63);3362 c.lineTo(w * 0.03, h * 0.53);3363 c.lineTo(w * 0.12, h * 0.54);3364 c.lineTo(w * 0.16, h * 0.48);3365 c.lineTo(w * 0.13, h * 0.4);3366 c.lineTo(w * 0.22, h * 0.35);3367 c.lineTo(w * 0.28, h * 0.42);3368 c.lineTo(w * 0.36, h * 0.41);3369 c.lineTo(w * 0.39, h * 0.33);3370 c.lineTo(w * 0.5, h * 0.36);3371 c.lineTo(w * 0.49, h * 0.45);3372 c.lineTo(w * 0.55, h * 0.49);3373 c.lineTo(w * 0.63, h * 0.45);3374 c.lineTo(w * 0.69, h * 0.54);3375 c.lineTo(w * 0.62, h * 0.6);3376 c.lineTo(w * 0.63, h * 0.67);3377 c.lineTo(w * 0.71, h * 0.7);3378 c.lineTo(w * 0.68, h * 0.8);3379 c.lineTo(w * 0.59, h * 0.79);3380 c.lineTo(w * 0.55, h * 0.85);3381 c.lineTo(w * 0.59, h * 0.79);3382 c.lineTo(w * 0.55, h * 0.85);3383 c.lineTo(w * 0.59, h * 0.93);3384 c.lineTo(w * 0.49, h * 0.98);3385 c.lineTo(w * 0.43, h * 0.91);3386 c.lineTo(w * 0.36, h * 0.92);3387 c.lineTo(w * 0.32, h);3388 c.lineTo(w * 0.21, h * 0.98);3389 c.close();3390 c.stroke();3391 }3392 else if (type === mxArchiMate3Tech.prototype.cst.SYS_SW)3393 {3394 mxArchiMate3SysSw.prototype.background(c, x, y, w, h);3395 }3396 else if (type === mxArchiMate3Tech.prototype.cst.DEVICE)3397 {3398 mxArchiMate3Device.prototype.background(c, x, y, w, h);3399 }3400};34013402mxCellRenderer.registerShape(mxArchiMate3Tech.prototype.cst.TECH, mxArchiMate3Tech);34033404mxArchiMate3Tech.prototype.getConstraints = function(style, w, h)3405{3406 var constr = [];3407 3408 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 10, 0));3409 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));3410 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));3411 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));3412 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));3413 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.25), false));3414 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));3415 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.75), false));3416 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false, null, 0, -10));3417 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false, null, -10, 0));3418 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));3419 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));3420 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));3421 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));3422 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.75), false));3423 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));3424 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.25), false));3425 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, 10));34263427 return (constr);3428};34293430//**********************************************************************************************************************************************************3431//Distribution3432//**********************************************************************************************************************************************************3433/**3434* Extends mxShape.3435*/3436function mxArchiMate3Distribution(bounds, fill, stroke, strokewidth)3437{3438 mxShape.call(this);3439 this.bounds = bounds;3440 this.fill = fill;3441 this.stroke = stroke;3442 this.strokewidth = (strokewidth != null) ? strokewidth : 1;3443};34443445/**3446* Extends mxShape.3447*/3448mxUtils.extend(mxArchiMate3Distribution, mxShape);34493450mxArchiMate3Distribution.prototype.cst = {3451 DISTRIBUTION : 'mxgraph.archimate3.distribution'3452};34533454/**3455* Function: paintVertexShape3456* 3457* Paints the vertex shape.3458*/3459mxArchiMate3Distribution.prototype.paintVertexShape = function(c, x, y, w, h)3460{3461 c.translate(x, y);3462 this.background(c, 0, 0, w, h);3463 c.setShadow(false);3464};34653466mxArchiMate3Distribution.prototype.background = function(c, x, y, w, h)3467{3468 c.begin();3469 c.moveTo(w * 0.1, h * 0.25);3470 c.lineTo(w * 0.9, h * 0.25);3471 c.lineTo(w, h * 0.5);3472 c.lineTo(w * 0.9, h * 0.75);3473 c.lineTo(w * 0.1, h * 0.75);3474 c.lineTo(0, h * 0.5);3475 c.fillAndStroke();3476 c.begin();3477 c.moveTo(w * 0.2, 0);3478 c.lineTo(0, h * 0.5);3479 c.lineTo(w * 0.2, h);3480 c.moveTo(w * 0.8, 0);3481 c.lineTo(w, h * 0.5);3482 c.lineTo(w * 0.8, h);3483 c.stroke();3484};34853486mxCellRenderer.registerShape(mxArchiMate3Distribution.prototype.cst.DISTRIBUTION, mxArchiMate3Distribution);34873488mxArchiMate3Distribution.prototype.getConstraints = function(style, w, h)3489{3490 var constr = [];34913492 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));3493 constr.push(new mxConnectionConstraint(new mxPoint(0.2, 0), false));3494 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0.25), false));3495 constr.push(new mxConnectionConstraint(new mxPoint(0.8, 0), false));3496 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));3497 constr.push(new mxConnectionConstraint(new mxPoint(0.8, 1), false));3498 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0.75), false));3499 constr.push(new mxConnectionConstraint(new mxPoint(0.2, 1), false));3500 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));35013502 return (constr);3503};35043505//**********************************************************************************************************************************************************3506//Resource3507//**********************************************************************************************************************************************************3508/**3509* Extends mxShape.3510*/3511function mxArchiMate3Resource(bounds, fill, stroke, strokewidth)3512{3513 mxShape.call(this);3514 this.bounds = bounds;3515 this.fill = fill;3516 this.stroke = stroke;3517 this.strokewidth = (strokewidth != null) ? strokewidth : 1;3518};35193520/**3521* Extends mxShape.3522*/3523mxUtils.extend(mxArchiMate3Resource, mxShape);35243525mxArchiMate3Resource.prototype.cst = {3526 RESOURCE : 'mxgraph.archimate3.resource'3527};35283529/**3530* Function: paintVertexShape3531* 3532* Paints the vertex shape.3533*/3534mxArchiMate3Resource.prototype.paintVertexShape = function(c, x, y, w, h)3535{3536 c.translate(x, y);3537 this.background(c, 0, 0, w, h);3538 c.setShadow(false);3539};35403541mxArchiMate3Resource.prototype.background = function(c, x, y, w, h)3542{3543 c.begin();3544 c.moveTo(w * 0.51, h * 0.34);3545 c.lineTo(w * 0.51, h * 0.65);3546 c.moveTo(w * 0.35, h * 0.34);3547 c.lineTo(w * 0.35, h * 0.65);3548 c.moveTo(w * 0.19, h * 0.34);3549 c.lineTo(w * 0.19, h * 0.65);3550 c.moveTo(w * 0.91, h * 0.4);3551 c.curveTo(w * 0.93, h * 0.39, w * 0.95, h * 0.39, w * 0.97, h * 0.40);3552 c.curveTo(w * 0.99, h * 0.4, w, h * 0.41, w, h * 0.43);3553 c.curveTo(w, h * 0.48, w, h * 0.52, w, h * 0.57);3554 c.curveTo(w, h * 0.58, w * 0.99, h * 0.59, w * 0.98, h * 0.6);3555 c.curveTo(w * 0.96, h * 0.6, w * 0.93, h * 0.6, w * 0.91, h * 0.6);3556 c.moveTo(0, h * 0.73);3557 c.curveTo(0, h * 0.6, 0, h * 0.43, 0, h * 0.27);3558 c.curveTo(0, h * 0.24, w * 0.03, h * 0.21, w * 0.08, h * 0.21);3559 c.curveTo(w * 0.33, h * 0.2, w * 0.61, h * 0.2, w * 0.84, h * 0.21);3560 c.curveTo(w * 0.88, h * 0.22, w * 0.89, h * 0.24, w * 0.9, h * 0.26);3561 c.curveTo(w * 0.91, h * 0.41, w * 0.91, h * 0.57, w * 0.9, h * 0.72);3562 c.curveTo(w * 0.9, h * 0.74, w * 0.88, h * 0.78, w * 0.83, h * 0.79);3563 c.curveTo(w * 0.57, h * 0.79, w * 0.32, h * 0.79, w * 0.06, h * 0.79);3564 c.curveTo(w * 0.02, h * 0.78, 0, h * 0.76, 0, h * 0.73);3565 c.close();3566 c.fillAndStroke();3567};35683569mxCellRenderer.registerShape(mxArchiMate3Resource.prototype.cst.RESOURCE, mxArchiMate3Resource);35703571//**********************************************************************************************************************************************************3572//Capability3573//**********************************************************************************************************************************************************3574/**3575* Extends mxShape.3576*/3577function mxArchiMate3Capability(bounds, fill, stroke, strokewidth)3578{3579 mxShape.call(this);3580 this.bounds = bounds;3581 this.fill = fill;3582 this.stroke = stroke;3583 this.strokewidth = (strokewidth != null) ? strokewidth : 1;3584};35853586/**3587* Extends mxShape.3588*/3589mxUtils.extend(mxArchiMate3Capability, mxShape);35903591mxArchiMate3Capability.prototype.cst = {3592 CAPABILITY : 'mxgraph.archimate3.capability'3593};35943595/**3596* Function: paintVertexShape3597* 3598* Paints the vertex shape.3599*/3600mxArchiMate3Capability.prototype.paintVertexShape = function(c, x, y, w, h)3601{3602 c.translate(x, y);3603 this.background(c, 0, 0, w, h);3604 c.setShadow(false);3605};36063607mxArchiMate3Capability.prototype.background = function(c, x, y, w, h)3608{3609 c.begin();3610 c.moveTo(w, 0);3611 c.lineTo(w, h);3612 c.lineTo(0, h);3613 c.lineTo(0, h * 0.67);3614 c.lineTo(w * 0.33, h * 0.67);3615 c.lineTo(w * 0.33, h * 0.33);3616 c.lineTo(w * 0.67, h * 0.33);3617 c.lineTo(w * 0.67, 0);3618 c.close();3619 c.moveTo(w * 0.67, h * 0.33);3620 c.lineTo(w, h * 0.33);3621 c.moveTo(w * 0.33, h * 0.67);3622 c.lineTo(w, h * 0.67);3623 c.moveTo(w * 0.33, h * 0.67);3624 c.lineTo(w * 0.33, h);3625 c.moveTo(w * 0.67, h * 0.33);3626 c.lineTo(w * 0.67, h);3627 c.fillAndStroke();3628};36293630mxCellRenderer.registerShape(mxArchiMate3Capability.prototype.cst.CAPABILITY, mxArchiMate3Capability);36313632//**********************************************************************************************************************************************************3633//Course of Action3634//**********************************************************************************************************************************************************3635/**3636* Extends mxShape.3637*/3638function mxArchiMate3Course(bounds, fill, stroke, strokewidth)3639{3640 mxShape.call(this);3641 this.bounds = bounds;3642 this.fill = fill;3643 this.stroke = stroke;3644 this.strokewidth = (strokewidth != null) ? strokewidth : 1;3645};36463647/**3648* Extends mxShape.3649*/3650mxUtils.extend(mxArchiMate3Course, mxShape);36513652mxArchiMate3Course.prototype.cst = {3653 COURSE : 'mxgraph.archimate3.course'3654};36553656/**3657* Function: paintVertexShape3658* 3659* Paints the vertex shape.3660*/3661mxArchiMate3Course.prototype.paintVertexShape = function(c, x, y, w, h)3662{3663 c.translate(x, y);3664 this.background(c, 0, 0, w, h);3665 c.setShadow(false);3666};36673668mxArchiMate3Course.prototype.background = function(c, x, y, w, h)3669{3670 var sw = mxUtils.getValue(this.style, mxConstants.STYLE_STROKEWIDTH, 1);36713672 c.ellipse(w * 0.4, 0, w * 0.6, h * 0.6);3673 c.fillAndStroke();3674 c.ellipse(w * 0.5, h * 0.1, w * 0.4, h * 0.4);3675 c.stroke();3676 3677 c.setStrokeWidth(3 * sw);3678 c.setLineCap('round'); 36793680 c.begin();3681 c.moveTo(0, h);3682 c.arcTo(w * 0.7, h * 0.7, 0, 0, 1, w * 0.41, h * 0.56);3683 c.moveTo(w * 0.14, h * 0.54);3684 c.lineTo(w * 0.41, h * 0.56);3685 c.lineTo(w * 0.3, h * 0.78);3686 c.stroke();3687 3688 var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#000000');3689 c.setFillColor(strokeColor);3690 c.ellipse(w * 0.6, h * 0.2, w * 0.2, h * 0.2);3691 c.fill();36923693/*3694 var sw = mxUtils.getValue(this.style, mxConstants.STYLE_STROKEWIDTH, 1);36953696 c.ellipse(0, w * 0.2, w * 0.8, h * 0.8);3697 c.fillAndStroke();3698 c.ellipse(w * 0.15, w * 0.35, w * 0.5, h * 0.5);3699 c.stroke();3700 c.ellipse(w * 0.3, w * 0.5, w * 0.2, h * 0.2);3701 c.stroke();37023703 c.begin();3704 c.moveTo(w * 0.4, h * 0.6);3705 c.lineTo(w * 0.9, h * 0.1);3706 c.moveTo(w * 0.42, h * 0.4);3707 c.lineTo(w * 0.4, h * 0.6);3708 c.lineTo(w * 0.6, h * 0.58);3709 c.moveTo(w * 0.8, 0);3710 c.lineTo(w * 0.75, h * 0.25);3711 c.lineTo(w, h * 0.2);3712 c.stroke();3713*/3714};37153716mxCellRenderer.registerShape(mxArchiMate3Course.prototype.cst.COURSE, mxArchiMate3Course);37173718//**********************************************************************************************************************************************************3719//Node3720//**********************************************************************************************************************************************************3721/**3722* Extends mxShape.3723*/3724function mxArchiMate3Node(bounds, fill, stroke, strokewidth)3725{3726 mxShape.call(this);3727 this.bounds = bounds;3728 this.fill = fill;3729 this.stroke = stroke;3730 this.strokewidth = (strokewidth != null) ? strokewidth : 1;3731};37323733/**3734* Extends mxShape.3735*/3736mxUtils.extend(mxArchiMate3Node, mxShape);37373738mxArchiMate3Node.prototype.cst = {3739 NODE : 'mxgraph.archimate3.node'3740};37413742/**3743* Function: paintVertexShape3744* 3745* Paints the vertex shape.3746*/3747mxArchiMate3Node.prototype.paintVertexShape = function(c, x, y, w, h)3748{3749 c.translate(x, y);3750 this.background(c, 0, 0, w, h);3751 c.setShadow(false);3752};37533754mxArchiMate3Node.prototype.background = function(c, x, y, w, h)3755{3756 c.begin();3757 c.moveTo(0, h * 0.25);3758 c.lineTo(w * 0.25, 0);3759 c.lineTo(w, 0);3760 c.lineTo(w, h * 0.75);3761 c.lineTo(w * 0.75, h);3762 c.lineTo(0, h);3763 c.close();3764 c.moveTo(0, h * 0.25);3765 c.lineTo(w * 0.75, h * 0.25);3766 c.lineTo(w * 0.75, h);3767 c.moveTo(w, 0);3768 c.lineTo(w * 0.75, h * 0.25);3769 c.fillAndStroke();3770};37713772mxCellRenderer.registerShape(mxArchiMate3Node.prototype.cst.NODE, mxArchiMate3Node);37733774mxArchiMate3Node.prototype.getConstraints = function(style, w, h)3775{3776 var constr = [];37773778 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));3779 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));3780 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));3781 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));3782 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.25), false));3783 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));3784 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.75), false));3785 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));3786 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));3787 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));3788 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));3789 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));3790 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));3791 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));3792 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));3793 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.75), false));3794 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));3795 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.25), false));37963797 return (constr);3798};37993800//**********************************************************************************************************************************************************3801//Network3802//**********************************************************************************************************************************************************3803/**3804* Extends mxShape.3805*/3806function mxArchiMate3Network(bounds, fill, stroke, strokewidth)3807{3808 mxShape.call(this);3809 this.bounds = bounds;3810 this.fill = fill;3811 this.stroke = stroke;3812 this.strokewidth = (strokewidth != null) ? strokewidth : 1;3813};38143815/**3816* Extends mxShape.3817*/3818mxUtils.extend(mxArchiMate3Network, mxShape);38193820mxArchiMate3Network.prototype.cst = {3821 NETWORK : 'mxgraph.archimate3.network'3822};38233824/**3825* Function: paintVertexShape3826* 3827* Paints the vertex shape.3828*/3829mxArchiMate3Network.prototype.paintVertexShape = function(c, x, y, w, h)3830{3831 c.translate(x, y);3832 this.background(c, 0, 0, w, h);3833 c.setShadow(false);3834};38353836mxArchiMate3Network.prototype.background = function(c, x, y, w, h)3837{3838 c.translate(0, 2);3839 h = h - 4;3840 3841 c.begin();3842 c.moveTo(w * 0.4, h * 0.2);3843 c.lineTo(w * 0.85, h * 0.2);3844 c.lineTo(w * 0.6, h * 0.8);3845 c.lineTo(w * 0.15, h * 0.8);3846 c.close();3847 c.stroke();3848 3849 var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#000000');3850 c.setFillColor(strokeColor);3851 3852 c.ellipse(w * 0.25, 0, w * 0.3, h * 0.4);3853 c.fill();3854 3855 c.ellipse(w * 0.7, 0, w * 0.3, h * 0.4);3856 c.fill();3857 3858 c.ellipse(0, h * 0.6, w * 0.3, h * 0.4);3859 c.fill();3860 3861 c.ellipse(w * 0.45, h * 0.6, w * 0.3, h * 0.4);3862 c.fill();3863};38643865mxCellRenderer.registerShape(mxArchiMate3Network.prototype.cst.NETWORK, mxArchiMate3Network);38663867mxArchiMate3Network.prototype.getConstraints = function(style, w, h)3868{3869 var constr = [];38703871 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));3872 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));3873 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));3874 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));3875 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.25), false));3876 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));3877 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.75), false));3878 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));3879 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));3880 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));3881 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));3882 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));3883 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));3884 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));3885 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));3886 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.75), false));3887 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));3888 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.25), false));38893890 return (constr);3891};38923893//**********************************************************************************************************************************************************3894//Device3895//**********************************************************************************************************************************************************3896/**3897* Extends mxShape.3898*/3899function mxArchiMate3Device(bounds, fill, stroke, strokewidth)3900{3901 mxShape.call(this);3902 this.bounds = bounds;3903 this.fill = fill;3904 this.stroke = stroke;3905 this.strokewidth = (strokewidth != null) ? strokewidth : 1;3906};39073908/**3909* Extends mxShape.3910*/3911mxUtils.extend(mxArchiMate3Device, mxShape);39123913mxArchiMate3Device.prototype.cst = {3914 DEVICE : 'mxgraph.archimate3.device'3915};39163917/**3918* Function: paintVertexShape3919* 3920* Paints the vertex shape.3921*/3922mxArchiMate3Device.prototype.paintVertexShape = function(c, x, y, w, h)3923{3924 c.translate(x, y);3925 this.background(c, 0, 0, w, h);3926 c.setShadow(false);3927};39283929mxArchiMate3Device.prototype.background = function(c, x, y, w, h)3930{3931 c.roundrect(0, 0, w, h * 0.88, w * 0.1, h * 0.1);3932 c.fillAndStroke();3933 3934 c.begin();3935 c.moveTo(w * 0.1, h * 0.88);3936 c.lineTo(0, h);3937 c.lineTo(w, h);3938 c.lineTo(w * 0.9, h * 0.88);3939 c.fillAndStroke();3940};39413942mxCellRenderer.registerShape(mxArchiMate3Device.prototype.cst.DEVICE, mxArchiMate3Device);39433944mxArchiMate3Device.prototype.getConstraints = function(style, w, h)3945{3946 var constr = [];39473948 constr.push(new mxConnectionConstraint(new mxPoint(0.03, 0.03), false));3949 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));3950 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));3951 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));3952 constr.push(new mxConnectionConstraint(new mxPoint(0.97, 0.03), false));3953 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.25), false));3954 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));3955 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.75), false));3956 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));3957 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));3958 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));3959 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));3960 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));3961 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.75), false));3962 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));3963 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.25), false));39643965 return (constr);3966};39673968//**********************************************************************************************************************************************************3969//System Software3970//**********************************************************************************************************************************************************3971/**3972* Extends mxShape.3973*/3974function mxArchiMate3SysSw(bounds, fill, stroke, strokewidth)3975{3976 mxShape.call(this);3977 this.bounds = bounds;3978 this.fill = fill;3979 this.stroke = stroke;3980 this.strokewidth = (strokewidth != null) ? strokewidth : 1;3981};39823983/**3984* Extends mxShape.3985*/3986mxUtils.extend(mxArchiMate3SysSw, mxShape);39873988mxArchiMate3SysSw.prototype.cst = {3989 SYS_SW : 'mxgraph.archimate3.sysSw'3990};39913992/**3993* Function: paintVertexShape3994* 3995* Paints the vertex shape.3996*/3997mxArchiMate3SysSw.prototype.paintVertexShape = function(c, x, y, w, h)3998{3999 c.translate(x, y);4000 this.background(c, 0, 0, w, h);4001 c.setShadow(false);4002};40034004mxArchiMate3SysSw.prototype.background = function(c, x, y, w, h)4005{4006 c.ellipse(w * 0.3, 0, w * 0.7, h * 0.7);4007 c.fillAndStroke();4008 4009 c.ellipse(0, h * 0.02, w * 0.98, h * 0.98);4010 c.fillAndStroke();4011};40124013mxCellRenderer.registerShape(mxArchiMate3SysSw.prototype.cst.SYS_SW, mxArchiMate3SysSw);40144015//**********************************************************************************************************************************************************4016//Artifact4017//**********************************************************************************************************************************************************4018/**4019* Extends mxShape.4020*/4021function mxArchiMate3Artifact(bounds, fill, stroke, strokewidth)4022{4023 mxShape.call(this);4024 this.bounds = bounds;4025 this.fill = fill;4026 this.stroke = stroke;4027 this.strokewidth = (strokewidth != null) ? strokewidth : 1;4028};40294030/**4031* Extends mxShape.4032*/4033mxUtils.extend(mxArchiMate3Artifact, mxShape);40344035mxArchiMate3Artifact.prototype.cst = {4036 ARTIFACT : 'mxgraph.archimate3.artifact'4037};40384039/**4040* Function: paintVertexShape4041* 4042* Paints the vertex shape.4043*/4044mxArchiMate3Artifact.prototype.paintVertexShape = function(c, x, y, w, h)4045{4046 c.translate(x, y);4047 this.background(c, 0, 0, w, h);4048 c.setShadow(false);4049};40504051mxArchiMate3Artifact.prototype.background = function(c, x, y, w, h)4052{4053 c.begin();4054 c.moveTo(0, 0);4055 c.lineTo(w * 0.7, 0);4056 c.lineTo(w, h * 0.22);4057 c.lineTo(w, h);4058 c.lineTo(0, h);4059 c.close();4060 c.fillAndStroke();4061 4062 c.begin();4063 c.moveTo(w * 0.7, 0);4064 c.lineTo(w * 0.7, h * 0.22);4065 c.lineTo(w, h * 0.22);4066 c.stroke();4067};40684069mxCellRenderer.registerShape(mxArchiMate3Artifact.prototype.cst.ARTIFACT, mxArchiMate3Artifact);40704071mxArchiMate3Artifact.prototype.getConstraints = function(style, w, h)4072{4073 var constr = [];40744075 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));4076 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));4077 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));4078 constr.push(new mxConnectionConstraint(new mxPoint(0.7, 0), false));4079 constr.push(new mxConnectionConstraint(new mxPoint(0.85, 0.11), false));4080 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.22), false));4081 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));4082 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.75), false));4083 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));4084 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 1), false));4085 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));4086 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 1), false));4087 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));4088 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.75), false));4089 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));4090 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.25), false));40914092 return (constr);4093};40944095//**********************************************************************************************************************************************************4096//Communication Network4097//**********************************************************************************************************************************************************4098/**4099* Extends mxShape.4100*/4101function mxArchiMate3CommNetw(bounds, fill, stroke, strokewidth)4102{4103 mxShape.call(this);4104 this.bounds = bounds;4105 this.fill = fill;4106 this.stroke = stroke;4107 this.strokewidth = (strokewidth != null) ? strokewidth : 1;4108};41094110/**4111* Extends mxShape.4112*/4113mxUtils.extend(mxArchiMate3CommNetw, mxShape);41144115mxArchiMate3CommNetw.prototype.cst = {4116 COMM_NETW : 'mxgraph.archimate3.commNetw'4117};41184119/**4120* Function: paintVertexShape4121* 4122* Paints the vertex shape.4123*/4124mxArchiMate3CommNetw.prototype.paintVertexShape = function(c, x, y, w, h)4125{4126 c.translate(x, y);4127 this.background(c, 0, 0, w, h);4128 c.setShadow(false);4129};41304131mxArchiMate3CommNetw.prototype.background = function(c, x, y, w, h)4132{4133 c.begin();4134 c.moveTo(w * 0.2, h);4135 c.lineTo(0, h * 0.5);4136 c.lineTo(w * 0.2, 0);4137 c.moveTo(w * 0.8, h);4138 c.lineTo(w, h * 0.5);4139 c.lineTo(w * 0.8, 0);4140 c.moveTo(0, h * 0.5);4141 c.lineTo(w, h * 0.5);4142 c.stroke();4143};41444145mxCellRenderer.registerShape(mxArchiMate3CommNetw.prototype.cst.COMM_NETW, mxArchiMate3CommNetw);41464147mxArchiMate3CommNetw.prototype.getConstraints = function(style, w, h)4148{4149 var constr = [];41504151 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));4152 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));41534154 return (constr);4155};41564157//**********************************************************************************************************************************************************4158//Path4159//**********************************************************************************************************************************************************4160/**4161* Extends mxShape.4162*/4163function mxArchiMate3Path(bounds, fill, stroke, strokewidth)4164{4165 mxShape.call(this);4166 this.bounds = bounds;4167 this.fill = fill;4168 this.stroke = stroke;4169 this.strokewidth = (strokewidth != null) ? strokewidth : 1;4170};41714172/**4173* Extends mxShape.4174*/4175mxUtils.extend(mxArchiMate3Path, mxShape);41764177mxArchiMate3Path.prototype.cst = {4178 PATH : 'mxgraph.archimate3.path'4179};41804181/**4182* Function: paintVertexShape4183* 4184* Paints the vertex shape.4185*/4186mxArchiMate3Path.prototype.paintVertexShape = function(c, x, y, w, h)4187{4188 c.translate(x, y);4189 this.background(c, 0, 0, w, h);4190 c.setShadow(false);4191};41924193mxArchiMate3Path.prototype.background = function(c, x, y, w, h)4194{4195 c.begin();4196 c.moveTo(w * 0.2, h);4197 c.lineTo(0, h * 0.5);4198 c.lineTo(w * 0.2, 0);4199 c.moveTo(w * 0.8, h);4200 c.lineTo(w, h * 0.5);4201 c.lineTo(w * 0.8, 0);4202 c.stroke();4203 4204 c.setDashed(true);4205 c.begin();4206 c.moveTo(0, h * 0.5);4207 c.lineTo(w, h * 0.5);4208 c.stroke();4209};42104211mxCellRenderer.registerShape(mxArchiMate3Path.prototype.cst.PATH, mxArchiMate3Path);42124213mxArchiMate3Path.prototype.getConstraints = function(style, w, h)4214{4215 var constr = [];42164217 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));4218 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));42194220 return (constr);4221};42224223//**********************************************************************************************************************************************************4224//Value Stream4225//**********************************************************************************************************************************************************4226/**4227* Extends mxShape.4228*/4229function mxArchiMate3ValueStream(bounds, fill, stroke, strokewidth)4230{4231 mxShape.call(this);4232 this.bounds = bounds;4233 this.fill = fill;4234 this.stroke = stroke;4235 this.strokewidth = (strokewidth != null) ? strokewidth : 1;4236};42374238/**4239* Extends mxShape.4240*/4241mxUtils.extend(mxArchiMate3ValueStream, mxShape);42424243mxArchiMate3ValueStream.prototype.cst = {4244 VALUE_STREAM : 'mxgraph.archimate3.valueStream'4245};42464247/**4248* Function: paintVertexShape4249* 4250* Paints the vertex shape.4251*/4252mxArchiMate3ValueStream.prototype.paintVertexShape = function(c, x, y, w, h)4253{4254 c.translate(x, y);4255 this.background(c, 0, 0, w, h);4256 c.setShadow(false);4257};42584259mxArchiMate3ValueStream.prototype.background = function(c, x, y, w, h)4260{4261 c.begin();4262 c.moveTo(0, 0);4263 c.lineTo(w * 0.75, 0);4264 c.lineTo(w, h * 0.5);4265 c.lineTo(w * 0.75, h);4266 c.lineTo(w * 0, h);4267 c.lineTo(w * 0.25, h * 0.5);4268 c.close();4269 c.fillAndStroke();4270 4271};42724273mxCellRenderer.registerShape(mxArchiMate3ValueStream.prototype.cst.VALUE_STREAM, mxArchiMate3ValueStream);42744275mxArchiMate3ValueStream.prototype.getConstraints = function(style, w, h)4276{4277 var constr = [];42784279 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));4280 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));42814282 return (constr);4283};42844285//**********************************************************************************************************************************************************4286//Work Package4287//**********************************************************************************************************************************************************4288/**4289* Extends mxShape.4290*/4291function mxArchiMate3WorkPackage(bounds, fill, stroke, strokewidth)4292{4293 mxShape.call(this);4294 this.bounds = bounds;4295 this.fill = fill;4296 this.stroke = stroke;4297 this.strokewidth = (strokewidth != null) ? strokewidth : 1;4298};42994300/**4301* Extends mxShape.4302*/4303mxUtils.extend(mxArchiMate3WorkPackage, mxShape);43044305mxArchiMate3WorkPackage.prototype.cst = {4306 WORK_PACKAGE : 'mxgraph.archimate3.workPackage'4307};43084309/**4310* Function: paintVertexShape4311* 4312* Paints the vertex shape.4313*/4314mxArchiMate3WorkPackage.prototype.paintVertexShape = function(c, x, y, w, h)4315{4316 c.translate(x, y);4317 this.background(c, 0, 0, w, h);4318 c.setShadow(false);4319};43204321mxArchiMate3WorkPackage.prototype.background = function(c, x, y, w, h)4322{4323 c.begin();4324 c.moveTo(w * 0.733, h * 0.7765);4325 c.lineTo(w * 0.3308, h * 0.7765);4326 c.curveTo(w * 0.1856, h * 0.7765, w * 0.034, h * 0.6281, w * 0.034, h * 0.3939);4327 c.curveTo(w * 0.0314, h * 0.2015, w * 0.1742, h * 0.0381, w * 0.3308, h * 0.0381);4328 c.curveTo(w * 0.5106, h * 0.0381, w * 0.6267, h * 0.2026, w * 0.6267, h * 0.3939);4329 c.curveTo(w * 0.6267, h * 0.4924, w * 0.5785, h * 0.603, w * 0.4776, h * 0.6743);4330 c.stroke();4331 4332 var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#000000');4333 c.setFillColor(strokeColor);43344335 c.begin();4336 c.moveTo(w * 0.7247, h * 0.908);4337 c.lineTo(w * 0.7247, h * 0.6418);4338 c.lineTo(w * 0.9147, h * 0.7749);4339 c.close();4340 c.fillAndStroke();4341};43424343mxCellRenderer.registerShape(mxArchiMate3WorkPackage.prototype.cst.WORK_PACKAGE, mxArchiMate3WorkPackage);43444345mxArchiMate3WorkPackage.prototype.getConstraints = function(style, w, h)4346{4347 var constr = [];43484349 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));4350 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));43514352 return (constr);4353};