csheets.ext.style
Class StylableSpreadsheet

java.lang.Object
  extended by csheets.ext.SpreadsheetExtension
      extended by csheets.ext.style.StylableSpreadsheet
All Implemented Interfaces:
Spreadsheet, Extensible<Spreadsheet>, Serializable, Iterable<Cell>

public class StylableSpreadsheet
extends SpreadsheetExtension

An extension of a spreadsheet, with support for style, i.e. row and column dimensions and cell spanning.

Author:
Einar Pehrson
See Also:
Serialized Form

Constructor Summary
protected StylableSpreadsheet(Spreadsheet spreadsheet)
          Creates a stylable cell spreadsheet for the given spreadsheet.
 
Method Summary
 int getColumnWidth(int column)
          Returns the width of the given column.
 int getRowHeight(int row)
          Returns the height of the given row.
 void setColumnWidth(int column, int width)
          Sets the width of the given column.
 void setRowHeight(int row, int height)
          Sets the height of the given row.
 
Methods inherited from class csheets.ext.SpreadsheetExtension
addCellListener, getCell, getCell, getCellListeners, getCells, getColumn, getColumnCount, getExtension, getName, getRow, getRowCount, getTitle, getWorkbook, iterator, removeCellListener, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StylableSpreadsheet

protected StylableSpreadsheet(Spreadsheet spreadsheet)
Creates a stylable cell spreadsheet for the given spreadsheet.

Parameters:
spreadsheet - the spreadsheet to extend
Method Detail

getRowHeight

public int getRowHeight(int row)
Returns the height of the given row.

Parameters:
row - the index of the row
Returns:
the height of the given row, or -1 if the default height applies

setRowHeight

public void setRowHeight(int row,
                         int height)
Sets the height of the given row.

Parameters:
row - the index of the row
height - the height of the row

getColumnWidth

public int getColumnWidth(int column)
Returns the width of the given column.

Parameters:
column - the index of the column
Returns:
the width of the given column, or -1 if the default width applies

setColumnWidth

public void setColumnWidth(int column,
                           int width)
Sets the width of the given column.

Parameters:
column - the index of the column
width - the width of the column