Package org.zkoss.zss.engine.impl

Examples of org.zkoss.zss.engine.impl.AreaRefImpl


    }
    final Book book = (Book) dstSheet.getWorkbook();
    //bug# ZSS-52: Past special, copy column width's behavior doesn't correct
    final int maxrow = book.getSpreadsheetVersion().getLastRowIndex();
    final Set<Ref> affected = new HashSet<Ref>();
    affected.add(dstRef.isWholeColumn() ? dstRef : new AreaRefImpl(0, dstlCol, maxrow, dstRef.getRightCol(), dstRefSheet));
    BookHelper.notifySizeChanges(book, affected);
  }
View Full Code Here


          all.addAll(refs[1]);
        }
      }
    }
    final Book book = (Book) sheet.getWorkbook();
    all.add(new AreaRefImpl(tRow, lCol, bRow, rCol, BookHelper.getRefSheet(book, sheet)));
    BookHelper.reevaluateAndNotify(book, last, all);
  }
View Full Code Here

  @Override
  public void fillDown() {
    synchronized (_sheet) {
      if (_refs != null && !_refs.isEmpty()) {
        final Ref dstRef = _refs.iterator().next();
        final Ref srcRef = new AreaRefImpl(dstRef.getTopRow(), dstRef.getLeftCol(), dstRef.getTopRow(), dstRef.getRightCol(), dstRef.getOwnerSheet());
        fillRef(srcRef, dstRef, Range.FILL_COPY);
      }
    }
  }
View Full Code Here

  @Override
  public void fillLeft() {
    synchronized (_sheet) {
      if (_refs != null && !_refs.isEmpty()) {
        final Ref dstRef = _refs.iterator().next();
        final Ref srcRef = new AreaRefImpl(dstRef.getTopRow(), dstRef.getRightCol(), dstRef.getBottomRow(), dstRef.getRightCol(), dstRef.getOwnerSheet());
        fillRef(srcRef, dstRef, Range.FILL_COPY);
      }
    }
  }
View Full Code Here

  @Override
  public void fillRight() {
    synchronized (_sheet) {
      if (_refs != null && !_refs.isEmpty()) {
        final Ref dstRef = _refs.iterator().next();
        final Ref srcRef = new AreaRefImpl(dstRef.getTopRow(), dstRef.getLeftCol(), dstRef.getBottomRow(), dstRef.getLeftCol(), dstRef.getOwnerSheet());
        fillRef(srcRef, dstRef, Range.FILL_COPY);
      }
    }
  }
View Full Code Here

  @Override
  public void fillUp() {
    synchronized (_sheet) {
      if (_refs != null && !_refs.isEmpty()) {
        final Ref dstRef = _refs.iterator().next();
        final Ref srcRef = new AreaRefImpl(dstRef.getBottomRow(), dstRef.getLeftCol(), dstRef.getBottomRow(), dstRef.getRightCol(), dstRef.getOwnerSheet());
        fillRef(srcRef, dstRef, Range.FILL_COPY);
      }
    }
  }
View Full Code Here

        if (refMap.containsKey(refAddr)) { //same area there, next
          continue;
        }
        final Ref newRef = (nleft == nright && ntop == nbottom) ?
          new CellRefImpl(ntop, nleft, refSheet) :
          new AreaRefImpl(ntop, nleft, nbottom, nright, refSheet);
        nrefs.add(newRef);
        refMap.put(refAddr, newRef);
      }
      if (nrefs.isEmpty()) {
        return Ranges.EMPTY_RANGE;
View Full Code Here

    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

      int lCol0 = lCol;
      for (int cr = colRepeat; cr > 0; --cr) {
        for (Entry<Integer, Ref> srcEntry : srcRefs.entrySet()) {
          final Ref srcRef = srcEntry.getValue();
          int rCol0 = lCol0 + (transpose ? srcRef.getRowCount() : srcRef.getColumnCount()) - 1;
          final Ref dstRef0 = new AreaRefImpl(dsttRow, lCol0, dstbRow, rCol0, dstSheet);
          copyRef(srcRef, 1, 1, dstRef0, pasteType, pasteOp, skipBlanks, false, info);
          lCol0 = rCol0 + 1;
        }
      }
      dsttRow = dstbRow + 1;
View Full Code Here

      int tRow0 = tRow;
      for(int rr = rowRepeat; rr > 0; --rr) {
        for (Entry<Integer, Ref> srcEntry : srcRefs.entrySet()) {
          final Ref srcRef = srcEntry.getValue();
          int bRow0 = tRow0 + (transpose ? srcRef.getColumnCount() : srcRef.getRowCount()) - 1;
          final Ref dstRef0 = new AreaRefImpl(tRow0, dstlCol, bRow0, dstrCol, dstSheet);
          copyRef(srcRef, 1, 1, dstRef0, pasteType, pasteOp, skipBlanks, false, info);
          tRow0 = bRow0 + 1;
        }
      }
      dstlCol += dstrCol + 1;
View Full Code Here

TOP

Related Classes of org.zkoss.zss.engine.impl.AreaRefImpl

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.