Package org.zkoss.zss.model

Examples of org.zkoss.zss.model.Range


    return range.getText();
  }
 
  public static FormatText getFormatText(Cell cell) {
    //TODO, shall cache the FormatText inside cell. value/style/evaluate then invalidate the cache
    Range range = getRange((Worksheet)cell.getSheet(), cell.getRowIndex(), cell.getColumnIndex());
    return range.getFormatText();
  }
View Full Code Here


   * Sets the user input text into the cell.
   * @param cell the cell.
   * @param txt the user input text.
   */
  public static void setEditText(Cell cell, String txt) {
    final Range range = getRange((Worksheet)cell.getSheet(), cell.getRowIndex(), cell.getColumnIndex());
    range.setEditText(txt);
  }
View Full Code Here

   * Returns the {@link RichTextString} for editing on the cell.
   * @param cell the cell
   * @return the {@link RichTextString} for editing on the cell.
   */
  public static RichTextString getRichEditText(Cell cell) {
    final Range range = getRange((Worksheet)cell.getSheet(), cell.getRowIndex(), cell.getColumnIndex());
    return range.getRichEditText();
  }
View Full Code Here

   * Sets the user input {@link RichTextString} into the cell.
   * @param cell the cell
   * @param value the user input {@link RichTextString} to be set into the cell.
   */
  public static void setRichEditText(Cell cell, RichTextString value) {
    final Range range = getRange((Worksheet)cell.getSheet(), cell.getRowIndex(), cell.getColumnIndex());
    range.setRichEditText(value);
  }
View Full Code Here

    final Range range = getRange((Worksheet)cell.getSheet(), cell.getRowIndex(), cell.getColumnIndex());
    range.setRichEditText(value);
  }
 
  public static void mergeCells(Worksheet sheet, int tRow, int lCol, int bRow, int rCol, boolean across) {
    Range rng = getRange(sheet, tRow, lCol, bRow, rCol);
    rng.merge(across);
  }
View Full Code Here

    Range rng = getRange(sheet, tRow, lCol, bRow, rCol);
    rng.merge(across);
  }
 
  public static void unmergeCells(Worksheet sheet, int tRow, int lCol, int bRow, int rCol) {
    Range rng = getRange(sheet, tRow, lCol, bRow, rCol);
    rng.unMerge();
  }
View Full Code Here

   * @param col
   * @param px column width in pixel
   */
  public static void setColumnWidth(Worksheet sheet, int col, int px) {
    final int char256 = Utils.pxToFileChar256(px, ((Book)sheet.getWorkbook()).getDefaultCharWidth());
    final Range rng = Utils.getRange(sheet, -1 , col);
    rng.setColumnWidth(char256);
  }
View Full Code Here

   * @param row
   * @param px row height in pixel
   */
  public static void setRowHeight(Worksheet sheet, int row, int px) {
    final int points = Utils.pxToPoint(px);
    final Range rng = Utils.getRange(sheet, row, -1);
    rng.setRowHeight(points);
  }
View Full Code Here

    rng.setRowHeight(points);
  }
 
  public static void moveRows(Worksheet sheet, int tRow, int bRow, int nRow) {
    final int maxcol = ((Book)sheet.getWorkbook()).getSpreadsheetVersion().getLastColumnIndex();
    final Range rng = Utils.getRange(sheet, tRow, 0, bRow, maxcol);
    rng.move(nRow, 0);
  }
View Full Code Here

    rng.move(nRow, 0);
  }

  public static void moveColumns(Worksheet sheet, int lCol, int rCol, int nCol) {
    final int maxrow = ((Book)sheet.getWorkbook()).getSpreadsheetVersion().getLastRowIndex();
    final Range rng = Utils.getRange(sheet, 0, lCol, maxrow, rCol);
    rng.move(0, nCol);
  }
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.