| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SpreadsheetBuilder
This interface allows you to build a spreadsheet representation in memory from scratch. Used instead of loading one from a file or other source.
This interface is an API only. Do not implement it yourself.
See the tutorial for details.
SpreadsheetCompiler.newSpreadsheetBuilder()| Nested Class Summary | |
|---|---|
| static interface | SpreadsheetBuilder.CellRefOpaque handle for a constructed cell in a spreadsheet, used to reference the cell again in the expression of other, calculated cells. | 
| static interface | SpreadsheetBuilder.ConstantOpaque handle for a constant value supported by the spreadsheet builder. | 
| static interface | SpreadsheetBuilder.ExprNodeOpaque handle for an node of an expression tree used to define calculated cells. | 
| static interface | SpreadsheetBuilder.FactoryFactory interface for ImplementationLocator.getInstance(Class). | 
| static interface | SpreadsheetBuilder.RangeRefOpaque handle for a range in a spreadsheet, used to reference the range again in the expression of other, calculated cells. | 
| Method Summary | |
|---|---|
|  SpreadsheetBuilder.Constant | cst(boolean _const)Returns a boolean constant value. | 
|  SpreadsheetBuilder.Constant | cst(java.util.Date _const)Returns a date constant value. | 
|  SpreadsheetBuilder.Constant | cst(java.lang.Number _const)Returns a numeric constant value. | 
|  SpreadsheetBuilder.Constant | cst(java.lang.String _const)Returns a string constant value. | 
|  SpreadsheetBuilder.CellRef | currentCell()Returns a reference to the cell created last. | 
|  SpreadsheetBuilder.ExprNode | fun(Function _fun,
    SpreadsheetBuilder.ExprNode... _args)Returns an expression tree node which applies a function to the values of its argument nodes. | 
|  Spreadsheet | getSpreadsheet()Returns the constructed spreadsheet. | 
|  SpreadsheetBuilder | nameCell(java.lang.String _name)Defines a name for the cell created last. | 
|  SpreadsheetBuilder | nameRange(SpreadsheetBuilder.RangeRef _range,
          java.lang.String _name)Defines a name for the given range. | 
|  SpreadsheetBuilder | newCell()Creates a new, blank cell in the current row. | 
|  SpreadsheetBuilder | newCell(SpreadsheetBuilder.Constant _const)Creates a new cell in the current row with a constant value. | 
|  SpreadsheetBuilder | newCell(SpreadsheetBuilder.ExprNode _expr)Creates a new, calculated cell in the current row, with the given expression tree defining its formula. | 
|  SpreadsheetBuilder | newRow()Terminates the current row and starts a new, empty one in the current sheet. | 
|  SpreadsheetBuilder | newSheet()Terminates the current sheet and starts a new one, with a new, empty first row. | 
|  SpreadsheetBuilder.ExprNode | op(Operator _op,
   SpreadsheetBuilder.ExprNode... _args)Returns an expression tree node which applies an operator to the values of its argument nodes. | 
|  SpreadsheetBuilder.RangeRef | range(SpreadsheetBuilder.CellRef _oneCorner,
      SpreadsheetBuilder.CellRef _otherCorner)Returns a range defined by two diagonally opposed corner cells. | 
|  SpreadsheetBuilder.ExprNode | ref(SpreadsheetBuilder.CellRef _cell)Returns an expression tree node which evaluates to the value of another cell, defined earlier. | 
|  SpreadsheetBuilder.ExprNode | ref(SpreadsheetBuilder.Constant _const)Returns an expression tree node which always evaluates to the given, constant value. | 
|  SpreadsheetBuilder.ExprNode | ref(SpreadsheetBuilder.RangeRef _rng)Returns an expression tree node which specifies a range of cells, defined earlier. | 
|  SpreadsheetBuilder | styleCell(java.lang.String _styleName)Remembers a style name for this cell for use by the SpreadsheetSaver. | 
|  SpreadsheetBuilder | styleRow(java.lang.String _styleName)Remembers a style name for this row for use by the SpreadsheetSaver. | 
| Method Detail | 
|---|
Spreadsheet getSpreadsheet()
SpreadsheetBuilder newSheet()
this (for call chaining).Spreadsheet.SheetSpreadsheetBuilder newRow()
this (for call chaining).Spreadsheet.RowSpreadsheetBuilder styleRow(java.lang.String _styleName)
SpreadsheetSaver.
_styleName - is an arbitrary string used by the SpreadsheetSaver.
this (for call chaining).SpreadsheetBuilder newCell(SpreadsheetBuilder.Constant _const)
_const - is the value of the new cell.
this (for call chaining).Spreadsheet.CellSpreadsheetBuilder newCell(SpreadsheetBuilder.ExprNode _expr)
_expr - is the expression tree defining the cell's formula.
this (for call chaining).Spreadsheet.CellSpreadsheetBuilder newCell()
this (for call chaining).Spreadsheet.CellSpreadsheetBuilder nameCell(java.lang.String _name)
_name - is the name for the cell. Must be unique in the spreadsheet.
this (for call chaining).newCell(org.formulacompiler.spreadsheet.SpreadsheetBuilder.Constant), 
newCell(org.formulacompiler.spreadsheet.SpreadsheetBuilder.ExprNode), 
Spreadsheet.getCell(String), 
Spreadsheet.getRange(String)SpreadsheetBuilder styleCell(java.lang.String _styleName)
SpreadsheetSaver.
_styleName - is an arbitrary string used by the SpreadsheetSaver.
this (for call chaining).SpreadsheetBuilder.CellRef currentCell()
this (for call chaining).ref(org.formulacompiler.spreadsheet.SpreadsheetBuilder.CellRef)
SpreadsheetBuilder.RangeRef range(SpreadsheetBuilder.CellRef _oneCorner,
                                  SpreadsheetBuilder.CellRef _otherCorner)
_oneCorner - is one of the two corners defining the range._otherCorner - is the other of the two corners defining the range.
SpreadsheetBuilder nameRange(SpreadsheetBuilder.RangeRef _range,
                             java.lang.String _name)
_name - is the name for the range. Must be unique in the spreadsheet.
this (for call chaining).Spreadsheet.getRange(String)SpreadsheetBuilder.Constant cst(java.lang.Number _const)
SpreadsheetBuilder.Constant cst(java.lang.String _const)
SpreadsheetBuilder.Constant cst(java.util.Date _const)
SpreadsheetBuilder.Constant cst(boolean _const)
SpreadsheetBuilder.ExprNode ref(SpreadsheetBuilder.CellRef _cell)
_cell - is the reference to the other cell.currentCell()SpreadsheetBuilder.ExprNode ref(SpreadsheetBuilder.RangeRef _rng)
_rng - is the reference to the range.range(org.formulacompiler.spreadsheet.SpreadsheetBuilder.CellRef,
      org.formulacompiler.spreadsheet.SpreadsheetBuilder.CellRef)SpreadsheetBuilder.ExprNode ref(SpreadsheetBuilder.Constant _const)
_const - is the constant.
SpreadsheetBuilder.ExprNode op(Operator _op,
                               SpreadsheetBuilder.ExprNode... _args)
_op - is the operator._args - is the list of arguments. The number of arguments depends on the operator. Most
           operators need two arguments.
SpreadsheetBuilder.ExprNode fun(Function _fun,
                                SpreadsheetBuilder.ExprNode... _args)
_fun - is the function._args - is the list of arguments. The number of arguments depends on the function.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||