Package org.zkoss.zss.engine

Examples of org.zkoss.zss.engine.RefSheet


      return deleteXSSFRows(sheet, startRow, num);
    }
  }
  private static ChangeInfo deleteHSSFRows(Worksheet sheet, int startRow, int num) {
    final Book book = (Book) sheet.getWorkbook();
    final RefSheet refSheet = getRefSheet(book, sheet);
    final Set<Ref>[] refs = refSheet.deleteRows(startRow, num);
    final int lastRowNum = sheet.getLastRowNum();
    final int startRow0 = startRow + num;
    if (startRow > lastRowNum) {
      return null;
    }
View Full Code Here


   
    return new ChangeInfo(last, all, changeMerges);
  }
  private static ChangeInfo deleteXSSFRows(Worksheet sheet, int startRow, int num) {
    final Book book = (Book) sheet.getWorkbook();
    final RefSheet refSheet = getRefSheet(book, sheet);
    final Set<Ref>[] refs = refSheet.deleteRows(startRow, num);
    final int lastRowNum = sheet.getLastRowNum();
    final int startRow0 = startRow + num;
    if (startRow > lastRowNum) {
      return null;
    }
View Full Code Here

    }
  }
     
  private static ChangeInfo insertHSSFColumns(Worksheet sheet, int startCol, int num, int copyOrigin) {
    final Book book = (Book) sheet.getWorkbook();
    final RefSheet refSheet = getRefSheet(book, sheet);
    final Set<Ref>[] refs = refSheet.insertColumns(startCol, num);
    final List<CellRangeAddress[]> shiftedRanges = ((HSSFSheetImpl)sheet).shiftColumnsOnly(startCol, -1, num, true, false, true, false, copyOrigin);
    final List<MergeChange> changeMerges = prepareChangeMerges(refSheet, shiftedRanges);
    final Set<Ref> last = refs[0];
    final Set<Ref> all = refs[1];
    final int maxrow = book.getSpreadsheetVersion().getLastRowIndex();
View Full Code Here

    return new ChangeInfo(last, all, changeMerges);
  }
 
  private static ChangeInfo insertXSSFColumns(Worksheet sheet, int startCol, int num, int copyOrigin) {
    final Book book = (Book) sheet.getWorkbook();
    final RefSheet refSheet = getRefSheet(book, sheet);
    final Set<Ref>[] refs = refSheet.insertColumns(startCol, num);
    final List<CellRangeAddress[]> shiftedRanges = ((XSSFSheetImpl)sheet).shiftColumnsOnly(startCol, -1, num, true, false, true, false, copyOrigin);
    final List<MergeChange> changeMerges = prepareChangeMerges(refSheet, shiftedRanges);
    final Set<Ref> last = refs[0];
    final Set<Ref> all = refs[1];
    final int maxrow = book.getSpreadsheetVersion().getLastRowIndex();
View Full Code Here

    }
  }
 
  public static ChangeInfo deleteHSSFColumns(Worksheet sheet, int startCol, int num) {
    final Book book = (Book) sheet.getWorkbook();
    final RefSheet refSheet = getRefSheet(book, sheet);
    final Set<Ref>[] refs = refSheet.deleteColumns(startCol, num);
    final int startCol0 = startCol + num;
    final List<CellRangeAddress[]> shiftedRanges = ((HSSFSheetImpl)sheet).shiftColumnsOnly(startCol0, -1, -num, true, false, true, true, Range.FORMAT_NONE);
    final List<MergeChange> changeMerges = prepareChangeMerges(refSheet, shiftedRanges);
    final Set<Ref> last = refs[0];
    final Set<Ref> all = refs[1];
View Full Code Here

    return new ChangeInfo(last, all, changeMerges);
  }
 
  public static ChangeInfo deleteXSSFColumns(Worksheet sheet, int startCol, int num) {
    final Book book = (Book) sheet.getWorkbook();
    final RefSheet refSheet = getRefSheet(book, sheet);
    final Set<Ref>[] refs = refSheet.deleteColumns(startCol, num);
    final int startCol0 = startCol + num;
    final List<CellRangeAddress[]> shiftedRanges = ((XSSFSheetImpl)sheet).shiftColumnsOnly(startCol0, -1, -num, true, false, true, true, Range.FORMAT_NONE);
    final List<MergeChange> changeMerges = prepareChangeMerges(refSheet, shiftedRanges);
    final Set<Ref> last = refs[0];
    final Set<Ref> all = refs[1];
View Full Code Here

    }
  }
 
  private static ChangeInfo insertHSSFRange(Worksheet sheet, int tRow, int lCol, int bRow, int rCol, boolean horizontal, int copyRightBelow) {
    final Book book = (Book) sheet.getWorkbook();
    final RefSheet refSheet = getRefSheet(book, sheet);
    final Set<Ref>[] refs = refSheet.insertRange(tRow, lCol, bRow, rCol, horizontal);
    final int num = horizontal ? rCol - lCol + 1 : bRow - tRow + 1;
    final List<CellRangeAddress[]> shiftedRanges = horizontal ?
      ((HSSFSheetImpl)sheet).shiftColumnsRange(lCol, -1, num, tRow, bRow, true, false, true, false, copyRightBelow):
      ((HSSFSheetImpl)sheet).shiftRowsRange(tRow, -1, num, lCol, rCol, true, false, true, false, copyRightBelow);
    final List<MergeChange> changeMerges = prepareChangeMerges(refSheet, shiftedRanges);
View Full Code Here

    return new ChangeInfo(last, all, changeMerges);
  }
 
  private static ChangeInfo insertXSSFRange(Worksheet sheet, int tRow, int lCol, int bRow, int rCol, boolean horizontal, int copyRightBelow) {
    final Book book = (Book) sheet.getWorkbook();
    final RefSheet refSheet = getRefSheet(book, sheet);
    final Set<Ref>[] refs = refSheet.insertRange(tRow, lCol, bRow, rCol, horizontal);
    final int num = horizontal ? rCol - lCol + 1 : bRow - tRow + 1;
    final List<CellRangeAddress[]> shiftedRanges = horizontal ?
      ((XSSFSheetImpl)sheet).shiftColumnsRange(lCol, -1, num, tRow, bRow, true, false, true, false, copyRightBelow):
      ((XSSFSheetImpl)sheet).shiftRowsRange(tRow, -1, num, lCol, rCol, true, false, true, false, copyRightBelow);
    final List<MergeChange> changeMerges = prepareChangeMerges(refSheet, shiftedRanges);
View Full Code Here

    }
  }
 
  private static ChangeInfo deleteHSSFRange(Worksheet sheet, int tRow, int lCol, int bRow, int rCol, boolean horizontal) {
    final Book book = (Book) sheet.getWorkbook();
    final RefSheet refSheet = getRefSheet(book, sheet);
    final Set<Ref>[] refs = refSheet.deleteRange(tRow, lCol, bRow, rCol, horizontal);
    final int num = horizontal ? rCol - lCol + 1 : bRow - tRow + 1;
    final List<CellRangeAddress[]> shiftedRanges = horizontal ?
      ((HSSFSheetImpl)sheet).shiftColumnsRange(rCol + 1, -1, -num, tRow, bRow, true, false, true, true, Range.FORMAT_NONE):
      ((HSSFSheetImpl)sheet).shiftRowsRange(bRow + 1, -1, -num, lCol, rCol, true, false, true, true, Range.FORMAT_NONE);
    final List<MergeChange> changeMerges = prepareChangeMerges(refSheet, shiftedRanges);
View Full Code Here

    return new ChangeInfo(last, all, changeMerges);
  }

  private static ChangeInfo deleteXSSFRange(Worksheet sheet, int tRow, int lCol, int bRow, int rCol, boolean horizontal) {
    final Book book = (Book) sheet.getWorkbook();
    final RefSheet refSheet = getRefSheet(book, sheet);
    final Set<Ref>[] refs = refSheet.deleteRange(tRow, lCol, bRow, rCol, horizontal);
    final int num = horizontal ? rCol - lCol + 1 : bRow - tRow + 1;
    final List<CellRangeAddress[]> shiftedRanges = horizontal ?
      ((XSSFSheetImpl)sheet).shiftColumnsRange(rCol + 1, -1, -num, tRow, bRow, true, false, true, true, Range.FORMAT_NONE):
      ((XSSFSheetImpl)sheet).shiftRowsRange(bRow + 1, -1, -num, lCol, rCol, true, false, true, true, Range.FORMAT_NONE);
    final List<MergeChange> changeMerges = prepareChangeMerges(refSheet, shiftedRanges);
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.