Package org.zkoss.zss.model

Examples of org.zkoss.zss.model.Worksheet


    int row = (Integer) data.get("row");
    int col = (Integer) data.get("col");
    String value = (String) data.get("value");
    String type = (String) data.get("type");
   
    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);
View Full Code Here


      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] {Objects.toString(data), CellFocusedCommand.class.getCanonicalName() });
    String sheetId = (String) data.get("sheetId");
    int row = (Integer) data.get("row");
    int col = (Integer) data.get("col");
   
    Worksheet sheet = ((Spreadsheet) comp).getSelectedSheet();
    if (!Utils.getSheetUuid(sheet).equals(sheetId))
      return;

    SpreadsheetInCtrl ctrl = ((SpreadsheetInCtrl) ((Spreadsheet) comp).getExtraCtrl());
    // ctrl.setSelectedCellBlock(col,row,col,row); only control foucs only
View Full Code Here

    if (data == null || data.size() != 10)
      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] {Objects.toString(data), this});
   
    String sheetId= (String) data.get("sheetId");
   
    Worksheet sheet = ((Spreadsheet) comp).getSelectedSheet();
    if (!Utils.getSheetUuid(sheet).equals(sheetId))
      return;
   
    int action = (Integer) data.get("action");
    int left = (Integer) data.get("left");
View Full Code Here

    int col = (Integer) data.get("col");
    int mx = (Integer) data.get("mx");//x offset against body
    int my = (Integer) data.get("my");
   
    Spreadsheet spreadsheet = (Spreadsheet) comp;
    Worksheet sheet = ((Spreadsheet) comp).getSelectedSheet();
    if (!Utils.getSheetUuid(sheet).equals(sheetId))
      return;
   
    if ("lc".equals(type)) {
      type = org.zkoss.zss.ui.event.Events.ON_CELL_CLICK;
View Full Code Here

      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA,
        new Object[] {Objects.toString(data), this});
   
    _spreadsheet = ((Spreadsheet)comp);
    if(_spreadsheet.isInvalidated()) return;//since it is invalidate, i don't need to update
    final Worksheet selSheet = _spreadsheet.getSelectedSheet();
    final String sheetId = (String) data.get("sheetId");
    if (selSheet == null || !sheetId.equals(((SheetCtrl)selSheet).getUuid())) { //not current selected sheet, skip.
      return;
    }
   
    _ctrl = ((SpreadsheetCtrl)_spreadsheet.getExtraCtrl());
    _hidecolhead = _spreadsheet.isHidecolumnhead();
    _hiderowhead = _spreadsheet.isHiderowhead();
    String token = (String) data.get("token");
   
    _rowHelper = _ctrl.getRowPositionHelper(sheetId);
    _colHelper = _ctrl.getColumnPositionHelper(sheetId);
   
    Worksheet sheet = _spreadsheet.getSelectedSheet();
    if(!Utils.getSheetUuid(sheet).equals(sheetId)) return;
   
    _mergeMatrix = _ctrl.getMergeMatrixHelper(sheet);
   
    String type = (String) data.get("type");
View Full Code Here

    int colfreeze = AuRequests.getInt(data, "fcol", -1);
   
    Book book = spreadsheet.getBook();
    int len = book.getNumberOfSheets();
    for (int i = 0; i < len; i++) {
      Worksheet sheet = book.getWorksheetAt(i);
      if (sheetId.equals(((SheetCtrl)sheet).getUuid())) {
        spreadsheet.setSelectedSheetDirectly(sheet.getSheetName(), cacheInClient, row, col,
            left, top, right, bottom,
            highlightLeft, highlightTop, highlightRight, highlightBottom,
            rowfreeze, colfreeze);
        break;
      }
View Full Code Here

    final CellReference c1 = ref.getFirstCell();
    final CellReference c2 = ref.getLastCell();
    final String sheetnm1 = c1.getSheetName();
    final String sheetnm2 = c2.getSheetName();
    final Book book = sheet.getBook();
    final Worksheet sheet1 = sheetnm1 != null ? book.getWorksheet(sheetnm1) : sheet;
    final Worksheet sheet2 = sheetnm2 != null ? book.getWorksheet(sheetnm2) : sheet;
    final int tRow = c1.getRow();
    final int lCol = c1.getCol();
    final int bRow = c2.getRow();
    final int rCol = c2.getCol();
    return newRange(sheet1, sheet2, tRow, lCol, bRow, rCol);
View Full Code Here

    final int s1 = book.getSheetIndex(sheet);
    final int s2 = book.getSheetIndex(lastSheet);
    final int sb = Math.min(s1,s2);
    final int se = Math.max(s1,s2);
    for (int s = sb; s <= se; ++s) {
      final Worksheet sht = book.getWorksheetAt(s);
      final RefSheet refSht = BookHelper.getOrCreateRefBook(book).getOrCreateRefSheet(sht.getSheetName());
      addRef(new CellRefImpl(row, col, refSht));
    }
  }
View Full Code Here

    final int s1 = book.getSheetIndex(sheet);
    final int s2 = book.getSheetIndex(lastSheet);
    final int sb = Math.min(s1,s2);
    final int se = Math.max(s1,s2);
    for (int s = sb; s <= se; ++s) {
      final Worksheet sht = book.getWorksheetAt(s);
      final RefSheet refSht = BookHelper.getOrCreateRefBook(book).getOrCreateRefSheet(sht.getSheetName());
      addRef(new AreaRefImpl(tRow, lCol, bRow, rCol, refSht));
    }
  }
View Full Code Here

        final int lCol = ref.getLeftCol();
        final RefSheet refSheet = ref.getOwnerSheet();
        final Cell cell = getCell(tRow, lCol, refSheet);
       
        final Object[] values = BookHelper.editTextToValue(txt, cell);
        final Worksheet sheet = BookHelper.getSheet(_sheet, refSheet);
       
        final int cellType = values == null ? -1 : ((Integer)values[0]).intValue();
        final Object value = values == null ? null : values[1];
       
        return BookHelper.validate(sheet, tRow, lCol, value, cellType);
View Full Code Here

TOP

Related Classes of org.zkoss.zss.model.Worksheet

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.