wfgraph-commons.xml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <mxGraph alternateEdgeStyle="verticalEdge" dropEnabled="1">
  2. <add as="isAutoSizeCell"><![CDATA[
  3. function(cell)
  4. {
  5. return this.isSwimlane(cell);
  6. }
  7. ]]></add>
  8. <add as="isSwimlane"><![CDATA[
  9. function (cell)
  10. {
  11. return mxUtils.isNode(this.model.getValue(cell), 'swimlane');
  12. }
  13. ]]></add>
  14. <add as="isAllowOverlapParent"><![CDATA[
  15. function(cell)
  16. {
  17. return !this.isSwimlane(cell.parent);
  18. }
  19. ]]></add>
  20. <add as="getTooltipForCell"><![CDATA[
  21. function(cell)
  22. {
  23. var href = cell.getAttribute('href');
  24. href = (href != null && href.length > 0) ?
  25. '<br>'+href : '';
  26. var maxlen = 30;
  27. var desc = cell.getAttribute('description');
  28. if (desc == null || desc.length == 0)
  29. {
  30. desc = '';
  31. }
  32. else if (desc.length < maxlen)
  33. {
  34. desc = '<br>'+desc;
  35. }
  36. else
  37. {
  38. desc = '<br>'+desc.substring(0, maxlen)+'...';
  39. }
  40. return '<b>'+cell.getAttribute('label')+
  41. '</b> ('+cell.getId()+')'+href+desc+
  42. '<br>Edges: '+cell.getEdgeCount()+
  43. '<br>Children: '+cell.getChildCount();
  44. }
  45. ]]></add>
  46. <add as="convertValueToString">
  47. function(cell)
  48. {
  49. return cell.getAttribute('label');
  50. }
  51. </add>
  52. <mxGraphModel as="model">
  53. <add as="valueForCellChanged"><![CDATA[
  54. function(cell, value)
  55. {
  56. var previous = null;
  57. if (isNaN(value.nodeType))
  58. {
  59. previous = cell.getAttribute('label');
  60. cell.setAttribute('label', value);
  61. }
  62. else
  63. {
  64. previous = cell.value;
  65. cell.value = value;
  66. }
  67. return previous;
  68. }
  69. ]]></add>
  70. <root>
  71. <MultiSql label="MySQl" description="" id="0"/>
  72. <Layer label="Default Layer">
  73. <mxCell parent="0"/>
  74. </Layer>
  75. </root>
  76. </mxGraphModel>
  77. <mxStylesheet as="stylesheet">
  78. <add as="defaultVertex">
  79. <add as="shape" value="label"/>
  80. <add as="perimeter" value="rectanglePerimeter"/>
  81. <add as="labelBackgroundColor" value="white"/>
  82. <add as="fontSize" value="10"/>
  83. <add as="align" value="center"/>
  84. <add as="verticalAlign" value="middle"/>
  85. <add as="strokeColor" value="black"/>
  86. </add>
  87. <add as="defaultEdge">
  88. <add as="shape" value="connector"/>
  89. <add as="labelBackgroundColor" value="white"/>
  90. <add as="rounded" value="1"/>
  91. <add as="edgeStyle" value="elbowEdgeStyle"/>
  92. <add as="endArrow" value="classic"/>
  93. <add as="fontSize" value="10"/>
  94. <add as="align" value="center"/>
  95. <add as="verticalAlign" value="middle"/>
  96. <add as="strokeColor" value="black"/>
  97. </add>
  98. <add as="verticalEdge">
  99. <add as="elbow" value="vertical"/>
  100. </add>
  101. <add as="straightEdge">
  102. <add as="shape" value="connector"/>
  103. <add as="endArrow" value="classic"/>
  104. <add as="labelBackgroundColor" value="white"/>
  105. <add as="rounded" value="1"/>
  106. <add as="fontSize" value="10"/>
  107. <add as="align" value="center"/>
  108. <add as="verticalAlign" value="middle"/>
  109. <add as="strokeColor" value="black"/>
  110. </add>
  111. <add as="arrowEdge">
  112. <add as="shape" value="arrow"/>
  113. <add as="fillColor" value="red"/>
  114. </add>
  115. <add as="swimlane">
  116. <add as="shape" value="swimlane"/>
  117. <add as="fontSize" value="12"/>
  118. <add as="startSize" value="23"/>
  119. <add as="horizontal" value="0"/>
  120. <add as="verticalAlign" value="top"/>
  121. <add as="fontColor" value="white"/>
  122. <add as="labelBackgroundColor" value="none"/>
  123. </add>
  124. <add as="group">
  125. <add as="shape" value="rectangle"/>
  126. <add as="rounded" value="1"/>
  127. <add as="verticalAlign" value="top"/>
  128. <add as="strokeColor" value="black"/>
  129. <add as="dashed" value="1"/>
  130. <add as="opacity" value="50"/>
  131. </add>
  132. <add as="rounded">
  133. <add as="rounded" value="1"/>
  134. </add>
  135. <add as="ellipse">
  136. <add as="shape" value="ellipse"/>
  137. <add as="perimeter" value="ellipsePerimeter"/>
  138. </add>
  139. <add as="rhombus">
  140. <add as="shape" value="image"/>
  141. <add as="perimeter" value="rectanglePerimeter"/>
  142. <add as="labelBackgroundColor" value="white"/>
  143. <add as="fontSize" value="12"/>
  144. <add as="align" value="center"/>
  145. <add as="verticalAlign" value="top"/>
  146. <add as="verticalLabelPosition" value="bottom"/>
  147. </add>
  148. <add as="actor">
  149. <add as="shape" value="actor"/>
  150. </add>
  151. <add as="symbol">
  152. <add as="shape" value="image"/>
  153. <add as="perimeter" value="rectanglePerimeter"/>
  154. <add as="labelBackgroundColor" value="white"/>
  155. <add as="fontSize" value="10"/>
  156. <add as="align" value="center"/>
  157. <add as="verticalAlign" value="middle"/>
  158. <add as="verticalLabelPosition" value="bottom"/>
  159. </add>
  160. <add as="start">
  161. <add as="shape" value="image"/>
  162. <add as="perimeter" value="rectanglePerimeter"/>
  163. <add as="labelBackgroundColor" value="white"/>
  164. <add as="fontSize" value="12"/>
  165. <add as="align" value="center"/>
  166. <add as="verticalAlign" value="top"/>
  167. <add as="verticalLabelPosition" value="bottom"/>
  168. </add>
  169. <add as="end">
  170. <add as="shape" value="image"/>
  171. <add as="perimeter" value="rectanglePerimeter"/>
  172. <add as="labelBackgroundColor" value="white"/>
  173. <add as="fontSize" value="12"/>
  174. <add as="fontFamily" value="verdana,宋体"/>
  175. <add as="align" value="center"/>
  176. <add as="verticalAlign" value="top"/>
  177. <add as="verticalLabelPosition" value="bottom"/>
  178. </add>
  179. </mxStylesheet>
  180. </mxGraph>