XiorkFlowViewPattern.js
上传用户:ahit0551
上传日期:2009-04-15
资源大小:2345k
文件大小:5k
源码类别:

xml/soap/webservice

开发平台:

Java

  1. /**
  2.  * <p>Title:  </p>
  3.  * <p>Description: </p>
  4.  * <p>Copyright: Copyright (c) xio.name 2006</p>
  5.  * @author xio
  6.  */ function XiorkFlowViewPattern(ui) {     this.base = Frame;     this.base(ui);     this.ui.style.overflow = "auto";          //     this.xiorkFlowToolBar = new XiorkFlowViewerToolBar();     this.add(this.xiorkFlowToolBar);
  7.     //     this.xiorkFlowViewer = new XiorkFlowViewer();     this.xiorkFlowViewer.setWidth("100%");     this.xiorkFlowViewer.setHeight("100%");     this.viewerRow = this.add(this.xiorkFlowViewer);
  8.     //     this.tableViewer = new XiorkFlowTableViewer();     this.tableViewer.setWidth("100%");     this.tableViewer.setHeight("100%");     this.tableViewerRow = this.add(this.tableViewer);     this.tableViewer.setDisplay("none");
  9.     //     this.statusPanel = new StatusLabel();
  10.     //欢迎使用XiorkFlow工作流定制系统     this.statusPanel.setText("u6b22u8fceu4f7fu7528XiorkFlowu5de5u4f5cu6d41u5b9au5236u7cfbu7edf");     this.add(this.statusPanel);
  11. //     this.xiorkFlowToolBar.getViewerPatternButtonGroup().addObserver(this);
  12.     //     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; };
  13. // XiorkFlowViewPattern.prototype.update = function (observable, arg) {     if (arg == ButtonGroup.PRESSED_CHANGED) {
  14.         //         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;         }
  15.         //         return;     } };
  16. // function XiorkFlowViewerToolBar() {     this.base = ToolBar;     this.base();
  17.     //     this.addSeparator();
  18.     //     this.viewerPatternButtonGroup = new ButtonGroup();
  19.     //design     var designButton = new ToggleButton("", "u8bbeu8ba1", true);     this.add(designButton);     this.viewerPatternButtonGroup.add(designButton);     designButton.getModel().name = XiorkFlowViewerToolBar.BUTTON_NAME_DESIGN;
  20.     //table     var tableButton = new ToggleButton("", "u8868u683c", true);     this.add(tableButton);     this.viewerPatternButtonGroup.add(tableButton);     tableButton.getModel().name = XiorkFlowViewerToolBar.BUTTON_NAME_TABLE;
  21.     //混合显示     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; };
  22. // XiorkFlowViewerToolBar.BUTTON_NAME_DESIGN = "BUTTON_NAME_DESIGN"; XiorkFlowViewerToolBar.BUTTON_NAME_TABLE = "BUTTON_NAME_TABLE"; XiorkFlowViewerToolBar.BUTTON_NAME_MIX = "BUTTON_NAME_MIX";