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

Examples of org.zkoss.zss.app.zul.ctrl.DesktopWorkbenchContext.addEventListener()


    return Zssapp.getDesktopCellStyleContext(this);
  }

  public void onCreate() {
    final DesktopWorkbenchContext workbenchCtrl = getDesktopWorkbenchContext();
    workbenchCtrl.addEventListener(Consts.ON_WORKBOOK_CHANGED, new EventListener() {
      public void onEvent(Event event) throws Exception {
        setDisabled(!workbenchCtrl.getWorkbookCtrl().hasBook());
      }
    });
    if (WebApps.getFeature("pe"))
View Full Code Here


    workbenchContext.doTargetChange(new SSWorkbookCtrl(spreadsheet));
    workbenchContext.setWorkbenchCtrl(this);
   
//    if (!FileHelper.hasSavePermission())
//      saveBtn.setVisible(false);
    workbenchContext.addEventListener(Consts.ON_WORKBOOK_SAVED,  new EventListener() {
      public void onEvent(Event event) throws Exception {
        if (!FileHelper.hasSavePermission())
          return;
       
        spreadsheet.setActionDisabled(true, Action.SAVE_BOOK);
View Full Code Here

       
        spreadsheet.setActionDisabled(true, Action.SAVE_BOOK);
      }
    });

    workbenchContext.addEventListener(Consts.ON_WORKBOOK_CHANGED, new EventListener() {
      public void onEvent(Event event) throws Exception {
        boolean isOpen = spreadsheet.getBook() != null;
//        toolbarMask.setVisible(!isOpen);
//        closeBtn.setVisible(isOpen);
       
View Full Code Here

//          syncAutoFilterStatus();
        }
      }
    });

    workbenchContext.addEventListener(Consts.ON_SHEET_CONTENTS_CHANGED,  new EventListener(){
      public void onEvent(Event event) throws Exception {
        doContentChanged();
      }}
    );
   
View Full Code Here

      public void onEvent(Event event) throws Exception {
        doContentChanged();
      }}
    );
   
    workbenchContext.addEventListener(Consts.ON_SHEET_INSERT_FORMULA, new EventListener() {
      public void onEvent(Event event) throws Exception {
        String formula = (String)event.getData();
        Rect rect = spreadsheet.getSelection();
        Range rng = Ranges.range(spreadsheet.getSelectedSheet(), rect.getTop(), rect.getLeft());
        rng.setEditText(formula);
View Full Code Here

    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

        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
Copyright © 2018 www.massapi.com. 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.