Interface ITabularData


  • public interface ITabularData
    ITabularData is an interface to an instance of Dashboard Studio tabular data. ITabularData instances are used as function arguments and return types where tabular data is required. Use the factory class TabularDataFactory to create instances of ITabularData.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addColumn​(java.lang.String colName, int colType)
      Add a column to a data table.
      void addRow​(java.lang.String rowName)
      Add a new row to the data table.
      void clearRemovedRows()
      Clear all removed rows from the data table.
      java.lang.Object clone()
      Create a copy of the data table.
      boolean getBooleanCellValue​(int rowNumber, int colNumber)
      Get the value of a boolean cell in a data table.
      java.lang.String getCellValue​(int rowNumber, int colNumber)
      Get the value of a cell in a data table.
      int getColumnIndex​(java.lang.String colName)
      Get the index of a column in a data table.
      java.lang.String[] getColumnNames()
      Get the names of the columns in a data table.
      int[] getColumnTypeCodes()
      Get the types of the columns in a data table.
      java.util.Enumeration getDataArrays()
      Get the data arrays for the data in a data table.
      double getDoubleCellValue​(int rowNumber, int colNumber)
      Get the value of a double cell in a data table.
      float getFloatCellValue​(int rowNumber, int colNumber)
      Get the value of a float cell in a data table.
      int getIntCellValue​(int rowNumber, int colNumber)
      Get the value of an integer cell in a data table.
      long getLongCellValue​(int rowNumber, int colNumber)
      Get the value of a long cell in a data table.
      int getNumColumns()
      Get the number of columns in data table.
      int getNumRows()
      Get the number of rows in a data table.
      java.lang.String[] getRowNames()
      Get the names of the rows in a data table.
      void insertColumnAt​(java.lang.String colName, int colType, int colNumber)
      Insert a column into the data table.
      void insertRowAt​(java.lang.String rowName, int rowNumber)
      Insert a new row into the data table.
      void removeColumnAt​(int colNumber)
      Remove a column from a data table.
      void removeRow​(java.lang.String rowName)
      Remove a single row from a data table.
      void removeRowAt​(int rowNumber)
      Remove a single row from a data table.
      void setCellValue​(boolean value, int rowNumber, int colNumber)
      Set the value of a boolean cell in a data table.
      void setCellValue​(double value, int rowNumber, int colNumber)
      Set the value of a double cell in a data table.
      void setCellValue​(float value, int rowNumber, int colNumber)
      Set the value of a float cell in a data table.
      void setCellValue​(int value, int rowNumber, int colNumber)
      Set the value of an integer cell in a data table.
      void setCellValue​(long value, int rowNumber, int colNumber)
      Set the value of a long cell in a data table.
      void setCellValue​(java.lang.String value, int rowNumber, int colNumber)
      Set the value of a string cell in a data table.
      void setDateCellValue​(long value, int rowNumber, int colNumber)
      Set the value of a date cell in a data table.
      void setDateCellValue​(java.lang.String value, int rowNumber, int colNumber)
      Set the value of a date cell in a data table.
      void sortRows()
      Sort the rows in a data table.
    • Method Detail

      • addColumn

        void addColumn​(java.lang.String colName,
                       int colType)
        Add a column to a data table.
        Parameters:
        colName - Name of column.
        colType - Data type of column (COL_TYPE_BOOLEAN, COL_TYPE_DATE, ...)
      • addRow

        void addRow​(java.lang.String rowName)
        Add a new row to the data table.
        Parameters:
        rowName - Name of the row.
      • clearRemovedRows

        void clearRemovedRows()
        Clear all removed rows from the data table. This should be called after one or more rows have been removed.
      • clone

        java.lang.Object clone()
        Create a copy of the data table.
        Returns:
        Copy of data table.
      • getBooleanCellValue

        boolean getBooleanCellValue​(int rowNumber,
                                    int colNumber)
        Get the value of a boolean cell in a data table.
        Parameters:
        rowNumber - Row of cell.
        colNumber - Column of cell.
        Returns:
        The cell value
      • getCellValue

        java.lang.String getCellValue​(int rowNumber,
                                      int colNumber)
        Get the value of a cell in a data table.
        Parameters:
        rowNumber - Row of cell.
        colNumber - Column of cell.
        Returns:
        The cell value
      • getColumnIndex

        int getColumnIndex​(java.lang.String colName)
        Get the index of a column in a data table.
        Parameters:
        colName - Name of column.
        Returns:
        Index of column.
      • getColumnNames

        java.lang.String[] getColumnNames()
        Get the names of the columns in a data table.
        Returns:
        Array of column names.
      • getColumnTypeCodes

        int[] getColumnTypeCodes()
        Get the types of the columns in a data table.
        Returns:
        Array of column types (COL_TYPE_BOOLEAN, COL_TYPE_DATE, ...).
      • getDataArrays

        java.util.Enumeration getDataArrays()
        Get the data arrays for the data in a data table. The enumeration will contain seperate arrays for each column in the data table. The type of data in the array will match the type of the corresponding column in the data table. The length of each array will match the number of rows in the data table.

        The methods in this interface should be used to add and remove rows in a data table and to set cell values. Do not manipulate the data arrays directly.
        Returns:
        Enumeration of data arrays in a data table.
      • getDoubleCellValue

        double getDoubleCellValue​(int rowNumber,
                                  int colNumber)
        Get the value of a double cell in a data table.
        Parameters:
        rowNumber - Row of cell.
        colNumber - Column of cell.
        Returns:
        The cell value
      • getFloatCellValue

        float getFloatCellValue​(int rowNumber,
                                int colNumber)
        Get the value of a float cell in a data table.
        Parameters:
        rowNumber - Row of cell.
        colNumber - Column of cell.
        Returns:
        The cell value
      • getIntCellValue

        int getIntCellValue​(int rowNumber,
                            int colNumber)
        Get the value of an integer cell in a data table.
        Parameters:
        rowNumber - Row of cell.
        colNumber - Column of cell.
        Returns:
        The cell value
      • getLongCellValue

        long getLongCellValue​(int rowNumber,
                              int colNumber)
        Get the value of a long cell in a data table.
        Parameters:
        rowNumber - Row of cell.
        colNumber - Column of cell.
        Returns:
        The cell value
      • getNumColumns

        int getNumColumns()
        Get the number of columns in data table.
        Returns:
        Number of columns.
      • getNumRows

        int getNumRows()
        Get the number of rows in a data table.
        Returns:
        Number of rows.
      • getRowNames

        java.lang.String[] getRowNames()
        Get the names of the rows in a data table.
        Returns:
        Array of row names.
      • insertColumnAt

        void insertColumnAt​(java.lang.String colName,
                            int colType,
                            int colNumber)
        Insert a column into the data table.
        Parameters:
        colName - Name of column.
        colType - Data type of column (COL_TYPE_BOOLEAN, COL_TYPE_DATE, ...)
        colNumber - Index of column.
      • insertRowAt

        void insertRowAt​(java.lang.String rowName,
                         int rowNumber)
        Insert a new row into the data table.
        Parameters:
        rowName - Name of the row.
        rowNumber - Inded of row.
      • removeColumnAt

        void removeColumnAt​(int colNumber)
        Remove a column from a data table.
        Parameters:
        colNumber - Number of column to remove.
      • removeRow

        void removeRow​(java.lang.String rowName)
        Remove a single row from a data table. After one or more rows are removed from a data table clearRemovedRows() needs to be called on the data table.
        Parameters:
        rowName - Name of row to remove.
      • removeRowAt

        void removeRowAt​(int rowNumber)
        Remove a single row from a data table. After one or more rows are removed from a data table clearRemovedRows() needs to be called on the data table.
        Parameters:
        rowNumber - Number of row to remove.
      • setCellValue

        void setCellValue​(boolean value,
                          int rowNumber,
                          int colNumber)
        Set the value of a boolean cell in a data table.
        Parameters:
        value - New value.
        rowNumber - Row of cell.
        colNumber - Column of cell.
      • setCellValue

        void setCellValue​(double value,
                          int rowNumber,
                          int colNumber)
        Set the value of a double cell in a data table.
        Parameters:
        value - New value.
        rowNumber - Row of cell.
        colNumber - Column of cell.
      • setCellValue

        void setCellValue​(float value,
                          int rowNumber,
                          int colNumber)
        Set the value of a float cell in a data table.
        Parameters:
        value - New value.
        rowNumber - Row of cell.
        colNumber - Column of cell.
      • setCellValue

        void setCellValue​(int value,
                          int rowNumber,
                          int colNumber)
        Set the value of an integer cell in a data table.
        Parameters:
        value - New value.
        rowNumber - Row of cell.
        colNumber - Column of cell.
      • setCellValue

        void setCellValue​(long value,
                          int rowNumber,
                          int colNumber)
        Set the value of a long cell in a data table.
        Parameters:
        value - New value.
        rowNumber - Row of cell.
        colNumber - Column of cell.
      • setCellValue

        void setCellValue​(java.lang.String value,
                          int rowNumber,
                          int colNumber)
        Set the value of a string cell in a data table.
        Parameters:
        value - New value.
        rowNumber - Row of cell.
        colNumber - Column of cell.
      • setDateCellValue

        void setDateCellValue​(java.lang.String value,
                              int rowNumber,
                              int colNumber)
        Set the value of a date cell in a data table.
        Parameters:
        value - New value.
        rowNumber - Row of cell.
        colNumber - Column of cell.
      • setDateCellValue

        void setDateCellValue​(long value,
                              int rowNumber,
                              int colNumber)
        Set the value of a date cell in a data table.
        Parameters:
        value - New value.
        rowNumber - Row of cell.
        colNumber - Column of cell.
      • sortRows

        void sortRows()
        Sort the rows in a data table. The rowName specified when rows were added is used as the sort criteria.