123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- <mxEditor defaultGroup="group" defaultEdge="edge"
- helpWindowImage="/wfEngine/graph/images/help.gif"
- tasksWindowImage="/wfEngine/graph/images/tasks.gif"
- forcedInserting="0"
- swimlaneRequired="0"
- >
- <include name="/wfEngine/graph/config2/editor-commons.xml"/>
- <add as="onInit">
- function ()
- {
- //this.showTasks();
- this.showOutline();
- }
- </add>
- <Array as="cycleAttributeValues">
- <add value="#83027F"/>
- <add value="#66B922"/>
- <add value="#808913"/>
- <add value="#CF0056"/>
- <add value="#4679B6"/>
- </Array>
- <Array as="templates">
- <add as="group">
- <Group label="" description="" href="">
- <mxCell vertex="1" style="group" connectable="0"/>
- </Group>
- </add>
- <add as="edge">
- <Edge label="" description="" lineCondition="">
- <mxCell edge="2">
- <mxGeometry as="geometry" relative="1" height="2"/>
- </mxCell>
- </Edge>
- </add>
- <add as="swimlane">
- <Swimlane label="Swimlane" description="" href="">
- <mxCell vertex="1" style="swimlane" connectable="0">
- <mxGeometry as="geometry" width="35" height="35"/>
- </mxCell>
- </Swimlane>
- </add>
- <add as="task">
- <Task label="自动节点" taskname="" nodemethod="" nodemethodname="" businessLogic="" logicArgs="">
- <mxCell vertex="1">
- <mxGeometry as="geometry" width="35" height="35"/>
- </mxCell>
- </Task>
- </add>
- <add as="shape">
- <Shape label="人工节点" taskname="" actor-id="" actor-idname="" advancebutton="" businessLogic="" logicArgs="">
- <mxCell vertex="1" >
- <mxGeometry as="geometry" width="35" height="35"/>
- </mxCell>
- </Shape>
- </add>
- <add as="decinode">
- <Decinode label="判定节点" deciexpress="">
- <mxCell vertex="1" >
- <mxGeometry as="geometry" width="35" height="35"/>
- </mxCell>
- </Decinode>
- </add>
- <add as="fork">
- <Fork label="并发节点">
- <mxCell vertex="1" >
- <mxGeometry as="geometry" width="35" height="35"/>
- </mxCell>
- </Fork>
- </add>
- <add as="join">
- <Join label="合并节点">
- <mxCell vertex="1" >
- <mxGeometry as="geometry" width="35" height="35"/>
- </mxCell>
- </Join>
- </add>
-
- <add as="signsd">
- <Signsd label="会签节点" taskname="" actor-id="" actor-idname="" advancebutton="" businessLogic="" logicArgs="">
- <mxCell vertex="1" >
- <mxGeometry as="geometry" width="35" height="35"/>
- </mxCell>
- </Signsd>
- </add>
-
- <add as="symbol">
- <Symbol label="Symbol" description="" href="">
- <mxCell vertex="1">
- <mxGeometry as="geometry" width="35" height="35"/>
- </mxCell>
- </Symbol>
- </add>
- <add as="start">
- <start label="开始" description="" businessLogic="" logicArgs="">
- <mxCell vertex="1">
- <mxGeometry as="geometry" width="35" height="35"/>
- </mxCell>
- </start>
- </add>
- <add as="end">
- <end label="结束" description="" businessLogic="" logicArgs="">
- <mxCell vertex="1">
- <mxGeometry as="geometry" width="35" height="35"/>
- </mxCell>
- </end>
- </add>
- </Array>
- <add as="createTasks"><![CDATA[
- function (div)
- {
- var off = 30;
-
- if (this.graph != null)
- {
- var layer = this.graph.model.root.getChildAt(0);
- mxUtils.para(div, mxResources.get('examples'));
- mxUtils.linkInvoke(div, mxResources.get('newDiagram'), this,
- 'open', 'diagrams/empty.xml', off);
- mxUtils.br(div);
- mxUtils.linkInvoke(div, mxResources.get('swimlanes'), this,
- 'open', 'diagrams/swimlanes.xml', off);
- mxUtils.br(div);
- mxUtils.linkInvoke(div, mxResources.get('travelBooking'), this,
- 'open', 'diagrams/travel-booking.xml', off);
- mxUtils.br(div);
-
- if (!this.graph.isSelectionEmpty())
- {
- var cell = this.graph.getSelectionCell();
- if (this.graph.getSelectionCount() == 1 &&
- (this.graph.model.isVertex(cell) &&
- cell.getEdgeCount() > 0) || this.graph.isSwimlane(cell))
- {
- mxUtils.para(div, 'Layout');
- mxUtils.linkAction(div, mxResources.get('verticalTree'),
- this, 'verticalTree', off);
- mxUtils.br(div);
- mxUtils.linkAction(div, mxResources.get('horizontalTree'),
- this, 'horizontalTree', off);
- mxUtils.br(div);
- }
-
- mxUtils.para(div, 'Format');
-
- if (mxUtils.isNode(cell.value, 'Symbol'))
- {
- mxUtils.linkAction(div, mxResources.get('image'),
- this, 'image', off);
- mxUtils.br(div);
- }
- else
- {
- mxUtils.linkAction(div, mxResources.get('opacity'),
- this, 'opacity', off);
- mxUtils.br(div);
- if (this.graph.model.isVertex(cell) ||
- (cell.style != null &&
- cell.style.indexOf("arrowEdge") >= 0))
- {
- mxUtils.linkAction(div, mxResources.get('gradientColor'),
- this, 'gradientColor', off);
- mxUtils.br(div);
- }
- if (this.graph.model.isEdge(cell))
- {
- mxUtils.linkAction(div, 'Straight Connector', this, 'straightConnector', off);
- mxUtils.br(div);
- mxUtils.linkAction(div, 'Elbow Connector', this, 'elbowConnector', off);
- mxUtils.br(div);
- mxUtils.linkAction(div, 'Arrow Connector', this, 'arrowConnector', off);
- mxUtils.br(div);
- }
- }
-
- mxUtils.linkAction(div, 'Rounded', this, 'toggleRounded', off);
- mxUtils.br(div);
- if (this.graph.isSwimlane(cell) || this.graph.model.isEdge(cell))
- {
- mxUtils.linkAction(div, 'Orientation', this, 'toggleOrientation', off);
- mxUtils.br(div);
- }
-
- if (this.graph.getSelectionCount() > 1)
- {
- mxUtils.para(div, mxResources.get('align'));
- mxUtils.linkAction(div, mxResources.get('left'),
- this, 'alignCellsLeft', off);
- mxUtils.br(div);
- mxUtils.linkAction(div, mxResources.get('center'),
- this, 'alignCellsCenter', off);
- mxUtils.br(div);
- mxUtils.linkAction(div, mxResources.get('right'),
- this, 'alignCellsRight', off);
- mxUtils.br(div);
- mxUtils.linkAction(div, mxResources.get('top'),
- this, 'alignCellsTop', off);
- mxUtils.br(div);
- mxUtils.linkAction(div, mxResources.get('middle'),
- this, 'alignCellsMiddle', off);
- mxUtils.br(div);
- mxUtils.linkAction(div, mxResources.get('bottom'),
- this, 'alignCellsBottom', off);
- mxUtils.br(div);
- }
-
- mxUtils.para(div, mxResources.get('selection'));
- mxUtils.linkAction(div, mxResources.get('clearSelection'),
- this, 'selectNone', off);
- mxUtils.br(div);
- }
- else if (layer.getChildCount() > 0)
- {
- mxUtils.para(div, mxResources.get('selection'));
- mxUtils.linkAction(div, mxResources.get('selectAll'),
- this, 'selectAll', off);
- mxUtils.br(div);
- }
-
- mxUtils.br(div);
- }
- }
- ]]></add>
- </mxEditor>
|