Package org.zkoss.zss.model.event

Examples of org.zkoss.zss.model.event.SSDataEvent


    final Cell dstcell =  _matrix.getCellIndex(top, left).getCell();
    final RangeMerge rng = new RangeMerge(this, left, top, right, bottom);
    final Range org = ((CellImpl)dstcell).setRangeMerge(rng);
    if (org == null) { //new added merge
      _book.fireSSDataEvent(new SSDataEvent(rng, org, SSDataEvent.MERGE_ADD, SSDataEvent.MOVE_NO));
    } else { //old merge change size and move
      _book.fireSSDataEvent(new SSDataEvent(rng, org, SSDataEvent.MERGE_CHANGE, SSDataEvent.MOVE_NO));
    }
  }
View Full Code Here


          _matrixMerge.detachCellIndex(lt.getRow(), lt.getColumn());
        }
        if (rb.isEmpty()) {
          _matrixMerge.detachCellIndex(rb.getRow(), rb.getColumn());
        }
        _book.fireSSDataEvent(new SSDataEvent(null, org, SSDataEvent.MERGE_DELETE, SSDataEvent.MOVE_NO));
      }
    }
  }
View Full Code Here

      j = -(j+1);
      _colwidths.add(j, new Tuple(col, width, null));
    }
    if (change) {
      _book.fireSSDataEvent(
        new SSDataEvent(new RangeSimple(this, null, col, -1, col, -1),
                new SizeImpl(width, -2), SSDataEvent.SIZE_CHANGE));
    }
  }
View Full Code Here

      j = -(j+1);
      _rowheights.add(j, new Tuple(row, height, null));
    }
    if (change) {
      _book.fireSSDataEvent(
        new SSDataEvent(new RangeSimple(this, null, -1, row, -1, row),
                new SizeImpl(-2, height), SSDataEvent.SIZE_CHANGE));
    }
  }
View Full Code Here

    }
    offsetColumnIndex(right, left - right - 1);
    _matrix.removeColumns(left, right);
    final Collection changed = _matrixMerge.removeColumns(left, right);
    final Range rng = new RangeSimple(this, null, left, -1, right, -1);
    _book.fireSSDataEvent(new SSDataEvent(rng, SSDataEvent.RANGE_DELETE, SSDataEvent.MOVE_H));
    for (final Iterator it = changed.iterator(); it.hasNext(); ) {
      final Range[] rngs = (Range[]) it.next();
      final Range org = rngs[0];
      final Range mod = rngs[1];
      _book.fireSSDataEvent(new SSDataEvent(mod, org,
        mod == null ? SSDataEvent.MERGE_DELETE : SSDataEvent.MERGE_CHANGE, SSDataEvent.MOVE_H));
    }
  }
View Full Code Here

      throw new java.lang.IndexOutOfBoundsException("Range out of bound (left,top,right,bottom): "+left+", "+top+", "+right+", "+bottom);
    }
    _matrix.removeRange(left, top, right, bottom, toLeft);
    final Collection changed = _matrixMerge.removeRange(left, top, right, bottom, toLeft);
    final Range rng = new RangeSimple(this, null, left, top, right, bottom);
    _book.fireSSDataEvent(new SSDataEvent(rng, SSDataEvent.RANGE_DELETE,
        toLeft ? SSDataEvent.MOVE_H : SSDataEvent.MOVE_V));
    for (final Iterator it = changed.iterator(); it.hasNext(); ) {
      final Range[] rngs = (Range[]) it.next();
      final Range org = rngs[0];
      final Range mod = rngs[1];
      _book.fireSSDataEvent(new SSDataEvent(mod, org,
        mod == null ? SSDataEvent.MERGE_DELETE : SSDataEvent.MERGE_CHANGE,
        toLeft ? SSDataEvent.MOVE_H : SSDataEvent.MOVE_V));
    }
  }
View Full Code Here

    }
    offsetRowIndex(bottom, top - bottom - 1);
    _matrix.removeRows(top, bottom);
    final Collection changed = _matrixMerge.removeRows(top, bottom);
    final Range rng = new RangeSimple(this, null, -1, top, -1, bottom);
    _book.fireSSDataEvent(new SSDataEvent(rng, SSDataEvent.RANGE_DELETE, SSDataEvent.MOVE_V));
    for (final Iterator it = changed.iterator(); it.hasNext(); ) {
      final Range[] rngs = (Range[]) it.next();
      final Range org = rngs[0];
      final Range mod = rngs[1];
      _book.fireSSDataEvent(new SSDataEvent(mod, org,
        mod == null ? SSDataEvent.MERGE_DELETE : SSDataEvent.MERGE_CHANGE, SSDataEvent.MOVE_V));
    }
  }
View Full Code Here

    }
    offsetColumnIndex(left, right - left + 1);
    _matrix.insertColumns(left, right);
    final Collection changed = _matrixMerge.insertColumns(left, right);
    final Range rng = new RangeSimple(this, null, left, -1, right, -1);
    _book.fireSSDataEvent(new SSDataEvent(rng, SSDataEvent.RANGE_INSERT, SSDataEvent.MOVE_H));
    copyLeftFormat(left, -1, right, -1);
    for (final Iterator it = changed.iterator(); it.hasNext(); ) {
      final Range[] rngs = (Range[]) it.next();
      final Range org = rngs[0];
      final Range mod = rngs[1];
      _book.fireSSDataEvent(new SSDataEvent(mod, org, SSDataEvent.MERGE_CHANGE, SSDataEvent.MOVE_H));
    }
  }
View Full Code Here

        if (format != null) {
          for(int k = left; k <= right; ++k) {
            copyCellFormat(cell, row, k);
          }
          final Range xrng = new RangeSimple(this, null, left, row, right, row);
          _book.fireSSDataEvent(new SSDataEvent(xrng, SSDataEvent.CONTENTS_CHANGE, SSDataEvent.MOVE_NO));
        }
      }
    }
  }
View Full Code Here

        if (format != null) {
          for(int r = top; r <= bottom; ++r) {
            copyCellFormat(cell, r, col);
          }
          final Range xrng = new RangeSimple(this, null, col, top, col, bottom);
          _book.fireSSDataEvent(new SSDataEvent(xrng, SSDataEvent.CONTENTS_CHANGE, SSDataEvent.MOVE_NO));
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zss.model.event.SSDataEvent

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.