Documentation of 'jhplot.SPsheet' Java class.
SPsheet
jhplot

Class SPsheet



  • public class SPsheet
    extends java.lang.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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addColumn(double[] a)
      Add a column.
      void addRow()
      Adds row to end of table
      void addRow(double[] a)
      Add a row from a vector.
      void doc()
      Show online documentation.
      void fillWithVectors(java.lang.String title, java.lang.String[] names, java.lang.Double[][] arrayList)
      Fill the table from the Vectors
      sharptools.SharpTableModel getTableModel()
      Get table model.
      java.lang.Object getValueAt(int aRow, int aColumn)
      This method returns the cell object at those coordinates.
      void insertRow(double[] a, int row)
      Inser a row at position
      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 setStringAt(java.lang.String value, int aRow, int aColumn)
      Set string value at a position
      void setValueAt(double value, int aRow, int aColumn)
      Set value of a spreadsheet
      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(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(CSVReader reader)
                throws java.io.IOException
        Open spreadsheet and load csv file
        Parameters:
        reader - CSVReader
        Throws:
        java.io.IOException
      • 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(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 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(java.lang.String title,
                                    java.lang.String[] names,
                                    java.lang.Double[][] arrayList)
        Fill the table from the Vectors
        Parameters:
        title - New title
        names - Vector with names
        arrayList - 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
      • 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(java.lang.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.

DMelt 3.0 © DataMelt by jWork.ORG