Package org.zkoss.zss.app.zul.ctrl

Examples of org.zkoss.zss.app.zul.ctrl.DesktopWorkbenchContext


        switch (event.getKeyCode()) {
        case 'S':
          //TODO: check permission from WorkbookCtrl
          if (FileHelper.hasSavePermission()) {
            //TODO: refactor duplicate save logic
            DesktopWorkbenchContext workbench = getDesktopWorkbenchContext();
            if (workbench.getWorkbookCtrl().hasFileExtentionName()) {
              workbench.getWorkbookCtrl().save();
              workbench.fireWorkbookSaved();
            } else
              workbench.getWorkbenchCtrl().openSaveFileDialog();
          }
          break;
        case 'O':
          openOpenFileDialog();
          break;
View Full Code Here


        item.setContext(fileMenu);
        item.addEventListener(Events.ON_DOUBLE_CLICK, new EventListener() {
         
          @Override
          public void onEvent(Event evt) throws Exception {
            DesktopWorkbenchContext workbenchCtrl = getDesktopWorkbenchContext();
            workbenchCtrl.getWorkbookCtrl().openBook(info);
            workbenchCtrl.fireWorkbookChanged();
            _importFileDialog.fireOnClose(null);
          }
        });
      }
View Full Code Here

    Components.wireVariables(this, this, '$', true, true);
    Components.addForwards(this, this, '$');
  }
 
  public void onCreate() {
    final DesktopWorkbenchContext workbenchContext= getDesktopWorkbenchContext();
    workbenchContext.addEventListener(Consts.ON_SHEET_CHANGED, new EventListener() {
     
      @Override
      public void onEvent(Event event) throws Exception {
        protectSheet.setChecked(workbenchContext.getWorkbookCtrl().isSheetProtect());
      }
    });   
  }
View Full Code Here

      public void onEvent(Event event) throws Exception {
        EditboxEditingEvent evt = (EditboxEditingEvent)event;
        setText((String) evt.getEditingValue());
      }
    });
    final DesktopWorkbenchContext cnt = getDesktopWorkbenchContext();
    cnt.addEventListener(Consts.ON_SHEET_CHANGED, new EventListener() {
      public void onEvent(Event event) throws Exception {
        //TODO: provide insert sheet reference to formula
        if (isComposingFormula(newEdit)) {
          endEditingFormula(true);
        }
View Full Code Here

TOP

Related Classes of org.zkoss.zss.app.zul.ctrl.DesktopWorkbenchContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.