java.io.Serializable, javax.swing.table.TableModelpublic class ViewerTableModel
extends javax.swing.table.AbstractTableModel
| Constructor | Description |
|---|---|
ViewerTableModel(PlasticStarTable startable) |
Constructs a ViewerTableModel from a StarTable.
|
| Modifier and Type | Method | Description |
|---|---|---|
long |
getBaseRow(int irow) |
Returns the index of the data model row corresponding
to a given row in this view model.
|
int |
getColumnCount() |
|
int |
getRowCount() |
|
int[] |
getRowMap() |
Returns the mapping from row index visible in this model to
row index in the base table.
|
uk.ac.starlink.table.StarTable |
getRowPermutedView(uk.ac.starlink.table.StarTable table) |
Returns a view of a given table whose rows are permuted in the same way
as the current view is permuted with respect to the basic table.
|
uk.ac.starlink.table.StarTable |
getSnapshot() |
Returns a new StarTable whose data corresponds to the current state of
this ViewerTableModel.
|
RowSubset |
getSubset() |
Returns the RowSubset currently used by the viewer model.
|
java.lang.Object |
getValueAt(int irow,
int icol) |
|
int |
getViewRow(long lrow) |
Returns the index at which a given table row appears in this view model.
|
boolean |
isCellEditable(int irow,
int icol) |
|
void |
setOrder(int[] order) |
Configures this view to view the rows of the base model in a
given order.
|
void |
setRowMap(int[] rowMap) |
Sets the mapping from row index visible in this model to
row index in the base table.
|
void |
setSubset(RowSubset rset) |
Configures this view to view only a subset of the rows of the base
model.
|
void |
setValueAt(java.lang.Object val,
int irow,
int icol) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, removeTableModelListenerpublic ViewerTableModel(PlasticStarTable startable)
startable - the StarTable objectjava.lang.IllegalArgumentException - if startable.isRandom
returns falsepublic void setOrder(int[] order)
order - mapping of rows in the table view, or null
to indicate natural orderingpublic void setSubset(RowSubset rset)
rset - RowSubset object indicating inclusion in subset of
rows to be viewedpublic RowSubset getSubset()
public int[] getRowMap()
public void setRowMap(int[] rowMap)
rowMap - row mapping;
may be null to indicate a unit mappublic int getColumnCount()
public int getRowCount()
public long getBaseRow(int irow)
irow - index of the row in this view modelpublic int getViewRow(long lrow)
lrow - index of the row in the base tablepublic java.lang.Object getValueAt(int irow,
int icol)
public boolean isCellEditable(int irow,
int icol)
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.AbstractTableModelpublic void setValueAt(java.lang.Object val,
int irow,
int icol)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.AbstractTableModelpublic uk.ac.starlink.table.StarTable getSnapshot()
public uk.ac.starlink.table.StarTable getRowPermutedView(uk.ac.starlink.table.StarTable table)
table - table to be permutedCopyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.