Package org.zkoss.zss.model

Examples of org.zkoss.zss.model.Worksheet


 
  @Override
  public Range getPrecedents() {
    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 = refSheet.getAllPrecedents(row, col);
      return refs != null && !refs.isEmpty() ?
View Full Code Here


 
  @Override
  public Range getDirectPrecedents() {
    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 = refSheet.getDirectPrecedents(row, col);
      return refs != null && !refs.isEmpty() ?
View Full Code Here

      return new AMedia("css", "css", "text/css;charset=UTF-8",
          getSheetDefaultRules());
    }

    public void setColumnSize(String sheetId, int column, int newsize, int id, boolean hidden) {
      Worksheet sheet;
      if (getSelectedSheetId().equals(sheetId)) {
        sheet = getSelectedSheet();
      } else {
        sheet = Utils.getSheetByUuid(_book, sheetId);
      }
      // 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

        rng.setColumnWidth(Utils.pxToFileChar256(newsize, ((Book)sheet.getWorkbook()).getDefaultCharWidth()));
      }
    }

    public void setRowSize(String sheetId, int rownum, int newsize, int id, boolean hidden) {
      Worksheet sheet;
      if (getSelectedSheetId().equals(sheetId)) {
        sheet = getSelectedSheet();
      } else {
        sheet = Utils.getSheetByUuid(_book, sheetId);
      }
View Full Code Here

      HeaderPositionHelper helper = Spreadsheet.this.getRowPositionHelper(sheet);
      helper.setInfoValues(rownum, newsize, id, hidden);
    }

    public HeaderPositionHelper getColumnPositionHelper(String sheetId) {
      Worksheet sheet;
      if (getSelectedSheetId().equals(sheetId)) {
        sheet = getSelectedSheet();
      } else {
        sheet = Utils.getSheetByUuid(_book, sheetId);
      }
View Full Code Here

      HeaderPositionHelper helper = Spreadsheet.this.getColumnPositionHelper(sheet);
      return helper;
    }

    public HeaderPositionHelper getRowPositionHelper(String sheetId) {
      Worksheet sheet;
      if (getSelectedSheetId().equals(sheetId)) {
        sheet = getSelectedSheet();
      } else {
        sheet = Utils.getSheetByUuid(_book, sheetId);
      }
View Full Code Here

     * <ul>
     *   <li>hidden: default is false</li>
     * </ul>
     */
    public JSONObject getRowAttrs(int row) {
      Worksheet sheet = getSelectedSheet();
      HeaderPositionHelper helper = Spreadsheet.this.getRowPositionHelper(sheet);
      JSONObject attrs = new JSONObject();
      //row num
      attrs.put("r", row);
     
View Full Code Here

      smartUpdate("rowSize", (Object) new Object[] { "", Utils.getSheetUuid(sheet), result}, true);
    }

    @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

      return info == null ? Boolean.FALSE : Boolean.valueOf(info.hidden);
    }

    @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

      _selectedSheetId = null;
      _selectedSheetName = null;
    }

    if (_selectedSheet == null || !_selectedSheet.getSheetName().equals(name)) {
      Worksheet sheet = book.getWorksheet(name);
      if (sheet == null) {
        throw new UiException("No such sheet : " + name);
      }

      if (_selectedSheet != null)
View Full Code Here

TOP

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

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.