wfeditor-commons.xml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <mxEditor defaultGroup="group" defaultEdge="edge"
  2. helpWindowImage="/wfEngine/graph/images/help.gif"
  3. tasksWindowImage="/wfEngine/graph/images/tasks.gif"
  4. forcedInserting="0"
  5. swimlaneRequired="0"
  6. >
  7. <include name="/wfEngine/graph/config2/editor-commons.xml"/>
  8. <add as="onInit">
  9. function ()
  10. {
  11. //this.showTasks();
  12. this.showOutline();
  13. }
  14. </add>
  15. <Array as="cycleAttributeValues">
  16. <add value="#83027F"/>
  17. <add value="#66B922"/>
  18. <add value="#808913"/>
  19. <add value="#CF0056"/>
  20. <add value="#4679B6"/>
  21. </Array>
  22. <Array as="templates">
  23. <add as="group">
  24. <Group label="" description="" href="">
  25. <mxCell vertex="1" style="group" connectable="0"/>
  26. </Group>
  27. </add>
  28. <add as="edge">
  29. <Edge label="" description="" lineCondition="">
  30. <mxCell edge="2">
  31. <mxGeometry as="geometry" relative="1" height="2"/>
  32. </mxCell>
  33. </Edge>
  34. </add>
  35. <add as="swimlane">
  36. <Swimlane label="Swimlane" description="" href="">
  37. <mxCell vertex="1" style="swimlane" connectable="0">
  38. <mxGeometry as="geometry" width="35" height="35"/>
  39. </mxCell>
  40. </Swimlane>
  41. </add>
  42. <add as="task">
  43. <Task label="自动节点" taskname="" nodemethod="" nodemethodname="" businessLogic="" logicArgs="">
  44. <mxCell vertex="1">
  45. <mxGeometry as="geometry" width="35" height="35"/>
  46. </mxCell>
  47. </Task>
  48. </add>
  49. <add as="shape">
  50. <Shape label="人工节点" taskname="" actor-id="" actor-idname="" advancebutton="" businessLogic="" logicArgs="">
  51. <mxCell vertex="1" >
  52. <mxGeometry as="geometry" width="35" height="35"/>
  53. </mxCell>
  54. </Shape>
  55. </add>
  56. <add as="decinode">
  57. <Decinode label="判定节点" deciexpress="">
  58. <mxCell vertex="1" >
  59. <mxGeometry as="geometry" width="35" height="35"/>
  60. </mxCell>
  61. </Decinode>
  62. </add>
  63. <add as="fork">
  64. <Fork label="并发节点">
  65. <mxCell vertex="1" >
  66. <mxGeometry as="geometry" width="35" height="35"/>
  67. </mxCell>
  68. </Fork>
  69. </add>
  70. <add as="join">
  71. <Join label="合并节点">
  72. <mxCell vertex="1" >
  73. <mxGeometry as="geometry" width="35" height="35"/>
  74. </mxCell>
  75. </Join>
  76. </add>
  77. <add as="signsd">
  78. <Signsd label="会签节点" taskname="" actor-id="" actor-idname="" advancebutton="" businessLogic="" logicArgs="">
  79. <mxCell vertex="1" >
  80. <mxGeometry as="geometry" width="35" height="35"/>
  81. </mxCell>
  82. </Signsd>
  83. </add>
  84. <add as="symbol">
  85. <Symbol label="Symbol" description="" href="">
  86. <mxCell vertex="1">
  87. <mxGeometry as="geometry" width="35" height="35"/>
  88. </mxCell>
  89. </Symbol>
  90. </add>
  91. <add as="start">
  92. <start label="开始" description="" businessLogic="" logicArgs="">
  93. <mxCell vertex="1">
  94. <mxGeometry as="geometry" width="35" height="35"/>
  95. </mxCell>
  96. </start>
  97. </add>
  98. <add as="end">
  99. <end label="结束" description="" businessLogic="" logicArgs="">
  100. <mxCell vertex="1">
  101. <mxGeometry as="geometry" width="35" height="35"/>
  102. </mxCell>
  103. </end>
  104. </add>
  105. </Array>
  106. <add as="createTasks"><![CDATA[
  107. function (div)
  108. {
  109. var off = 30;
  110. if (this.graph != null)
  111. {
  112. var layer = this.graph.model.root.getChildAt(0);
  113. mxUtils.para(div, mxResources.get('examples'));
  114. mxUtils.linkInvoke(div, mxResources.get('newDiagram'), this,
  115. 'open', 'diagrams/empty.xml', off);
  116. mxUtils.br(div);
  117. mxUtils.linkInvoke(div, mxResources.get('swimlanes'), this,
  118. 'open', 'diagrams/swimlanes.xml', off);
  119. mxUtils.br(div);
  120. mxUtils.linkInvoke(div, mxResources.get('travelBooking'), this,
  121. 'open', 'diagrams/travel-booking.xml', off);
  122. mxUtils.br(div);
  123. if (!this.graph.isSelectionEmpty())
  124. {
  125. var cell = this.graph.getSelectionCell();
  126. if (this.graph.getSelectionCount() == 1 &&
  127. (this.graph.model.isVertex(cell) &&
  128. cell.getEdgeCount() > 0) || this.graph.isSwimlane(cell))
  129. {
  130. mxUtils.para(div, 'Layout');
  131. mxUtils.linkAction(div, mxResources.get('verticalTree'),
  132. this, 'verticalTree', off);
  133. mxUtils.br(div);
  134. mxUtils.linkAction(div, mxResources.get('horizontalTree'),
  135. this, 'horizontalTree', off);
  136. mxUtils.br(div);
  137. }
  138. mxUtils.para(div, 'Format');
  139. if (mxUtils.isNode(cell.value, 'Symbol'))
  140. {
  141. mxUtils.linkAction(div, mxResources.get('image'),
  142. this, 'image', off);
  143. mxUtils.br(div);
  144. }
  145. else
  146. {
  147. mxUtils.linkAction(div, mxResources.get('opacity'),
  148. this, 'opacity', off);
  149. mxUtils.br(div);
  150. if (this.graph.model.isVertex(cell) ||
  151. (cell.style != null &&
  152. cell.style.indexOf("arrowEdge") >= 0))
  153. {
  154. mxUtils.linkAction(div, mxResources.get('gradientColor'),
  155. this, 'gradientColor', off);
  156. mxUtils.br(div);
  157. }
  158. if (this.graph.model.isEdge(cell))
  159. {
  160. mxUtils.linkAction(div, 'Straight Connector', this, 'straightConnector', off);
  161. mxUtils.br(div);
  162. mxUtils.linkAction(div, 'Elbow Connector', this, 'elbowConnector', off);
  163. mxUtils.br(div);
  164. mxUtils.linkAction(div, 'Arrow Connector', this, 'arrowConnector', off);
  165. mxUtils.br(div);
  166. }
  167. }
  168. mxUtils.linkAction(div, 'Rounded', this, 'toggleRounded', off);
  169. mxUtils.br(div);
  170. if (this.graph.isSwimlane(cell) || this.graph.model.isEdge(cell))
  171. {
  172. mxUtils.linkAction(div, 'Orientation', this, 'toggleOrientation', off);
  173. mxUtils.br(div);
  174. }
  175. if (this.graph.getSelectionCount() > 1)
  176. {
  177. mxUtils.para(div, mxResources.get('align'));
  178. mxUtils.linkAction(div, mxResources.get('left'),
  179. this, 'alignCellsLeft', off);
  180. mxUtils.br(div);
  181. mxUtils.linkAction(div, mxResources.get('center'),
  182. this, 'alignCellsCenter', off);
  183. mxUtils.br(div);
  184. mxUtils.linkAction(div, mxResources.get('right'),
  185. this, 'alignCellsRight', off);
  186. mxUtils.br(div);
  187. mxUtils.linkAction(div, mxResources.get('top'),
  188. this, 'alignCellsTop', off);
  189. mxUtils.br(div);
  190. mxUtils.linkAction(div, mxResources.get('middle'),
  191. this, 'alignCellsMiddle', off);
  192. mxUtils.br(div);
  193. mxUtils.linkAction(div, mxResources.get('bottom'),
  194. this, 'alignCellsBottom', off);
  195. mxUtils.br(div);
  196. }
  197. mxUtils.para(div, mxResources.get('selection'));
  198. mxUtils.linkAction(div, mxResources.get('clearSelection'),
  199. this, 'selectNone', off);
  200. mxUtils.br(div);
  201. }
  202. else if (layer.getChildCount() > 0)
  203. {
  204. mxUtils.para(div, mxResources.get('selection'));
  205. mxUtils.linkAction(div, mxResources.get('selectAll'),
  206. this, 'selectAll', off);
  207. mxUtils.br(div);
  208. }
  209. mxUtils.br(div);
  210. }
  211. }
  212. ]]></add>
  213. </mxEditor>