Package org.zkoss.zss.ui.event

Examples of org.zkoss.zss.ui.event.StopEditingEvent


    Sheet sheet = ((Spreadsheet)comp).getSelectedSheet();
    if(!Utils.getId(sheet).equals(sheetId)){
      return;
    }
   
    CellEvent event = new StopEditingEvent(org.zkoss.zss.ui.event.Events.ON_STOP_EDITING, comp, sheet,row,col,value);
    Events.postEvent(event);
    Events.postEvent(new Event("onStopEditingImpl", comp, new Object[]{token,event}));
  }
View Full Code Here


    Worksheet sheet = ((Spreadsheet) comp).getSelectedSheet();
    if (!Utils.getSheetUuid(sheet).equals(sheetId))
      return;
   
   
    CellEvent event = new StopEditingEvent(org.zkoss.zss.ui.event.Events.ON_STOP_EDITING, comp, sheet, row, col, value);
    Events.postEvent(event);
    Events.postEvent(new Event("onStopEditingImpl", comp, new Object[] {token, event, type}));
  }
View Full Code Here

    });

    bookCtrl.addEventListener(Events.ON_STOP_EDITING,
        new EventListener() {
          public void onEvent(Event event) throws Exception {
            StopEditingEvent evt = (StopEditingEvent)event;
            //setText((String) evt.getEditingValue());

            //chart not implement yet
//            // to notify all widgets there is a cell changed
//            for (int i = 0; i < chartKey; i++) {
//              try {
//                Window win = (Window) mainWin.getFellow("chartWin" + i);
//                if (win != null) {
//                  Chart myChart = (Chart) win.getFellow("myChart");
//                  CellEvent event = new StopEditingEvent(
//                      org.zkoss.zss.ui.event.Events.ON_STOP_EDITING,
//                      myChart, evt.getSheet(), evt.getRow(), evt
//                          .getColumn(), (String) evt.getData());
//                  org.zkoss.zk.ui.event.Events.postEvent(event);
//                }
//              } catch (Exception e) {
//                // the chart may be deleted
//              }
//            }
          }
        });
    //TODO: add ON_START_EDITING, add cell focus if cell is formula
//    bookCtrl.addEventListener(Events.ON_START_EDITING,
//        new EventListener() {
//      public void onEvent(Event event) throws Exception {
//        StartEditingEvent evt = (StartEditingEvent)event;
//        newEdit = (String) evt.getClientValue();
//        if (isStartEditingFormula(newEdit)) {
//          cacheFormulaEditingInfo();
//        }
//        if (isComposingFormula(newEdit)) {
//          int left = bookCtrl.getSelection().getLeft();
//          int top = bookCtrl.getSelection().getTop();
//          formulaCell = Utils.getCell(bookCtrl.getSelectedSheet(), top, left);
//
//          addedFocusNames.add(FORMULA_FOCUS_NAME);
//          bookCtrl.moveEditorFocus(FORMULA_FOCUS_NAME, FORMULA_COLOR, top, left);
//        }
//        setText((String) evt.getEditingValue());
//      }
//    });
   
    bookCtrl.addEventListener(Events.ON_EDITBOX_EDITING,
        new EventListener() {
      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 {
View Full Code Here

TOP

Related Classes of org.zkoss.zss.ui.event.StopEditingEvent

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.