|
S-PLUS Connect/Java v1.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
com.insightful.splus.util.StringMatrixTableModel
public class StringMatrixTableModel
Contains a String representation of an S-PLUS data.frame or matrix. It requires an S-PLUS expression which produces a String vector giving: number of rows, number of columns, row names, column names, and values by column.
For an existing data.frame or matrix, use:
javaGuiStringMatrix(dataName)This class does no error checking of the format of the result. The result must have at least one row and column, and must have consistent lengths for the row & column numbers, row & column names, and data values.
This class implements the AbstractTableModel methods. It also provides methods for obtaining row and column names. The column names can be used in a JTableHeader, while the row names can be used with a JScrollPane as is done in the NamedTableScrollPane class to prevent the row names from scrolling.
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
StringMatrixTableModel(String expression)
Create the table model based on an S-PLUS expression. |
Method Summary | |
---|---|
int |
getColumnCount()
Get the number of columns. |
String |
getColumnName(int column)
Get the column name for a particular column. |
String[] |
getColumnNames()
Get all column names. |
int |
getRowCount()
Get the number of rows. |
String |
getRowName(int row)
Get the row name for a particular row. |
String[] |
getRowNames()
Get all row names. |
Object |
getValueAt(int row,
int column)
Get the value at a particular row/column location. |
void |
refresh()
Query the engine to get the table information. |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringMatrixTableModel(String expression)
Method Detail |
---|
public int getRowCount()
public int getColumnCount()
public Object getValueAt(int row, int column)
public String getRowName(int row)
public String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public String[] getRowNames()
public String[] getColumnNames()
public void refresh()
|
S-PLUS Connect/Java v1.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |