mxEip.js 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. /**
  2. * $Id: mxEip.js,v 1.0 2014/11/27 06:09:21 mate Exp $
  3. * Copyright (c) 2006-2015, JGraph Ltd
  4. */
  5. //**********************************************************************************************************************************************************
  6. //Message Expiration
  7. //**********************************************************************************************************************************************************
  8. /**
  9. * Extends mxShape.
  10. */
  11. function mxShapeEipMessageExpiration(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. };
  19. /**
  20. * Extends mxShape.
  21. */
  22. mxUtils.extend(mxShapeEipMessageExpiration, mxShape);
  23. mxShapeEipMessageExpiration.prototype.cst = {
  24. SHAPE_MESS_EXP : 'mxgraph.eip.messExp'
  25. };
  26. /**
  27. * Function: paintVertexShape
  28. *
  29. * Paints the vertex shape.
  30. */
  31. mxShapeEipMessageExpiration.prototype.paintVertexShape = function(c, x, y, w, h)
  32. {
  33. c.translate(x, y);
  34. this.background(c, x, y, w, h);
  35. };
  36. mxShapeEipMessageExpiration.prototype.background = function(c, x, y, w, h)
  37. {
  38. c.ellipse(0, 0, w, h);
  39. c.stroke();
  40. c.setStrokeColor("#808080");
  41. c.begin();
  42. c.moveTo(w * 0.5, h * 0.1);
  43. c.lineTo(w * 0.5, h * 0.5);
  44. c.lineTo(w * 0.6, h * 0.8);
  45. c.stroke();
  46. };
  47. mxCellRenderer.prototype.defaultShapes[mxShapeEipMessageExpiration.prototype.cst.SHAPE_MESS_EXP] = mxShapeEipMessageExpiration;
  48. //**********************************************************************************************************************************************************
  49. //Return Address
  50. //**********************************************************************************************************************************************************
  51. /**
  52. * Extends mxShape.
  53. */
  54. function mxShapeEipReturnAddress(bounds, fill, stroke, strokewidth)
  55. {
  56. mxShape.call(this);
  57. this.bounds = bounds;
  58. this.fill = fill;
  59. this.stroke = stroke;
  60. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  61. };
  62. /**
  63. * Extends mxShape.
  64. */
  65. mxUtils.extend(mxShapeEipReturnAddress, mxShape);
  66. mxShapeEipReturnAddress.prototype.cst = {
  67. SHAPE_RET_ADDR : 'mxgraph.eip.retAddr'
  68. };
  69. /**
  70. * Function: paintVertexShape
  71. *
  72. * Paints the vertex shape.
  73. */
  74. mxShapeEipReturnAddress.prototype.paintVertexShape = function(c, x, y, w, h)
  75. {
  76. c.translate(x, y);
  77. this.background(c, x, y, w, h);
  78. c.setShadow(false);
  79. this.foreground(c, x, y, w, h);
  80. };
  81. mxShapeEipReturnAddress.prototype.background = function(c, x, y, w, h)
  82. {
  83. c.rect(0, 0, w, h);
  84. c.fillAndStroke();
  85. };
  86. mxShapeEipReturnAddress.prototype.foreground = function(c, x, y, w, h)
  87. {
  88. c.begin();
  89. c.moveTo(w * 0.05, h * 0.11);
  90. c.lineTo(w * 0.25, h * 0.11);
  91. c.moveTo(w * 0.05, h * 0.18);
  92. c.lineTo(w * 0.25, h * 0.18);
  93. c.moveTo(w * 0.05, h * 0.25);
  94. c.lineTo(w * 0.25, h * 0.25);
  95. c.setStrokeWidth(2);
  96. c.moveTo(w * 0.3, h * 0.63);
  97. c.lineTo(w * 0.8, h * 0.63);
  98. c.moveTo(w * 0.3, h * 0.72);
  99. c.lineTo(w * 0.8, h * 0.72);
  100. c.moveTo(w * 0.3, h * 0.80);
  101. c.lineTo(w * 0.8, h * 0.80);
  102. c.stroke();
  103. c.setFillColor("#EDEDED");
  104. c.rect(w * 0.8, h * 0.1, w * 0.12, h * 0.19);
  105. c.fillAndStroke();
  106. };
  107. mxCellRenderer.prototype.defaultShapes[mxShapeEipReturnAddress.prototype.cst.SHAPE_RET_ADDR] = mxShapeEipReturnAddress;
  108. //**********************************************************************************************************************************************************
  109. //Anchor
  110. //**********************************************************************************************************************************************************
  111. /**
  112. * Extends mxShape.
  113. */
  114. function mxShapeEipAnchor(bounds, fill, stroke, strokewidth)
  115. {
  116. mxShape.call(this);
  117. this.bounds = bounds;
  118. this.fill = fill;
  119. this.stroke = stroke;
  120. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  121. };
  122. /**
  123. * Extends mxShape.
  124. */
  125. mxUtils.extend(mxShapeEipAnchor, mxShape);
  126. mxShapeEipAnchor.prototype.cst = {
  127. SHAPE_ANCHOR : 'mxgraph.eip.anchor'
  128. };
  129. /**
  130. * Function: paintVertexShape
  131. *
  132. * Paints the vertex shape.
  133. */
  134. mxShapeEipAnchor.prototype.paintVertexShape = function(c, x, y, w, h)
  135. {
  136. };
  137. mxCellRenderer.prototype.defaultShapes[mxShapeEipAnchor.prototype.cst.SHAPE_ANCHOR] = mxShapeEipAnchor;
  138. //**********************************************************************************************************************************************************
  139. //Message Channel
  140. //**********************************************************************************************************************************************************
  141. /**
  142. * Extends mxShape.
  143. */
  144. function mxShapeEipMessageChannel(bounds, fill, stroke, strokewidth)
  145. {
  146. mxShape.call(this);
  147. this.bounds = bounds;
  148. this.fill = fill;
  149. this.stroke = stroke;
  150. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  151. };
  152. /**
  153. * Extends mxShape.
  154. */
  155. mxUtils.extend(mxShapeEipMessageChannel, mxShape);
  156. mxShapeEipMessageChannel.prototype.cst = {
  157. SHAPE_MESSAGE_CHANNEL : 'mxgraph.eip.messageChannel'
  158. };
  159. /**
  160. * Function: paintVertexShape
  161. *
  162. * Paints the vertex shape.
  163. */
  164. mxShapeEipMessageChannel.prototype.paintVertexShape = function(c, x, y, w, h)
  165. {
  166. c.translate(x, y);
  167. this.background(c, x, y, w, h);
  168. c.setShadow(false);
  169. this.foreground(c, x, y, w, h);
  170. };
  171. mxShapeEipMessageChannel.prototype.background = function(c, x, y, w, h)
  172. {
  173. c.setGradient('#e6e6e6', '#808080', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
  174. c.begin();
  175. c.moveTo(8, h * 0.5 + 10);
  176. c.arcTo(12, 12, 0, 0, 1, 8, h * 0.5 - 10);
  177. c.lineTo(w - 8, h * 0.5 - 10);
  178. c.arcTo(12, 12, 0, 0, 1, w - 8, h * 0.5 + 10);
  179. c.close();
  180. c.fillAndStroke();
  181. };
  182. mxShapeEipMessageChannel.prototype.foreground = function(c, x, y, w, h)
  183. {
  184. c.setFillColor('#e6e6e6');
  185. c.begin();
  186. c.moveTo(w - 8, h * 0.5 - 10);
  187. c.arcTo(12, 12, 0, 0, 1, w - 8, h * 0.5 + 10);
  188. c.arcTo(12, 12, 0, 0, 1, w - 8, h * 0.5 - 10);
  189. c.fillAndStroke();
  190. };
  191. mxCellRenderer.prototype.defaultShapes[mxShapeEipMessageChannel.prototype.cst.SHAPE_MESSAGE_CHANNEL] = mxShapeEipMessageChannel;
  192. mxShapeEipMessageChannel.prototype.constraints = [
  193. new mxConnectionConstraint(new mxPoint(0, 0.5), true),
  194. new mxConnectionConstraint(new mxPoint(1, 0.5), true),
  195. new mxConnectionConstraint(new mxPoint(0.05, 0), true),
  196. new mxConnectionConstraint(new mxPoint(0.1, 0), true),
  197. new mxConnectionConstraint(new mxPoint(0.15, 0), true),
  198. new mxConnectionConstraint(new mxPoint(0.2, 0), true),
  199. new mxConnectionConstraint(new mxPoint(0.25, 0), true),
  200. new mxConnectionConstraint(new mxPoint(0.3, 0), true),
  201. new mxConnectionConstraint(new mxPoint(0.35, 0), true),
  202. new mxConnectionConstraint(new mxPoint(0.4, 0), true),
  203. new mxConnectionConstraint(new mxPoint(0.45, 0), true),
  204. new mxConnectionConstraint(new mxPoint(0.5, 0), true),
  205. new mxConnectionConstraint(new mxPoint(0.55, 0), true),
  206. new mxConnectionConstraint(new mxPoint(0.6, 0), true),
  207. new mxConnectionConstraint(new mxPoint(0.65, 0), true),
  208. new mxConnectionConstraint(new mxPoint(0.7, 0), true),
  209. new mxConnectionConstraint(new mxPoint(0.75, 0), true),
  210. new mxConnectionConstraint(new mxPoint(0.8, 0), true),
  211. new mxConnectionConstraint(new mxPoint(0.85, 0), true),
  212. new mxConnectionConstraint(new mxPoint(0.9, 0), true),
  213. new mxConnectionConstraint(new mxPoint(0.95, 0), true),
  214. new mxConnectionConstraint(new mxPoint(0.05, 1), true),
  215. new mxConnectionConstraint(new mxPoint(0.1, 1), true),
  216. new mxConnectionConstraint(new mxPoint(0.15, 1), true),
  217. new mxConnectionConstraint(new mxPoint(0.2, 1), true),
  218. new mxConnectionConstraint(new mxPoint(0.25, 1), true),
  219. new mxConnectionConstraint(new mxPoint(0.3, 1), true),
  220. new mxConnectionConstraint(new mxPoint(0.35, 1), true),
  221. new mxConnectionConstraint(new mxPoint(0.4, 1), true),
  222. new mxConnectionConstraint(new mxPoint(0.45, 1), true),
  223. new mxConnectionConstraint(new mxPoint(0.5, 1), true),
  224. new mxConnectionConstraint(new mxPoint(0.55, 1), true),
  225. new mxConnectionConstraint(new mxPoint(0.6, 1), true),
  226. new mxConnectionConstraint(new mxPoint(0.65, 1), true),
  227. new mxConnectionConstraint(new mxPoint(0.7, 1), true),
  228. new mxConnectionConstraint(new mxPoint(0.75, 1), true),
  229. new mxConnectionConstraint(new mxPoint(0.8, 1), true),
  230. new mxConnectionConstraint(new mxPoint(0.85, 1), true),
  231. new mxConnectionConstraint(new mxPoint(0.9, 1), true),
  232. new mxConnectionConstraint(new mxPoint(0.95, 1), true)
  233. ];
  234. //**********************************************************************************************************************************************************
  235. //Datatype Channel
  236. //**********************************************************************************************************************************************************
  237. /**
  238. * Extends mxShape.
  239. */
  240. function mxShapeEipDatatypeChannel(bounds, fill, stroke, strokewidth)
  241. {
  242. mxShape.call(this);
  243. this.bounds = bounds;
  244. this.fill = fill;
  245. this.stroke = stroke;
  246. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  247. };
  248. /**
  249. * Extends mxShape.
  250. */
  251. mxUtils.extend(mxShapeEipDatatypeChannel, mxShape);
  252. mxShapeEipDatatypeChannel.prototype.cst = {
  253. SHAPE_DATATYPE_CHANNEL : 'mxgraph.eip.dataChannel'
  254. };
  255. /**
  256. * Function: paintVertexShape
  257. *
  258. * Paints the vertex shape.
  259. */
  260. mxShapeEipDatatypeChannel.prototype.paintVertexShape = function(c, x, y, w, h)
  261. {
  262. c.translate(x, y);
  263. this.background(c, x, y, w, h);
  264. c.setShadow(false);
  265. this.foreground(c, x, y, w, h);
  266. };
  267. mxShapeEipDatatypeChannel.prototype.background = function(c, x, y, w, h)
  268. {
  269. c.setGradient('#e6e6e6', '#808080', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
  270. c.begin();
  271. c.moveTo(8, h * 0.5 + 10);
  272. c.arcTo(12, 12, 0, 0, 1, 8, h * 0.5 - 10);
  273. c.lineTo(w - 8, h * 0.5 - 10);
  274. c.arcTo(12, 12, 0, 0, 1, w - 8, h * 0.5 + 10);
  275. c.close();
  276. c.fillAndStroke();
  277. };
  278. mxShapeEipDatatypeChannel.prototype.foreground = function(c, x, y, w, h)
  279. {
  280. c.setFillColor('#e6e6e6');
  281. c.begin();
  282. c.moveTo(w - 8, h * 0.5 - 10);
  283. c.arcTo(12, 12, 0, 0, 1, w - 8, h * 0.5 + 10);
  284. c.arcTo(12, 12, 0, 0, 1, w - 8, h * 0.5 - 10);
  285. c.fillAndStroke();
  286. c.setFillColor("#fffbc0");
  287. c.setStrokeWidth("1");
  288. for(var i = 1; i * 20 + 10 < w - 14; i++)
  289. {
  290. c.rect(i * 20, h * 0.5 - 5, 10, 10);
  291. c.fillAndStroke();
  292. };
  293. };
  294. mxCellRenderer.prototype.defaultShapes[mxShapeEipDatatypeChannel.prototype.cst.SHAPE_DATATYPE_CHANNEL] = mxShapeEipDatatypeChannel;
  295. mxShapeEipDatatypeChannel.prototype.constraints = [
  296. new mxConnectionConstraint(new mxPoint(0, 0.5), true),
  297. new mxConnectionConstraint(new mxPoint(1, 0.5), true),
  298. new mxConnectionConstraint(new mxPoint(0.05, 0), true),
  299. new mxConnectionConstraint(new mxPoint(0.1, 0), true),
  300. new mxConnectionConstraint(new mxPoint(0.15, 0), true),
  301. new mxConnectionConstraint(new mxPoint(0.2, 0), true),
  302. new mxConnectionConstraint(new mxPoint(0.25, 0), true),
  303. new mxConnectionConstraint(new mxPoint(0.3, 0), true),
  304. new mxConnectionConstraint(new mxPoint(0.35, 0), true),
  305. new mxConnectionConstraint(new mxPoint(0.4, 0), true),
  306. new mxConnectionConstraint(new mxPoint(0.45, 0), true),
  307. new mxConnectionConstraint(new mxPoint(0.5, 0), true),
  308. new mxConnectionConstraint(new mxPoint(0.55, 0), true),
  309. new mxConnectionConstraint(new mxPoint(0.6, 0), true),
  310. new mxConnectionConstraint(new mxPoint(0.65, 0), true),
  311. new mxConnectionConstraint(new mxPoint(0.7, 0), true),
  312. new mxConnectionConstraint(new mxPoint(0.75, 0), true),
  313. new mxConnectionConstraint(new mxPoint(0.8, 0), true),
  314. new mxConnectionConstraint(new mxPoint(0.85, 0), true),
  315. new mxConnectionConstraint(new mxPoint(0.9, 0), true),
  316. new mxConnectionConstraint(new mxPoint(0.95, 0), true),
  317. new mxConnectionConstraint(new mxPoint(0.05, 1), true),
  318. new mxConnectionConstraint(new mxPoint(0.1, 1), true),
  319. new mxConnectionConstraint(new mxPoint(0.15, 1), true),
  320. new mxConnectionConstraint(new mxPoint(0.2, 1), true),
  321. new mxConnectionConstraint(new mxPoint(0.25, 1), true),
  322. new mxConnectionConstraint(new mxPoint(0.3, 1), true),
  323. new mxConnectionConstraint(new mxPoint(0.35, 1), true),
  324. new mxConnectionConstraint(new mxPoint(0.4, 1), true),
  325. new mxConnectionConstraint(new mxPoint(0.45, 1), true),
  326. new mxConnectionConstraint(new mxPoint(0.5, 1), true),
  327. new mxConnectionConstraint(new mxPoint(0.55, 1), true),
  328. new mxConnectionConstraint(new mxPoint(0.6, 1), true),
  329. new mxConnectionConstraint(new mxPoint(0.65, 1), true),
  330. new mxConnectionConstraint(new mxPoint(0.7, 1), true),
  331. new mxConnectionConstraint(new mxPoint(0.75, 1), true),
  332. new mxConnectionConstraint(new mxPoint(0.8, 1), true),
  333. new mxConnectionConstraint(new mxPoint(0.85, 1), true),
  334. new mxConnectionConstraint(new mxPoint(0.9, 1), true),
  335. new mxConnectionConstraint(new mxPoint(0.95, 1), true)
  336. ];
  337. //**********************************************************************************************************************************************************
  338. //Dead Letter Channel
  339. //**********************************************************************************************************************************************************
  340. /**
  341. * Extends mxShape.
  342. */
  343. function mxShapeEipDeadLetterChannel(bounds, fill, stroke, strokewidth)
  344. {
  345. mxShape.call(this);
  346. this.bounds = bounds;
  347. this.fill = fill;
  348. this.stroke = stroke;
  349. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  350. };
  351. /**
  352. * Extends mxShape.
  353. */
  354. mxUtils.extend(mxShapeEipDeadLetterChannel, mxShape);
  355. mxShapeEipDeadLetterChannel.prototype.cst = {
  356. SHAPE_DEAD_LETTER_CHANNEL : 'mxgraph.eip.deadLetterChannel'
  357. };
  358. /**
  359. * Function: paintVertexShape
  360. *
  361. * Paints the vertex shape.
  362. */
  363. mxShapeEipDeadLetterChannel.prototype.paintVertexShape = function(c, x, y, w, h)
  364. {
  365. c.translate(x, y);
  366. this.background(c, x, y, w, h);
  367. c.setShadow(false);
  368. this.foreground(c, x, y, w, h);
  369. };
  370. mxShapeEipDeadLetterChannel.prototype.background = function(c, x, y, w, h)
  371. {
  372. c.setGradient('#e6e6e6', '#808080', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
  373. c.begin();
  374. c.moveTo(8, h * 0.5 + 10);
  375. c.arcTo(12, 12, 0, 0, 1, 8, h * 0.5 - 10);
  376. c.lineTo(w - 8, h * 0.5 - 10);
  377. c.arcTo(12, 12, 0, 0, 1, w - 8, h * 0.5 + 10);
  378. c.close();
  379. c.fillAndStroke();
  380. };
  381. mxShapeEipDeadLetterChannel.prototype.foreground = function(c, x, y, w, h)
  382. {
  383. c.setFillColor('#e6e6e6');
  384. c.begin();
  385. c.moveTo(w - 8, h * 0.5 - 10);
  386. c.arcTo(12, 12, 0, 0, 1, w - 8, h * 0.5 + 10);
  387. c.arcTo(12, 12, 0, 0, 1, w - 8, h * 0.5 - 10);
  388. c.fillAndStroke();
  389. c.setFillColor("#ff0000");
  390. c.setStrokeWidth("1");
  391. c.begin();
  392. c.moveTo(w * 0.5 - 6, h * 0.5 - 3);
  393. c.lineTo(w * 0.5 - 3, h * 0.5 - 6);
  394. c.lineTo(w * 0.5 + 3, h * 0.5 - 6);
  395. c.lineTo(w * 0.5 + 6, h * 0.5 - 3);
  396. c.lineTo(w * 0.5 + 6, h * 0.5 + 3);
  397. c.lineTo(w * 0.5 + 3, h * 0.5 + 6);
  398. c.lineTo(w * 0.5 - 3, h * 0.5 + 6);
  399. c.lineTo(w * 0.5 - 6, h * 0.5 + 3);
  400. c.close();
  401. c.fillAndStroke();
  402. c.setStrokeWidth("2");
  403. c.setStrokeColor("#ffffff");
  404. c.begin();
  405. c.moveTo(w * 0.5 - 4, h * 0.5);
  406. c.lineTo(w * 0.5 + 4, h * 0.5);
  407. c.stroke();
  408. };
  409. mxCellRenderer.prototype.defaultShapes[mxShapeEipDeadLetterChannel.prototype.cst.SHAPE_DEAD_LETTER_CHANNEL] = mxShapeEipDeadLetterChannel;
  410. mxShapeEipDeadLetterChannel.prototype.constraints = [
  411. new mxConnectionConstraint(new mxPoint(0, 0.5), true),
  412. new mxConnectionConstraint(new mxPoint(1, 0.5), true),
  413. new mxConnectionConstraint(new mxPoint(0.05, 0), true),
  414. new mxConnectionConstraint(new mxPoint(0.1, 0), true),
  415. new mxConnectionConstraint(new mxPoint(0.15, 0), true),
  416. new mxConnectionConstraint(new mxPoint(0.2, 0), true),
  417. new mxConnectionConstraint(new mxPoint(0.25, 0), true),
  418. new mxConnectionConstraint(new mxPoint(0.3, 0), true),
  419. new mxConnectionConstraint(new mxPoint(0.35, 0), true),
  420. new mxConnectionConstraint(new mxPoint(0.4, 0), true),
  421. new mxConnectionConstraint(new mxPoint(0.45, 0), true),
  422. new mxConnectionConstraint(new mxPoint(0.5, 0), true),
  423. new mxConnectionConstraint(new mxPoint(0.55, 0), true),
  424. new mxConnectionConstraint(new mxPoint(0.6, 0), true),
  425. new mxConnectionConstraint(new mxPoint(0.65, 0), true),
  426. new mxConnectionConstraint(new mxPoint(0.7, 0), true),
  427. new mxConnectionConstraint(new mxPoint(0.75, 0), true),
  428. new mxConnectionConstraint(new mxPoint(0.8, 0), true),
  429. new mxConnectionConstraint(new mxPoint(0.85, 0), true),
  430. new mxConnectionConstraint(new mxPoint(0.9, 0), true),
  431. new mxConnectionConstraint(new mxPoint(0.95, 0), true),
  432. new mxConnectionConstraint(new mxPoint(0.05, 1), true),
  433. new mxConnectionConstraint(new mxPoint(0.1, 1), true),
  434. new mxConnectionConstraint(new mxPoint(0.15, 1), true),
  435. new mxConnectionConstraint(new mxPoint(0.2, 1), true),
  436. new mxConnectionConstraint(new mxPoint(0.25, 1), true),
  437. new mxConnectionConstraint(new mxPoint(0.3, 1), true),
  438. new mxConnectionConstraint(new mxPoint(0.35, 1), true),
  439. new mxConnectionConstraint(new mxPoint(0.4, 1), true),
  440. new mxConnectionConstraint(new mxPoint(0.45, 1), true),
  441. new mxConnectionConstraint(new mxPoint(0.5, 1), true),
  442. new mxConnectionConstraint(new mxPoint(0.55, 1), true),
  443. new mxConnectionConstraint(new mxPoint(0.6, 1), true),
  444. new mxConnectionConstraint(new mxPoint(0.65, 1), true),
  445. new mxConnectionConstraint(new mxPoint(0.7, 1), true),
  446. new mxConnectionConstraint(new mxPoint(0.75, 1), true),
  447. new mxConnectionConstraint(new mxPoint(0.8, 1), true),
  448. new mxConnectionConstraint(new mxPoint(0.85, 1), true),
  449. new mxConnectionConstraint(new mxPoint(0.9, 1), true),
  450. new mxConnectionConstraint(new mxPoint(0.95, 1), true)
  451. ];
  452. //**********************************************************************************************************************************************************
  453. //Invalid Message Channel
  454. //**********************************************************************************************************************************************************
  455. /**
  456. * Extends mxShape.
  457. */
  458. function mxShapeEipInvalidMessageChannel(bounds, fill, stroke, strokewidth)
  459. {
  460. mxShape.call(this);
  461. this.bounds = bounds;
  462. this.fill = fill;
  463. this.stroke = stroke;
  464. this.strokewidth = (strokewidth != null) ? strokewidth : 1;
  465. };
  466. /**
  467. * Extends mxShape.
  468. */
  469. mxUtils.extend(mxShapeEipInvalidMessageChannel, mxShape);
  470. mxShapeEipInvalidMessageChannel.prototype.cst = {
  471. SHAPE_INVALID_MESSAGE_CHANNEL : 'mxgraph.eip.invalidMessageChannel'
  472. };
  473. /**
  474. * Function: paintVertexShape
  475. *
  476. * Paints the vertex shape.
  477. */
  478. mxShapeEipInvalidMessageChannel.prototype.paintVertexShape = function(c, x, y, w, h)
  479. {
  480. c.translate(x, y);
  481. this.background(c, x, y, w, h);
  482. c.setShadow(false);
  483. this.foreground(c, x, y, w, h);
  484. };
  485. mxShapeEipInvalidMessageChannel.prototype.background = function(c, x, y, w, h)
  486. {
  487. c.setGradient('#e6e6e6', '#808080', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
  488. c.begin();
  489. c.moveTo(8, h * 0.5 + 10);
  490. c.arcTo(12, 12, 0, 0, 1, 8, h * 0.5 - 10);
  491. c.lineTo(w - 8, h * 0.5 - 10);
  492. c.arcTo(12, 12, 0, 0, 1, w - 8, h * 0.5 + 10);
  493. c.close();
  494. c.fillAndStroke();
  495. };
  496. mxShapeEipInvalidMessageChannel.prototype.foreground = function(c, x, y, w, h)
  497. {
  498. c.setFillColor('#e6e6e6');
  499. c.begin();
  500. c.moveTo(w - 8, h * 0.5 - 10);
  501. c.arcTo(12, 12, 0, 0, 1, w - 8, h * 0.5 + 10);
  502. c.arcTo(12, 12, 0, 0, 1, w - 8, h * 0.5 - 10);
  503. c.fillAndStroke();
  504. c.setFillColor("#ffe040");
  505. c.setStrokeWidth("1");
  506. c.begin();
  507. c.moveTo(w * 0.5 - 6, h * 0.5 + 5);
  508. c.lineTo(w * 0.5, h * 0.5 - 5);
  509. c.lineTo(w * 0.5 + 6, h * 0.5 + 5);
  510. c.close();
  511. c.fillAndStroke();
  512. c.setStrokeWidth("1");
  513. c.begin();
  514. c.moveTo(w * 0.5, h * 0.5 - 2);
  515. c.lineTo(w * 0.5, h * 0.5 + 2);
  516. c.moveTo(w * 0.5, h * 0.5 + 3);
  517. c.lineTo(w * 0.5, h * 0.5 + 4);
  518. c.stroke();
  519. };
  520. mxCellRenderer.prototype.defaultShapes[mxShapeEipInvalidMessageChannel.prototype.cst.SHAPE_INVALID_MESSAGE_CHANNEL] = mxShapeEipInvalidMessageChannel;
  521. mxShapeEipInvalidMessageChannel.prototype.constraints = [
  522. new mxConnectionConstraint(new mxPoint(0, 0.5), true),
  523. new mxConnectionConstraint(new mxPoint(1, 0.5), true),
  524. new mxConnectionConstraint(new mxPoint(0.05, 0), true),
  525. new mxConnectionConstraint(new mxPoint(0.1, 0), true),
  526. new mxConnectionConstraint(new mxPoint(0.15, 0), true),
  527. new mxConnectionConstraint(new mxPoint(0.2, 0), true),
  528. new mxConnectionConstraint(new mxPoint(0.25, 0), true),
  529. new mxConnectionConstraint(new mxPoint(0.3, 0), true),
  530. new mxConnectionConstraint(new mxPoint(0.35, 0), true),
  531. new mxConnectionConstraint(new mxPoint(0.4, 0), true),
  532. new mxConnectionConstraint(new mxPoint(0.45, 0), true),
  533. new mxConnectionConstraint(new mxPoint(0.5, 0), true),
  534. new mxConnectionConstraint(new mxPoint(0.55, 0), true),
  535. new mxConnectionConstraint(new mxPoint(0.6, 0), true),
  536. new mxConnectionConstraint(new mxPoint(0.65, 0), true),
  537. new mxConnectionConstraint(new mxPoint(0.7, 0), true),
  538. new mxConnectionConstraint(new mxPoint(0.75, 0), true),
  539. new mxConnectionConstraint(new mxPoint(0.8, 0), true),
  540. new mxConnectionConstraint(new mxPoint(0.85, 0), true),
  541. new mxConnectionConstraint(new mxPoint(0.9, 0), true),
  542. new mxConnectionConstraint(new mxPoint(0.95, 0), true),
  543. new mxConnectionConstraint(new mxPoint(0.05, 1), true),
  544. new mxConnectionConstraint(new mxPoint(0.1, 1), true),
  545. new mxConnectionConstraint(new mxPoint(0.15, 1), true),
  546. new mxConnectionConstraint(new mxPoint(0.2, 1), true),
  547. new mxConnectionConstraint(new mxPoint(0.25, 1), true),
  548. new mxConnectionConstraint(new mxPoint(0.3, 1), true),
  549. new mxConnectionConstraint(new mxPoint(0.35, 1), true),
  550. new mxConnectionConstraint(new mxPoint(0.4, 1), true),
  551. new mxConnectionConstraint(new mxPoint(0.45, 1), true),
  552. new mxConnectionConstraint(new mxPoint(0.5, 1), true),
  553. new mxConnectionConstraint(new mxPoint(0.55, 1), true),
  554. new mxConnectionConstraint(new mxPoint(0.6, 1), true),
  555. new mxConnectionConstraint(new mxPoint(0.65, 1), true),
  556. new mxConnectionConstraint(new mxPoint(0.7, 1), true),
  557. new mxConnectionConstraint(new mxPoint(0.75, 1), true),
  558. new mxConnectionConstraint(new mxPoint(0.8, 1), true),
  559. new mxConnectionConstraint(new mxPoint(0.85, 1), true),
  560. new mxConnectionConstraint(new mxPoint(0.9, 1), true),
  561. new mxConnectionConstraint(new mxPoint(0.95, 1), true)
  562. ];