Package org.zkoss.zss.model

Examples of org.zkoss.zss.model.Range


      }
      // update helper size first before sheet.setColumnWidth, or it will fire a SSDataEvent
      HeaderPositionHelper helper = Spreadsheet.this.getColumnPositionHelper(sheet);
      helper.setInfoValues(column, newsize, id, hidden);

      final Range rng = Ranges.range(sheet, -1, column).getColumns();
      rng.setHidden(hidden);
      if (!hidden) {
        rng.setColumnWidth(Utils.pxToFileChar256(newsize, ((Book)sheet.getWorkbook()).getDefaultCharWidth()));
      }
    }
View Full Code Here


        sheet = getSelectedSheet();
      } else {
        sheet = Utils.getSheetByUuid(_book, sheetId);
      }
     
      final Range rng = Ranges.range(sheet, rownum, -1).getRows();
      rng.setHidden(hidden);
      if (!hidden) {
        rng.setRowHeight(Utils.pxToPoint(newsize));
      }
      //row.setHeight((short)Utils.pxToTwip(newsize));
      HeaderPositionHelper helper = Spreadsheet.this.getRowPositionHelper(sheet);
      helper.setInfoValues(rownum, newsize, id, hidden);
    }
View Full Code Here

    }
  }
  private Focus _focus;
  private void deleteFocus() {
    if (_selectedSheet != null && _focus != null) {
      final Range rng = Ranges.range(_selectedSheet);
      rng.notifyDeleteFriendFocus(_focus);
      ((BookCtrl)_book).removeFocus(_focus);
      _focus = null;
    }
  }
View Full Code Here

    if (_selectedSheet != null) {
      if (_focus == null) {
        _focus = newFocus();
        ((BookCtrl)_book).addFocus(_focus);
      }
      final Range rng = Ranges.range(_selectedSheet);
      rng.notifyMoveFriendFocus(_focus);
    }
  }
View Full Code Here

      return true;
    }
    if (_inCallback) { //skip validation check
      return true;
    }
    final Range rng = Ranges.range(sheet, row, col);
    final DataValidation dv = rng.validate(txt);
    if (dv != null) {
      if (dv.getShowErrorBox()) {
        String errTitle = dv.getErrorBoxTitle();
        String errText = dv.getErrorBoxText();
        if (errTitle == null) {
View Full Code Here

        clearClipboard();
        return;
      }
     
      final Rect srcRect = _clipboard.sourceRect;
      Range rng = Utils.pasteSpecial(srcSheet,
          srcRect,
          _spreadsheet.getSelectedSheet(),
          selection.getTop(),
          selection.getLeft(),
          selection.getBottom(),
          selection.getRight(),
          pasteType,
          pasteOperation,
          skipBlank, transpose);
     
      if (_clipboard.type == Clipboard.Type.CUT) {
        Ranges
        .range(srcSheet, srcRect.getTop(), srcRect.getLeft(), srcRect.getBottom(), srcRect.getRight())
        .clearContents();
       
        clearStyleImp(srcRect, srcSheet);
       
        _clipboard = null;//clear used clipboard
        _spreadsheet.setHighlight(null);
      }
     
      if (rng != null) {
        _spreadsheet.setSelection(new Rect(rng.getColumn(), rng.getRow(),
            rng.getLastColumn(), rng.getLastRow()))
      }
    }
  }
View Full Code Here

              break;
            }
          }
        }
       
        Range range = Ranges.range(sheet, tRow, lCol, bRow, rCol);
        if (merged) {
          range.unMerge();
        } else {
          range.merge(false);
          doHorizontalAlignCenter(selection)
        }
      } else {
        showProtectMessage();
      }
View Full Code Here

   */
  public void doFilter(Rect selection) {
    Worksheet sheet = _spreadsheet.getSelectedSheet();
    if (sheet != null && isValidSelection(selection)) {
      if (!sheet.getProtect()) {
        Range range = Ranges.range(sheet, selection.getTop(), selection.getLeft(), selection.getBottom(), selection.getRight());
        //ZSS-199
        switch (selection.getSelectionType()) {
        case Rect.SELECT_ROW:
          range.getRows().autoFilter();
          break;
        default:
          range.autoFilter();
          break;
        }
       
        clearClipboard()
      } else {
View Full Code Here

    int left = selection.getLeft();
    int right = selection.getRight();
    int top = selection.getTop();
    int btm = selection.getBottom();
   
    Range rng = Utils.getRange(sheet, top, left, btm, right);
       
    rng.autoFilter();
  }
View Full Code Here

    int left = selection.getLeft();
    int right = selection.getRight();
    int top = selection.getTop();
    int btm = selection.getBottom();
   
    Range rng = Utils.getRange(sheet, top, left, btm, right);
    Range rng1 = null;
    Range rng2 = null;
    Range rng3 = null;
    boolean desc1 = false;
    boolean desc2 = false;
    boolean desc3 = false;
    int dataOption1 = 0;
    int dataOption2 = 0;
View Full Code Here

TOP

Related Classes of org.zkoss.zss.model.Range

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.