SPsheet
jhplot

Class SPsheet



  • public class SPsheetextends Object
    A spreadsheet to display multidimensional data.
    • Constructor Summary

      Constructors 
      Constructor and Description
      SPsheet()
      Show empty spreadsheet
      SPsheet(CSVReader reader)
      Open spreadsheet and load csv file
      SPsheet(DataHolder dh)
      Build a spreadsheet from multidimensional data holder
      SPsheet(double[] a)
      Build a spreadsheet from 1D array
      SPsheet(double[][] a)
      Build a spreadsheet from 2D array
      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
      SPsheet(PND pnd)
      Build a spreadsheet from the PND container
      SPsheet(PNI pnd)
      Build a spreadsheet from the PND container
    • Method Summary

      Methods 
      Modifier and TypeMethod and Description
      voidaddColumn(double[] a)
      Add a column.
      voidaddRow()
      Adds row to end of table
      voidaddRow(double[] a)
      Add a row from a vector.
      voiddoc()
      Show online documentation.
      voidfillWithVectors(String title, String[] names, Double[][] arrayList)
      Fill the table from the Vectors
      sharptools.SharpTableModelgetTableModel()
      Get table model.
      ObjectgetValueAt(int aRow, int aColumn)
      This method returns the cell object at those coordinates.
      voidinsertRow(double[] a, int row)
      Inser a row at position
      voidsetCellAt(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.
      voidsetStringAt(String value, int aRow, int aColumn)
      Set string value at a position
      voidsetValueAt(double value, int aRow, int aColumn)
      Set value of a spreadsheet
      voidsetValueAt(Object aValue, int aRow, int aColumn)
      This method sets the value of the cell specified with these coordinates to aValue.
    • Constructor Detail

      • SPsheet

        public SPsheet()
        Show empty spreadsheet
      • SPsheet

        public SPsheet(double[] a)
        Build a spreadsheet from 1D array
        Parameters:
        a - Input array
      • SPsheet

        public SPsheet(double[][] a)
        Build a spreadsheet from 2D array
        Parameters:
        a - Input array
      • SPsheet

        public SPsheet(P1D p1d)
        Build a spreadsheet from the P1D container
        Parameters:
        p1d - Input container
      • SPsheet

        public SPsheet(PND pnd)
        Build a spreadsheet from the PND container
        Parameters:
        pnd - Input container
      • SPsheet

        public SPsheet(PNI pnd)
        Build a spreadsheet from the PND container
        Parameters:
        pni - 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

      • addRow

        public void addRow()
        Adds row to end of table
      • setValueAt

        public void setValueAt(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(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 calculate 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(String title,                   String[] names,                   Double[][] arrayList)
        Fill the table from the Vectors
        Parameters:
        title - New title
        names - Vector with names
        arrayList - Vector with the data
      • getValueAt

        public 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
      • setValueAt

        public void setValueAt(double value,              int aRow,              int aColumn)
        Set value of a spreadsheet
        Parameters:
        value - value
        aRow - row
        aColumn - column
      • setStringAt

        public void setStringAt(String value,               int aRow,               int aColumn)
        Set string value at a position
        Parameters:
        value - string
        aRow - row
        aColumn - column
      • getTableModel

        public sharptools.SharpTableModel getTableModel()
        Get table model.
        Returns:
      • addRow

        public void addRow(double[] a)
        Add a row from a vector.
        Parameters:
        a - input array to be added.
      • insertRow

        public void insertRow(double[] a,             int row)
        Inser a row at position
        Parameters:
        a - array of values
        row - position
      • addColumn

        public void addColumn(double[] a)
        Add a column.
        Parameters:
        a - column to added.
      • doc

        public void doc()
        Show online documentation.

SCaVis 2.2 © jWork.ORG