Package cds.table
Class TableModel
- java.lang.Object
-
- cds.table.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 tablevoid
addRow(java.util.ArrayList values)
Adds a row to the tablejava.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 columnvoid
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 tableint
getRowCount()
java.lang.String[]
getTableProperties()
Returns the Table properties (description, resource)java.lang.String
getTableProperty(java.lang.String tablePropName)
Returns a property valuejava.lang.String
getValueAt(int row, int col)
Returns the value of a cellvoid
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 columnvoid
setRow(int index, java.lang.String[] values)
Sets (replace) a row value of the tablevoid
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 valuevoid
setValueAt(int row, int col, java.lang.String value)
Sets the value of a cell
-
-
-
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
- VectorfieldPropertyValues
- 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
- Stringvalue
- 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
- intvalues
- String[]
-
getValueAt
public java.lang.String getValueAt(int row, int col)
Returns the value of a cell- Parameters:
row
- intcol
- int- Returns:
- String
-
setValueAt
public void setValueAt(int row, int col, java.lang.String value)
Sets the value of a cell- Parameters:
row
- intcol
- intvalue
- 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
- intvalues
- String[]
-
getProperties
public java.lang.String getProperties(int col, java.lang.String propName)
Returns the value of a given column- Parameters:
col
- intpropName
- 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
- intpropName
- Stringvalue
- 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
-
-