Package org.zkoss.zss.ui.event

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


    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


   
    SpreadsheetInCtrl ctrl = ((SpreadsheetInCtrl)((Spreadsheet)comp).getExtraCtrl());
    //ctrl.setSelectedCellBlock(col,row,col,row); only control foucs only
    ctrl.setFocusRect(col,row,col,row);   
   
    Events.postEvent(new CellEvent(org.zkoss.zss.ui.event.Events.ON_CELL_FOUCSED, comp, sheet,row,col));
  }
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

    SpreadsheetInCtrl ctrl = ((SpreadsheetInCtrl) ((Spreadsheet) comp).getExtraCtrl());
    // ctrl.setSelectedCellBlock(col,row,col,row); only control foucs only
    ctrl.setFocusRect(col, row, col, row);
   
    Events.postEvent(new CellEvent(org.zkoss.zss.ui.event.Events.ON_CELL_FOUCSED, comp, sheet, row, col));
  }
View Full Code Here

  public void onCreate() {
    final WorkbookCtrl bookCtrl = getDesktopWorkbenchContext().getWorkbookCtrl();
    bookCtrl.addEventListener(Events.ON_CELL_FOUCSED, new EventListener() {
      @Override
      public void onEvent(Event event) throws Exception {
        CellEvent cellEvent = (CellEvent)event;
        everFocusCell = true;

        if (!isComposingFormula(newEdit)) {
          Cell cell = Utils.getCell(cellEvent.getSheet(), cellEvent.getRow(), cellEvent.getColumn());
          String editText = Utils.getEditText(cell);
          setText(cell == null ? "" : (editText == null ? "" : editText));
        } else {
          if (!editExistingFormula) {
            FormulaEditor.this.focus();
            String lastFocusRef = focusCellRef;
            focusCellRef = bookCtrl.getReference(cellEvent.getRow(), cellEvent.getColumn());
            if (replaceFormulaReference(lastFocusRef, focusCellRef))
              return;
            else
              appendFormulaReference(focusCellRef);
            generateCellFocus(newEdit);
View Full Code Here

  public void focusTo(int row, int column, boolean fireFocusEvent) {
    spreadsheet.focusTo(row, column);
    if (fireFocusEvent) {
      org.zkoss.zk.ui.event.Events.sendEvent(
          new CellEvent(Events.ON_CELL_FOUCSED, spreadsheet, spreadsheet.getSelectedSheet(), row, column));
    }
  }
View Full Code Here

TOP

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

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.