XiorkFlow.js
资源名称:WorkFlow.rar [点击查看]
上传用户:ahit0551
上传日期:2009-04-15
资源大小:2345k
文件大小:9k
源码类别:
xml/soap/webservice
开发平台:
Java
- /**
- * <p>Title: </p>
- * <p>Description: </p>
- * <p>Copyright: Copyright (c) xio.name 2006</p>
- * @author xio
- */ function XiorkFlow(ui) { this.base = Frame; this.base(ui); this.ui.style.overflow = "auto"; // this.stateMonitor = new StateMonitor(); this.xiorkFlowToolBar = new XiorkFlowToolBar(this); this.add(this.xiorkFlowToolBar); this.stateMonitor.addObserver(this.xiorkFlowToolBar); // this.xiorkFlowViewer = new XiorkFlowViewer(); this.xiorkFlowViewer.setWidth("100%"); this.xiorkFlowViewer.setHeight("100%"); this.viewerRow = this.add(this.xiorkFlowViewer); // this.tableViewer = new XiorkFlowTableViewer(); this.tableViewer.setWidth("100%"); this.tableViewer.setHeight("100%"); this.tableViewerRow = this.add(this.tableViewer); this.tableViewer.setDisplay("none"); // this.statusPanel = new StatusLabel(); //欢迎使用XiorkFlow工作流定制系统 this.statusPanel.setText("u6b22u8fceu4f7fu7528XiorkFlowu5de5u4f5cu6d41u5b9au5236u7cfbu7edf"); this.add(this.statusPanel); // this.xiorkFlowToolBar.getNodeButtonGroup().addObserver(this); this.xiorkFlowToolBar.getViewerPatternButtonGroup().addObserver(this); // this.xiorkFlowWrapper = new XiorkFlowWrapper(this.xiorkFlowViewer, null, this.stateMonitor, this.statusPanel); this.tableViewer.setModel(this.xiorkFlowWrapper.getModel()); } XiorkFlow.prototype = new Frame(); // XiorkFlow.prototype.getToolBar = function () { return this.xiorkFlowToolBar; }; XiorkFlow.prototype.getStatusLabel = function () { return this.statusPanel; }; XiorkFlow.prototype.getWrapper = function () { return this.xiorkFlowWrapper; }; XiorkFlow.prototype.getTableViewer = function () { return this.tableViewer; }; XiorkFlow.prototype.setProcessList = function (processList) { this.processList = processList; }; XiorkFlow.prototype.getProcessList = function () { return this.processList; }; // XiorkFlow.prototype.update = function (observable, arg) { if (arg == ButtonGroup.PRESSED_CHANGED) { if (observable == this.getToolBar().getNodeButtonGroup()) { var pressedButtonModel = this.getToolBar().getNodeButtonGroup().getPressedButtonModel(); var modelName = pressedButtonModel.name; switch (modelName) { case XiorkFlowToolBar.BUTTON_NAME_SELECT: this.stateMonitor.setState(StateMonitor.SELECT); //您当前处于选择状态,点击节点即可选择节点,按下ctrl键可以复选 this.statusPanel.setText("u60a8u5f53u524du5904u4e8eu9009u62e9u72b6u6001uff0cu70b9u51fbu8282u70b9u5373u53efu9009u62e9u8282u70b9uff0cu6309u4e0bctrlu952eu53efu4ee5u590du9009"); break; case XiorkFlowToolBar.BUTTON_NAME_START_NODE: this.stateMonitor.setState(StateMonitor.START_NODE); //您当前处于添加开始节点状态,在可视化编辑区点击鼠标添加开始节点 this.statusPanel.setText("u60a8u5f53u524du5904u4e8eu6dfbu52a0u5f00u59cbu8282u70b9u72b6u6001uff0cu5728u53efu89c6u5316u7f16u8f91u533au70b9u51fbu9f20u6807u6dfbu52a0u5f00u59cbu8282u70b9"); break; case XiorkFlowToolBar.BUTTON_NAME_END_NODE: this.stateMonitor.setState(StateMonitor.END_NODE); //您当前处于添加结束节点状态,在可视化编辑区点击鼠标添加结束节点 this.statusPanel.setText("u60a8u5f53u524du5904u4e8eu6dfbu52a0u7ed3u675fu8282u70b9u72b6u6001uff0cu5728u53efu89c6u5316u7f16u8f91u533au70b9u51fbu9f20u6807u6dfbu52a0u7ed3u675fu8282u70b9"); break; case XiorkFlowToolBar.BUTTON_NAME_FORK_NODE: this.stateMonitor.setState(StateMonitor.FORK_NODE); //您当前处于添加分支节点状态,在可视化编辑区点击鼠标添加分支节点 this.statusPanel.setText("u60a8u5f53u524du5904u4e8eu6dfbu52a0u5206u652fu8282u70b9u72b6u6001uff0cu5728u53efu89c6u5316u7f16u8f91u533au70b9u51fbu9f20u6807u6dfbu52a0u5206u652fu8282u70b9"); break; case XiorkFlowToolBar.BUTTON_NAME_JOIN_NODE: this.stateMonitor.setState(StateMonitor.JOIN_NODE); //您当前处于添加汇聚节点状态,在可视化编辑区点击鼠标添加汇聚节点 this.statusPanel.setText("u60a8u5f53u524du5904u4e8eu6dfbu52a0u6c47u805au8282u70b9u72b6u6001uff0cu5728u53efu89c6u5316u7f16u8f91u533au70b9u51fbu9f20u6807u6dfbu52a0u6c47u805au8282u70b9"); break; case XiorkFlowToolBar.BUTTON_NAME_NODE: this.stateMonitor.setState(StateMonitor.NODE); //您当前处于添加任务节点状态,在可视化编辑区点击鼠标添加任务节点 this.statusPanel.setText("u60a8u5f53u524du5904u4e8eu6dfbu52a0u4efbu52a1u8282u70b9u72b6u6001uff0cu5728u53efu89c6u5316u7f16u8f91u533au70b9u51fbu9f20u6807u6dfbu52a0u4efbu52a1u8282u70b9"); break; case XiorkFlowToolBar.BUTTON_NAME_TRANSITION: this.stateMonitor.setState(StateMonitor.TRANSITION); //您当前处于添加连接状态,在节点上按下鼠标,托拽到另外一个节点,两个节点建立连接 this.statusPanel.setText("u60a8u5f53u524du5904u4e8eu6dfbu52a0u8fdeu63a5u72b6u6001uff0cu5728u8282u70b9u4e0au6309u4e0bu9f20u6807uff0cu6258u62fdu5230u53e6u5916u4e00u4e2au8282u70b9uff0cu4e24u4e2au8282u70b9u5efau7acbu8fdeu63a5"); break; default: break; } return; } // if (observable == this.getToolBar().getViewerPatternButtonGroup()) { var pressedButtonModel = this.getToolBar().getViewerPatternButtonGroup().getPressedButtonModel(); var modelName = pressedButtonModel.name; switch (modelName) { case XiorkFlowToolBar.BUTTON_NAME_DESIGN: this.xiorkFlowViewer.setDisplay(""); this.viewerRow.style.display = ""; this.xiorkFlowViewer.setHeight("100%"); this.viewerRow.height = "100%"; this.tableViewer.setDisplay("none"); this.tableViewerRow.style.display = "none"; this.getToolBar().setDesignButtonEnable(true); //您当前处于设计视图,该视图是可视化编辑状态 this.getStatusLabel().setText("u60a8u5f53u524du5904u4e8eu8bbeu8ba1u89c6u56feuff0cu8be5u89c6u56feu662fu53efu89c6u5316u7f16u8f91u72b6u6001"); break; case XiorkFlowToolBar.BUTTON_NAME_TABLE: this.xiorkFlowViewer.setDisplay("none"); this.viewerRow.style.display = "none"; this.tableViewer.setDisplay(""); this.tableViewerRow.style.display = ""; this.tableViewer.setHeight("100%"); this.tableViewerRow.height = "100%"; this.getToolBar().setDesignButtonEnable(false); //您当前处于表格视图,该视图是工作流程图数据的表格浏览状态 this.getStatusLabel().setText("u60a8u5f53u524du5904u4e8eu8868u683cu89c6u56feuff0cu8be5u89c6u56feu662fu5de5u4f5cu6d41u7a0bu56feu6570u636eu7684u8868u683cu6d4fu89c8u72b6u6001"); break; case XiorkFlowToolBar.BUTTON_NAME_MIX: this.xiorkFlowViewer.setDisplay(""); this.viewerRow.style.display = ""; this.xiorkFlowViewer.setHeight("100%"); this.viewerRow.height = "100%"; this.tableViewer.setDisplay(""); this.tableViewerRow.style.display = ""; this.tableViewer.setHeight("200px"); this.tableViewerRow.height = "200px"; this.getToolBar().setDesignButtonEnable(true); //您当前处于混合视图,该视图同时处于可视化编辑状态和数据表格浏览状态 this.getStatusLabel().setText("u60a8u5f53u524du5904u4e8eu6df7u5408u89c6u56feuff0cu8be5u89c6u56feu540cu65f6u5904u4e8eu53efu89c6u5316u7f16u8f91u72b6u6001u548cu6570u636eu8868u683cu6d4fu89c8u72b6u6001"); break; default: break; } return; } // return; } };