Package org.zkoss.zss.model

Examples of org.zkoss.zss.model.Worksheet


        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];
       
        Set<Ref>[] refs = null;
View Full Code Here


      final int tRow = ref.getTopRow();
      final int lCol = ref.getLeftCol();
      final int bRow = ref.getBottomRow();
      final int rCol = ref.getRightCol();
      final RefSheet refSheet = ref.getOwnerSheet();
      final Worksheet sheet = BookHelper.getSheet(_sheet, refSheet);
      final Workbook book = sheet.getWorkbook();
     
      for(int row = tRow; row <= bRow; ++row) {
        for (int col = lCol; col <= rCol; ++col) {
          final Cell cell = BookHelper.getCell(sheet, row, col);
          final CellStyle style = cell != null ? cell.getCellStyle() : null;
View Full Code Here

  }
 
  private Row getRow(int rowIndex, RefSheet refSheet) {
    final Book book = BookHelper.getBook(_sheet, refSheet);
    if (book != null) {
      final Worksheet sheet = book.getWorksheet(refSheet.getSheetName());
      if (sheet != null) {
        return sheet.getRow(rowIndex);
      }
    }
    return null;
  }
View Full Code Here

 
  private Cell getCell(int rowIndex, int colIndex, RefSheet refSheet) {
    //locate the model book and sheet of the refSheet
    final Book book = BookHelper.getBook(_sheet, refSheet);
    if (book != null) {
      final Worksheet sheet = book.getWorksheet(refSheet.getSheetName());
      if (sheet != null) {
        final Row row = sheet.getRow(rowIndex);
        if (row != null) {
          return row.getCell(colIndex);
        }
      }
    }
View Full Code Here

 
  private Cell getOrCreateCell(int rowIndex, int colIndex, RefSheet refSheet, int cellType) {
    //locate the model book and sheet of the refSheet
    final Book book = BookHelper.getBook(_sheet, refSheet);
    final String sheetname = refSheet.getSheetName();
    final Worksheet sheet = getOrCreateSheet(book, sheetname);
    final Row row = getOrCreateRow(sheet, rowIndex);
    return getOrCreateCell(row, colIndex, cellType);
  }
View Full Code Here

    final Row row = getOrCreateRow(sheet, rowIndex);
    return getOrCreateCell(row, colIndex, cellType);
  }
 
  private Worksheet getOrCreateSheet(Book book, String sheetName) {
    Worksheet sheet = book.getWorksheet(sheetName);
    if (sheet == null) {
      sheet = (Worksheet)book.createSheet(sheetName);
    }
    return sheet;
  }
View Full Code Here

    synchronized(_sheet) {
      if (_refs != null && !_refs.isEmpty()) {
        final Ref ref = _refs.iterator().next();
        final RefSheet refSheet = ref.getOwnerSheet();
        final RefBook refBook = refSheet.getOwnerBook();
        final Worksheet sheet = BookHelper.getSheet(_sheet, refSheet);
        if (!((SheetCtrl)sheet).isEvalAll()) {
          ((SheetCtrl)sheet).evalAll();
        }
        switch(shift) {
        default:
View Full Code Here

    synchronized(_sheet) {
      if (_refs != null && !_refs.isEmpty()) {
        final Ref ref = _refs.iterator().next();
        final RefSheet refSheet = ref.getOwnerSheet();
        final RefBook refBook = refSheet.getOwnerBook();
        final Worksheet sheet = BookHelper.getSheet(_sheet, refSheet);
        if (!((SheetCtrl)sheet).isEvalAll()) {
          ((SheetCtrl)sheet).evalAll();
        }
        switch(shift) {
        default:
View Full Code Here

  }
 
  //enforce lock sequence
  private Worksheet[] getLockSheets(Range dstRange) {
    final int srcIndex = _sheet.getBook().getSheetIndex(_sheet);
    final Worksheet dstSheet = dstRange.getSheet();
    final int dstIndex = dstSheet.getBook().getSheetIndex(dstSheet);
    final Worksheet[] sheets = new Worksheet[2];
    final Worksheet sheet1 = srcIndex > dstIndex ? _sheet : dstSheet;
    final Worksheet sheet2 = srcIndex > dstIndex ? dstSheet : _sheet;
    return new Worksheet[] {sheet1, sheet2};
  }
View Full Code Here

        final Ref ref = _refs.iterator().next();
        final int tRow = ref.getTopRow();
        final int lCol = ref.getLeftCol();
        final int bRow = ref.getBottomRow();
        final int rCol = ref.getRightCol();
        final Worksheet sheet = BookHelper.getSheet(_sheet, ref.getOwnerSheet());
        final RefBook refBook = ref.getOwnerSheet().getOwnerBook();
        ChangeInfo info = BookHelper.sort(sheet, tRow, lCol, bRow, rCol,
                  key1, desc1, key2, type, desc2, key3, desc3, header,
                  orderCustom, matchCase, sortByRows, sortMethod, dataOption1, dataOption2, dataOption3);
        if (info == null) {
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.