Package org.zkoss.zss.ui.impl

Examples of org.zkoss.zss.ui.impl.HeaderPositionHelper$HeaderPositionInfoComparator


      result.put("size", size);

      final Rect rect = getActiveRangeHelper().getRect(_selectedSheet);
      int right = size + rect.getRight();
     
      HeaderPositionHelper colHelper = Spreadsheet.this.getColumnPositionHelper(sheet);
      colHelper.shiftMeta(col, size);
      result.put("hs", getColumnHeaderAttrs(_selectedSheet, col, right));

      //_maxColumns += size;
      int cf = getColumnfreeze();
      if (cf >= col) {
View Full Code Here


      result.put("size", size);

      final Rect rect = getActiveRangeHelper().getRect(_selectedSheet);
      int bottom = size + rect.getBottom();

      HeaderPositionHelper rowHelper = Spreadsheet.this.getRowPositionHelper(sheet);
      rowHelper.shiftMeta(row, size);
     
      result.put("hs", getRowHeaderAttrs(_selectedSheet, row, bottom));
     
      //_maxRows += size;
      int rf = getRowfreeze();
View Full Code Here

      int right = rect.getRight() - size;
      if (right < col) {
        right = col - 1;
      }
   
      HeaderPositionHelper colHelper = Spreadsheet.this.getColumnPositionHelper(sheet);
      colHelper.unshiftMeta(col, size);
     
      result.put("hs", getColumnHeaderAttrs(_selectedSheet, col, right));
   

      //_maxColumns -= size;
View Full Code Here

      int bottom = rect.getBottom() - size;
      if (bottom < row) {
        bottom = row - 1;
      }
     
      HeaderPositionHelper rowHelper = Spreadsheet.this.getRowPositionHelper(sheet);
      rowHelper.unshiftMeta(row, size);
     
      result.put("hs", getRowHeaderAttrs(_selectedSheet, row, bottom));

//      _maxRows -= size;
      int rf = getRowfreeze();
View Full Code Here

      result.setData("left", left);
      result.setData("top", top);
      result.setData("right", right);
      result.setData("bottom", bottom);

      HeaderPositionHelper helper = Spreadsheet.this
          .getColumnPositionHelper(sheet);
      final int w = helper.getStartPixel(block.getRight() + 1) - helper.getStartPixel(block.getLeft());
      result.setData("width", w);

      HeaderPositionHelper rhelper = Spreadsheet.this
          .getRowPositionHelper(sheet);
      final int h = rhelper.getStartPixel(block.getBottom() + 1) - rhelper.getStartPixel(block.getTop());
      result.setData("height", h);

      /**
       * merge_ -> mergeCell
       */
 
View Full Code Here

    }

    @Override
    public Boolean getLeftHeaderHiddens(int row) {
      Worksheet sheet = getSelectedSheet();
      HeaderPositionHelper rowHelper = Spreadsheet.this
          .getRowPositionHelper(sheet);
      HeaderPositionInfo info = rowHelper.getInfo(row);
      return info == null ? Boolean.FALSE : Boolean.valueOf(info.hidden);
    }
View Full Code Here

    }

    @Override
    public Boolean getTopHeaderHiddens(int col) {
      Worksheet sheet = getSelectedSheet();
      HeaderPositionHelper colHelper = Spreadsheet.this
          .getColumnPositionHelper(sheet);
      HeaderPositionInfo info = colHelper.getInfo(col);
      return info == null ? Boolean.FALSE : Boolean.valueOf(info.hidden);
    }
View Full Code Here

    return data;
  }
 
  protected ClientAnchor getClientAnchor(int row, int col, int widgetWidth, int widgetHeight) {
    final String sid = ((SheetCtrl)_spreadsheet.getSelectedSheet()).getUuid();
    HeaderPositionHelper rowSizeHelper = ((HelperContainer<HeaderPositionHelper>) _spreadsheet.getAttribute("_rowCellSize")).getHelper(sid);
    HeaderPositionHelper colSizeHelper = ((HelperContainer<HeaderPositionHelper>) _spreadsheet.getAttribute("_colCellSize")).getHelper(sid);
   
    int lCol = col;
    int tRow = row;
    int rCol = lCol;
    int bRow = tRow;
    int offsetWidth = 0;
    int offsetHeight = 0;
    for (int r = tRow; r < _spreadsheet.getMaxrows(); r++) {
      int cellHeight = rowSizeHelper.getSize(r);
      widgetHeight -= cellHeight;
      if (widgetHeight <= 0) {
        bRow = r;
        if (widgetHeight < 0) {
          offsetHeight = cellHeight - Math.abs(widgetHeight);
        }
        break;
      }
    }
    for (int c = lCol; c < _spreadsheet.getMaxcolumns(); c++) {
      int cellWidth = colSizeHelper.getSize(c);
      widgetWidth -= cellWidth;
      if (widgetWidth <= 0) {
        rCol = c;
        if (widgetWidth < 0) {
          offsetWidth = cellWidth - Math.abs(widgetWidth);
View Full Code Here

  }
 
  private void updateColWidth(Worksheet sheet, int col) {
    final int width = Utils.getColumnWidthInPx(sheet, col);
    final boolean newHidden = sheet.isColumnHidden(col);
    HeaderPositionHelper posHelper = getColumnPositionHelper(sheet);
    HeaderPositionInfo info = posHelper.getInfo(col);
    if ((info == null && (width != posHelper.getDefaultSize() || newHidden)) || (info != null && (info.size != width || info.hidden != newHidden))) {
      int id = info == null ? _custColId.next() : info.id;
      posHelper.setInfoValues(col, width, id, newHidden);
      ((ExtraCtrl) getExtraCtrl()).setColumnWidth(sheet, col, width, id, newHidden);
    }
  }
View Full Code Here

  private void updateRowHeight(Worksheet sheet, int row) {
    final int height = Utils.getRowHeightInPx(sheet, row);
    final Row rowobj = sheet.getRow(row);
    final boolean newHidden = rowobj == null ? false : rowobj.getZeroHeight();
    HeaderPositionHelper posHelper = getRowPositionHelper(sheet);
    HeaderPositionInfo info = posHelper.getInfo(row);
    if ((info == null && (height != posHelper.getDefaultSize() || newHidden)) || (info != null && (info.size != height || info.hidden != newHidden))) {
      int id = info == null ? _custRowId.next() : info.id;
      posHelper.setInfoValues(row, height, id, newHidden);
      ((ExtraCtrl) getExtraCtrl()).setRowHeight(sheet, row, height, id, newHidden);
    }
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zss.ui.impl.HeaderPositionHelper$HeaderPositionInfoComparator

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.