WrapperMetaMouseListener.js
资源名称:WorkFlow.rar [点击查看]
上传用户:ahit0551
上传日期:2009-04-15
资源大小:2345k
文件大小:2k
源码类别:
xml/soap/webservice
开发平台:
Java
- // /**
- * <p>Description: </p>
- * <p>Copyright: Copyright (c) xio.name 2006</p>
- * @author xio
- */ function WrapperMetaMouseListener(wrapper) { this.wrapper = wrapper; } WrapperMetaMouseListener.prototype = new MouseListener(); WrapperMetaMouseListener.prototype.onClick = function (e) { var state = this.wrapper.getStateMonitor().getState(); if (state == StateMonitor.SELECT) { return; }
- // var viewer = this.wrapper.getViewer(); var xiorkFlowModel = this.wrapper.getModel(); var point = Toolkit.getContainerCoord(e, viewer);
- // var metaNodeModel = null; switch (state) { case StateMonitor.NODE: metaNodeModel = new NodeModel(); break; case StateMonitor.FORK_NODE: metaNodeModel = new ForkNodeModel(); break; case StateMonitor.JOIN_NODE: metaNodeModel = new JoinNodeModel(); break; case StateMonitor.START_NODE: metaNodeModel = new StartNodeModel(); break; case StateMonitor.END_NODE: metaNodeModel = new EndNodeModel(); break; default: break; } if (metaNodeModel !== null) { if (xiorkFlowModel.getMetaNodeModels().size() >= XiorkFlowWorkSpace.META_NODE_MAX) {
- //节点数不能超过: alert("u8282u70b9u6570u4e0du80fdu8d85u8fc7:" + XiorkFlowWorkSpace.META_NODE_MAX); return; } metaNodeModel.setPosition(point); xiorkFlowModel.addMetaNodeModel(metaNodeModel); this.wrapper.getStateMonitor().resetState(StateMonitor.SELECT);
- //成功添加了一个节点,您可以双击节点编辑节点名称 this.wrapper.setStatusInfo("u6210u529fu6dfbu52a0u4e86u4e00u4e2au8282u70b9uff0cu60a8u53efu4ee5u53ccu51fbu8282u70b9u7f16u8f91u8282u70b9u540du79f0"); } };