XiorkFlowViewPattern.js
资源名称:WorkFlow.rar [点击查看]
上传用户:ahit0551
上传日期:2009-04-15
资源大小:2345k
文件大小:5k
源码类别:
xml/soap/webservice
开发平台:
Java
- /**
- * <p>Title: </p>
- * <p>Description: </p>
- * <p>Copyright: Copyright (c) xio.name 2006</p>
- * @author xio
- */ function XiorkFlowViewPattern(ui) { this.base = Frame; this.base(ui); this.ui.style.overflow = "auto"; // this.xiorkFlowToolBar = new XiorkFlowViewerToolBar(); this.add(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.getViewerPatternButtonGroup().addObserver(this);
- // var model = new XiorkFlowModel(); model.setEditable(false); this.xiorkFlowWrapper = new XiorkFlowWrapper(this.xiorkFlowViewer, model, this.stateMonitor, this.statusPanel); this.tableViewer.setModel(this.xiorkFlowWrapper.getModel()); } XiorkFlowViewPattern.prototype = new Frame(); XiorkFlowViewPattern.prototype.getToolBar = function () { return this.xiorkFlowToolBar; }; XiorkFlowViewPattern.prototype.getStatusLabel = function () { return this.statusPanel; }; XiorkFlowViewPattern.prototype.getWrapper = function () { return this.xiorkFlowWrapper; }; XiorkFlowViewPattern.prototype.getTableViewer = function () { return this.tableViewer; };
- // XiorkFlowViewPattern.prototype.update = function (observable, arg) { if (arg == ButtonGroup.PRESSED_CHANGED) {
- // if (observable == this.getToolBar().getViewerPatternButtonGroup()) { var pressedButtonModel = this.getToolBar().getViewerPatternButtonGroup().getPressedButtonModel(); var modelName = pressedButtonModel.name; switch (modelName) { case XiorkFlowViewerToolBar.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.getStatusLabel().setText("u8bbeu8ba1u6a21u5f0f"); break; case XiorkFlowViewerToolBar.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.getStatusLabel().setText("u8868u683cu6d4fu89c8u6a21u5f0f"); break; case XiorkFlowViewerToolBar.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.getStatusLabel().setText("u8bbeu8ba1u6a21u5f0fu3001u8868u683cu6a21u5f0fu540cu65f6u663eu793a"); break; default: break; } return; }
- // return; } };
- // function XiorkFlowViewerToolBar() { this.base = ToolBar; this.base();
- // this.addSeparator();
- // this.viewerPatternButtonGroup = new ButtonGroup();
- //design var designButton = new ToggleButton("", "u8bbeu8ba1", true); this.add(designButton); this.viewerPatternButtonGroup.add(designButton); designButton.getModel().name = XiorkFlowViewerToolBar.BUTTON_NAME_DESIGN;
- //table var tableButton = new ToggleButton("", "u8868u683c", true); this.add(tableButton); this.viewerPatternButtonGroup.add(tableButton); tableButton.getModel().name = XiorkFlowViewerToolBar.BUTTON_NAME_TABLE;
- //混合显示 var mixButton = new ToggleButton("", "u6df7u5408u663eu793a", true); this.add(mixButton); this.viewerPatternButtonGroup.add(mixButton); mixButton.getModel().name = XiorkFlowViewerToolBar.BUTTON_NAME_MIX; } XiorkFlowViewerToolBar.prototype = new ToolBar(); XiorkFlowViewerToolBar.prototype.setButtonEnable = function (b) { var viewPatternbuttons = this.viewerPatternButtonGroup.getButtons(); for (var i = 0; i < viewPatternbuttons.size(); i++) { viewPatternbuttons.get(i).getModel().setEnabled(b); } }; XiorkFlowViewerToolBar.prototype.getViewerPatternButtonGroup = function () { return this.viewerPatternButtonGroup; };
- // XiorkFlowViewerToolBar.BUTTON_NAME_DESIGN = "BUTTON_NAME_DESIGN"; XiorkFlowViewerToolBar.BUTTON_NAME_TABLE = "BUTTON_NAME_TABLE"; XiorkFlowViewerToolBar.BUTTON_NAME_MIX = "BUTTON_NAME_MIX";