jhplot
Class SPsheet

java.lang.Object
  extended by jhplot.SPsheet

public class SPsheet
extends java.lang.Object

A spreadsheet class to display the data


Constructor Summary
SPsheet()
          Show empty spreadsheet
SPsheet(DataHolder dh)
          Build a spreadsheet from multidimensional data holder
SPsheet(F1D f1d)
          Build a spreadsheet from the F1D function
SPsheet(H1D h1d)
          Build a spreadsheet from the H1D histogram
SPsheet(P1D p1d)
          Build a spreadsheet from the P1D container
 
Method Summary
 void fillWithVectors(java.lang.String title, java.util.Vector names, java.util.Vector data)
          Fill the table from the Vectors
 java.lang.Object getValueAt(int aRow, int aColumn)
          This method returns the cell object at those coordinates.
 void setCellAt(java.lang.Object input, int aRow, int aColumn)
          This fill assumes that the object passes to it is already the correct object to set the value of the cell as.
 void setValueAt(java.lang.Object aValue, int aRow, int aColumn)
          This method sets the value of the cell specified with these coordinates to aValue.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPsheet

public SPsheet()
Show empty spreadsheet


SPsheet

public SPsheet(P1D p1d)
Build a spreadsheet from the P1D container

Parameters:
p1d - Input container

SPsheet

public SPsheet(H1D h1d)
Build a spreadsheet from the H1D histogram

Parameters:
h1d - Input histogram

SPsheet

public SPsheet(F1D f1d)
Build a spreadsheet from the F1D function

Parameters:
f1d - Input function

SPsheet

public SPsheet(DataHolder dh)
Build a spreadsheet from multidimensional data holder

Parameters:
dh - Input data
Method Detail

setValueAt

public void setValueAt(java.lang.Object aValue,
                       int aRow,
                       int aColumn)
This method sets the value of the cell specified with these coordinates to aValue. It does the parsing of string objects to see if they are numbers or formulas. If you do not want any parsing at all, use setCellAt.

Parameters:
aValue - value to set cell to
aRow - row coordinate of cell
aColumn - column coordinate of cell

setCellAt

public void setCellAt(java.lang.Object input,
                      int aRow,
                      int aColumn)
This fill assumes that the object passes to it is already the correct object to set the value of the cell as. For a formula, it also calculcates the value of the formula and records that in the cell.

Parameters:
input - object to set the Cell value as
aRow - row of cell to set
aColumn - column of cell to set

fillWithVectors

public void fillWithVectors(java.lang.String title,
                            java.util.Vector names,
                            java.util.Vector data)
Fill the table from the Vectors

Parameters:
title - New title
names - Vector with names
data - Vector with the data

getValueAt

public java.lang.Object getValueAt(int aRow,
                                   int aColumn)
This method returns the cell object at those coordinates. It does exactly the same thing as getCellAt except that the return type is Object. It is implemented because TableModel requires this method return an Object.

Parameters:
aRow - the row coordinate
aColumn - the column coordinate
Returns:
the Cell


jHepWork 1.1 (C) Chekanov