Package cds.table

Class TableModel


  • public final class TableModel
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TableModel()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addRow​(java.lang.String[] row)
      Adds a row to the table
      void addRow​(java.util.ArrayList values)
      Adds a row to the table
      java.lang.String getDescription()  
      java.lang.String getId()  
      java.lang.String getName()  
      java.lang.String[] getProperties​(int col)
      Returns the property name list of a column (VOTable FIELD content for example (name, ID, unit, description, UCD, ...)
      java.lang.String getProperties​(int col, java.lang.String propName)
      Returns the value of a given column
      void getProperties​(int col, java.lang.String[] values)
      Sets the property name list of a column (VOTable FIELD content for example (name, ID, unit, description, UCD, ...)
      java.lang.String[] getRow​(int index)
      Returns a row value of the table
      int getRowCount()  
      java.lang.String[] getTableProperties()
      Returns the Table properties (description, resource)
      java.lang.String getTableProperty​(java.lang.String tablePropName)
      Returns a property value
      java.lang.String getValueAt​(int row, int col)
      Returns the value of a cell
      void setDescription​(java.lang.String description)  
      void setId​(java.lang.String id)  
      void setName​(java.lang.String name)  
      void setProperty​(int col, java.lang.String propName, java.lang.String value)
      Returns the value of a given column
      void setRow​(int index, java.lang.String[] values)
      Sets (replace) a row value of the table
      void setTableProperties​(java.lang.String[] properties)
      Sets the Table properties (description, resource)
      void setTableProperties​(java.util.ArrayList fieldPropertyNames, java.util.ArrayList fieldPropertyValues)  
      void setTableProperty​(java.lang.String tablePropName, java.lang.String value)
      Sets a property value
      void setValueAt​(int row, int col, java.lang.String value)
      Sets the value of a cell
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TableModel

        public TableModel()
    • Method Detail

      • getTableProperties

        public java.lang.String[] getTableProperties()
        Returns the Table properties (description, resource)
        Returns:
        String[]
      • setTableProperties

        public void setTableProperties​(java.lang.String[] properties)
        Sets the Table properties (description, resource)
      • setTableProperties

        public void setTableProperties​(java.util.ArrayList fieldPropertyNames,
                                       java.util.ArrayList fieldPropertyValues)
        Parameters:
        fieldPropertyNames - Vector
        fieldPropertyValues - Vector
      • getTableProperty

        public java.lang.String getTableProperty​(java.lang.String tablePropName)
        Returns a property value
        Parameters:
        tablePropName - String
        Returns:
        String
      • setTableProperty

        public void setTableProperty​(java.lang.String tablePropName,
                                     java.lang.String value)
        Sets a property value
        Parameters:
        tablePropName - String
        value - String
      • getRow

        public java.lang.String[] getRow​(int index)
        Returns a row value of the table
        Parameters:
        index - int
        Returns:
        String[]
      • addRow

        public void addRow​(java.lang.String[] row)
        Adds a row to the table
        Parameters:
        row - String[]
      • addRow

        public void addRow​(java.util.ArrayList values)
        Adds a row to the table
        Parameters:
        values - String[]
      • setRow

        public void setRow​(int index,
                           java.lang.String[] values)
        Sets (replace) a row value of the table
        Parameters:
        index - int
        values - String[]
      • getValueAt

        public java.lang.String getValueAt​(int row,
                                           int col)
        Returns the value of a cell
        Parameters:
        row - int
        col - int
        Returns:
        String
      • setValueAt

        public void setValueAt​(int row,
                               int col,
                               java.lang.String value)
        Sets the value of a cell
        Parameters:
        row - int
        col - int
        value - String
      • getProperties

        public java.lang.String[] getProperties​(int col)
        Returns the property name list of a column (VOTable FIELD content for example (name, ID, unit, description, UCD, ...)
        Parameters:
        col - int
        Returns:
        String[]
      • getProperties

        public void getProperties​(int col,
                                  java.lang.String[] values)
        Sets the property name list of a column (VOTable FIELD content for example (name, ID, unit, description, UCD, ...)
        Parameters:
        col - int
        values - String[]
      • getProperties

        public java.lang.String getProperties​(int col,
                                              java.lang.String propName)
        Returns the value of a given column
        Parameters:
        col - int
        propName - String
        Returns:
        String
      • setProperty

        public void setProperty​(int col,
                                java.lang.String propName,
                                java.lang.String value)
        Returns the value of a given column
        Parameters:
        col - int
        propName - String
        value - String
      • setDescription

        public void setDescription​(java.lang.String description)
      • getDescription

        public java.lang.String getDescription()
        Returns:
        String
      • setId

        public void setId​(java.lang.String id)
        Parameters:
        id - String
      • getId

        public java.lang.String getId()
        Returns:
        String
      • setName

        public void setName​(java.lang.String name)
        Parameters:
        name - String
      • getName

        public java.lang.String getName()
        Returns:
        String
      • getRowCount

        public int getRowCount()
        Returns:
        int