Package org.zkoss.zss.engine

Examples of org.zkoss.zss.engine.RefSheet


          final ChangeInfo changeInfo0 = BookHelper.copyCell(stepChunk.getStep(index).next(srcCell), srcCell, sheet, r, c, pasteType, BookHelper.PASTEOP_NONE, false);
          assignChangeInfo(toEval, affected, mergeChanges, changeInfo0);
        }
      }
    }
    final RefSheet refSheet = BookHelper.getRefSheet((Book)sheet.getWorkbook(), sheet);
    affected.add(new AreaRefImpl(dsttRow, srclCol, srctRow - 1, srcrCol, refSheet));
    return changeInfo;
  }
View Full Code Here


          final ChangeInfo changeInfo0 = BookHelper.copyCell(stepChunk.getStep(index).next(srcCell), srcCell, sheet, r, c, pasteType, BookHelper.PASTEOP_NONE, false);
          assignChangeInfo(toEval, affected, mergeChanges, changeInfo0);
        }
      }
    }
    final RefSheet refSheet = BookHelper.getRefSheet((Book)sheet.getWorkbook(), sheet);
    affected.add(new AreaRefImpl(srctRow, srcrCol + 1, srcbRow, dstrCol, refSheet));
    return changeInfo;
  }
View Full Code Here

          final ChangeInfo changeInfo0 = BookHelper.copyCell(stepChunk.getStep(index).next(srcCell), srcCell, sheet, r, c, pasteType, BookHelper.PASTEOP_NONE, false);
          assignChangeInfo(toEval, affected, mergeChanges, changeInfo0);
        }
      }
    }
    final RefSheet refSheet = BookHelper.getRefSheet((Book)sheet.getWorkbook(), sheet);
    affected.add(new AreaRefImpl(srctRow, dstlCol, srcbRow, srclCol - 1, refSheet));
    return changeInfo;
  }
View Full Code Here

          row.setZeroHeight(false);
        }
      }
    }
    final Book book = (Book) sheet.getWorkbook();
    final RefSheet refSheet = BookHelper.getRefSheet(book, sheet);
    final Ref ref = new AreaRefImpl(tRow, 0, bRow, book.getSpreadsheetVersion().getLastColumnIndex(), refSheet);
    final Set<Ref> all = new HashSet<Ref>();
    all.add(ref);
    return all;
  }
View Full Code Here

  public static Set<Ref> setColumnsHidden(Worksheet sheet, int lCol, int rCol, boolean hidden) {
    for(int c = lCol; c <= rCol; ++c) {
      sheet.setColumnHidden(c, hidden);
    }
    final Book book = (Book) sheet.getWorkbook();
    final RefSheet refSheet = BookHelper.getRefSheet(book, sheet);
    final Ref ref = new AreaRefImpl(0, lCol, book.getSpreadsheetVersion().getLastRowIndex(), rCol, refSheet);
    final Set<Ref> all = new HashSet<Ref>();
    all.add(ref);
    return all;
  }
View Full Code Here

    boolean isOld = false;
    final String srcSheetName = ec.getSheetName();
    final int srcRow = ec.getRowIndex();
    final int srcCol = ec.getColumnIndex();
    final RefBook srcRefBook = BookHelper.getOrCreateRefBook(_book);
    final RefSheet srcRefSheet = srcRefBook.getOrCreateRefSheet(srcSheetName);
    if (ctx != null) {
      final String srcRefKey = srcRefBook.getBookName()+"]"+srcSheetName+"!"+new CellReference(srcRow, srcCol).formatAsString();
      final Object[] refs = (Object[]) ctx.getAttribute(srcRefKey);
      if (refs != null) {
        srcRef = (CellRefImpl) refs[0];
        isOld = ((Boolean)refs[1]).booleanValue();
      } else {
        srcRef = (CellRefImpl) srcRefSheet.getRef(srcRow, srcCol, srcRow, srcCol);
        if (srcRef == null) { // a new evaluated one
          srcRef = (CellRefImpl) srcRefSheet.getOrCreateRef(srcRow, srcCol, srcRow, srcCol);
        } else {
          isOld = !srcRef.getPrecedents().isEmpty();
        }
        ctx.setAttribute(srcRefKey, new Object[] {srcRef, Boolean.valueOf(isOld)});
      }
      if (isOld) { //an old src ref, no need to add dependency
        return null;
      }
    } else {
      srcRef = (CellRefImpl) srcRefSheet.getOrCreateRef(srcRow, srcCol, srcRow, srcCol);
    }
    return srcRef;
  }
View Full Code Here

    final int s2 = targetBook.getSheetIndex(refLastSheetName);
    final int sheetIndex1 = Math.min(s1, s2);
    final int sheetIndex2 = Math.max(s1, s2);
    for(int j = sheetIndex1; j <= sheetIndex2; ++j) {
      final String sheetname = targetBook.getSheetName(j);
      final RefSheet targetRefSheet = targetRefBook.getOrCreateRefSheet(sheetname);
      DependencyTrackerHelper.addDependency(srcRef, targetRefSheet, tRow, lCol, bRow, rCol);
    }
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zss.engine.RefSheet

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.