Package org.zkoss.zss.model

Examples of org.zkoss.zss.model.Sheet


    }
   
    public void onChange0(SSDataEvent event) {
      Range rng = event.getRange();//rng might be null in MERGE_DELETE
      Range orng = event.getOriginalRange();
      Sheet sheet = rng!=null?rng.getSheet():orng.getSheet();
      if(!getSelectedSheet().equals(sheet)) return;
     
      int type  = event.getType();
      int dir = event.getDirection();
     
View Full Code Here


   * Sets the selected sheet by a name
   * @param name the name of spreadsheet to be selected.
   */
  public void setSelectedSheet(String name) {
    if (_selectedSheet==null || !_selectedSheet.getName().equals(name)) {
      Sheet sheet = getBook().lookupSheet(name);
      if(sheet==null){
        throw new UiException("No such sheet : "+name);
      }
     
      if(_selectedSheet!=null) doSheetClean(_selectedSheet);
View Full Code Here

   * Default : -1
   * @return the row freeze of this spreadsheet or selected sheet.
   */
  public int getRowfreeze() {
    if(_rowFreezeset) return _rowFreeze;
    Sheet sheet = getSelectedSheet();
    if(sheet!=null) {
      _rowFreeze = sheet.getRowFreeze();
      _rowFreezeset = true;
    }
    return _rowFreeze;
  }
View Full Code Here

   * Default : -1
   * @return the column freeze of this spreadsheet or selected sheet.
   */
  public int getColumnfreeze() {
    if(_colFreeze >-1) return _colFreeze;
    Sheet sheet = getSelectedSheet();
    if(sheet!=null){
      _colFreeze = sheet.getColumnFreeze();
      _colFreezeset = true;
    }
    return _colFreeze;
  }
View Full Code Here

  /**
   * Gets the default row height of the selected sheet
   * @return default value depends on selected sheet
   */
  public int getRowheight() {
    Sheet sheet = getSelectedSheet();
    int rowHeight = sheet.getDefaultRowHeight();
   
    return (rowHeight<=0)?_defaultRowHeight:rowHeight;
   
  }
View Full Code Here

   * @param changed hold the changed range because of this offset row
   * @return the result row index after the offset.
   */
  /*package*/ int offsetRow(int offset, Map changed) {
    if (_matrix.isUiRelated()) {
      final Sheet sheet = _matrix.getSheet();
      for (final Iterator it = _cells.iterator(); it.hasNext(); ) {
        final CellIndex ci = (CellIndex) it.next();
        ci.collectChangedRanges(sheet, offset, 0, changed);
      }
    }
View Full Code Here

  /**
   * Sets the default row height of the selected sheet
   * @param rowHeight the row height
   */
  public void setRowheight(int rowHeight) {
    Sheet sheet = getSelectedSheet();
    int dh = sheet.getDefaultRowHeight();
   
    if (dh != rowHeight) {
      sheet.setDefaultRowHeight(rowHeight);
      //smartUpdate("z.rowh", rowHeight);//not implement yet
      this.invalidate();
    }
  }
View Full Code Here

  /**
   * Gets the default column width of the selected sheet
   * @return default value depends on selected sheet
   */
  public int getColumnwidth() {
    Sheet sheet = getSelectedSheet();
    int columnWidth = sheet.getDefaultColumnWidth();
    return (columnWidth<=0)?_defaultColumnWidth:columnWidth;
  }
View Full Code Here

  /**
   * Sets the default column width of the selected sheet
   * @param columnWidth the default column width
   */
  public void setColumnwidth(int columnWidth) {
    Sheet sheet = getSelectedSheet();
    int dw = sheet.getDefaultColumnWidth();
    if (dw != columnWidth) {
      sheet.setDefaultColumnWidth(columnWidth);
      //smartUpdate("z.colw", columnWidth);//not implement yet
      this.invalidate();
     
    }
  }
View Full Code Here

    _ctrlKeys = keys;
  }
 

  public String getOuterAttrs() {
    Sheet sheet = this.getSelectedSheet();
    final StringBuffer sb = new StringBuffer(64).append(super.getOuterAttrs());
    appendAsapAttr(sb, Events.ON_CELL_FOUCSED);
    appendAsapAttr(sb, Events.ON_CELL_SELECTION);
    appendAsapAttr(sb, Events.ON_SELECTION_CHANGE);
    appendAsapAttr(sb, Events.ON_CELL_CLICK);
View Full Code Here

TOP

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

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.