Package org.zkoss.zss.engine

Examples of org.zkoss.zss.engine.RefSheet


  }

  private void copyColumnWidths(Worksheet srcSheet, int widthRepeatCount, int srclCol, Ref dstRef) {
    final int dstlCol = dstRef.getLeftCol();
    final int dstColCount = dstRef.getColumnCount();
    final RefSheet dstRefSheet = dstRef.getOwnerSheet();
    final Worksheet dstSheet = BookHelper.getSheet(_sheet, dstRefSheet);
    for (int count = 0; count < dstColCount; ++count) {
      final int dstCol = dstlCol + count;
      final int srcCol = srclCol + count % widthRepeatCount;
      final int char256 = srcSheet.getColumnWidth(srcCol);
View Full Code Here


    }
    final int tRow = srcRef.getTopRow();
    final int lCol = srcRef.getLeftCol();
    final int bRow = srcRef.getBottomRow();
    final int rCol = srcRef.getRightCol();
    final RefSheet dstRefsheet = dstRef.getOwnerSheet();
    final Worksheet srcSheet = BookHelper.getSheet(_sheet, srcRef.getOwnerSheet());
    final Worksheet dstSheet = BookHelper.getSheet(_sheet, dstRefsheet);
    final Set<Ref> toEval = info.getToEval();
    final Set<Ref> affected = info.getAffected();
    final List<MergeChange> mergeChanges = info.getMergeChanges();
View Full Code Here

  @Override
  public void setBorders(short borderIndex, BorderStyle lineStyle, String color) {
    synchronized (_sheet) {
      if (_refs != null && !_refs.isEmpty()) {
        final Ref ref = _refs.iterator().next();
        final RefSheet refSheet = ref.getOwnerSheet();
        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, refSheet);
View Full Code Here

  @Override
  public void setColumnWidth(int char256) {
    synchronized (_sheet) {
      if (_refs != null && !_refs.isEmpty()) {
        final Ref ref = _refs.iterator().next();
        final RefSheet refSheet = ref.getOwnerSheet();
        final int lCol = ref.getLeftCol();
        final int rCol = ref.getRightCol();
        final Worksheet sheet = BookHelper.getSheet(_sheet, refSheet);
        final Set<Ref> all = BookHelper.setColumnWidth(sheet, lCol, rCol, char256);
        if (all != null) {
View Full Code Here

  @Override
  public void setRowHeight(int points, boolean customHeight) {
    synchronized (_sheet) {
      if (_refs != null && !_refs.isEmpty()) {
        final Ref ref = _refs.iterator().next();
        final RefSheet refSheet = ref.getOwnerSheet();
        final int tRow = ref.getTopRow();
        final int bRow = ref.getBottomRow();
        final Worksheet sheet = BookHelper.getSheet(_sheet, refSheet);
        final Set<Ref> all = BookHelper.setRowHeight(sheet, tRow, bRow, (short) (points * 20), customHeight); //in twips, set customHeight
        if (all != null) {
View Full Code Here

  @Override
  public void move(int nRow, int nCol) {
    synchronized (_sheet) {
      if (_refs != null && !_refs.isEmpty()) {
        final Ref ref = _refs.iterator().next();
        final RefSheet refSheet = ref.getOwnerSheet();
        final RefBook refBook = refSheet.getOwnerBook();
        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, refSheet);
View Full Code Here

  public void setStyle(CellStyle style) {
    synchronized (_sheet) {
      if (_refs != null && !_refs.isEmpty()) {
        final Set<Ref> all = new HashSet<Ref>();
        for (Ref ref : _refs) {
          final RefSheet refSheet = ref.getOwnerSheet();
          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, refSheet);
View Full Code Here

  @Override
  public void clearContents() {
    synchronized (_sheet) {
      if (_refs != null && !_refs.isEmpty()) {
        final Ref ref = _refs.iterator().next();
        final RefSheet refSheet = ref.getOwnerSheet();
        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, refSheet);
View Full Code Here

    synchronized (_sheet) {
      if (_refs != null && !_refs.isEmpty()) {
        final Set<Ref> all = new HashSet<Ref>();
        for (Ref ref : _refs) {
          if (ref.isWholeRow()) {
            final RefSheet refSheet = ref.getOwnerSheet();
            final Worksheet sheet = BookHelper.getSheet(_sheet, refSheet);
            final int tRow = ref.getTopRow();
            final int bRow = ref.getBottomRow();
            final Set<Ref> refs = BookHelper.setRowsHidden(sheet, tRow, bRow, hidden);
            all.addAll(refs);
          } else if (ref.isWholeColumn()) {
            final RefSheet refSheet = ref.getOwnerSheet();
            final Worksheet sheet = BookHelper.getSheet(_sheet, refSheet);
            final int lCol = ref.getLeftCol();
            final int rCol = ref.getRightCol();
            final Set<Ref> refs = BookHelper.setColumnsHidden(sheet, lCol, rCol, hidden);
            all.addAll(refs);
View Full Code Here

    synchronized (_sheet) {
      final Ref ref = getRefs().iterator().next();
      final Worksheet sheet = BookHelper.getSheet(_sheet, ref.getOwnerSheet());
      final int row = ref.getTopRow();
      final int col = ref.getLeftCol();
      final RefSheet refSheet = ref.getOwnerSheet();
      Set<Ref> refs = ((RefSheetImpl)refSheet).getAllDependents(row, col);
      return refs != null && !refs.isEmpty() ?
          new RangeImpl(refs, sheet) : Ranges.EMPTY_RANGE;
    }
  }
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.