class DocsTableModel
extends javax.swing.table.AbstractTableModel
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String[] |
columnNames
Labels for the columns
|
private java.lang.Object[][] |
data
Container for the data.
|
private java.lang.String[] |
noScoreColumnNames
Labels for the columns docid and title
|
private java.lang.Object[][] |
noScoreData
Container for the data, docid and title.
|
private java.lang.String[] |
scoreColumnNames
Labels for the columns score, docid and title
|
private java.lang.Object[][] |
scoreData
Container for the data, score, docid, and title.
|
(package private) boolean |
showScores |
| Constructor and Description |
|---|
DocsTableModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the data array.
|
void |
displayScores(boolean display)
Turn score display on or off.
|
java.lang.Class |
getColumnClass(int c) |
int |
getColumnCount() |
java.lang.String |
getColumnName(int col) |
int |
getRowCount() |
java.lang.Object |
getValueAt(int row,
int col) |
void |
resize(int row)
Resize the data array to contain
row number of rows. |
void |
setValueAt(int row,
double score,
java.lang.String doc,
java.lang.String title)
Update an entry for a row
|
void |
setValueAt(int row,
java.lang.String doc,
java.lang.String title)
Update an entry for a row
|
void |
setValueAt(java.lang.Object obj,
int row,
int col) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListenerboolean showScores
private java.lang.String[] noScoreColumnNames
private java.lang.String[] scoreColumnNames
private java.lang.String[] columnNames
private java.lang.Object[][] noScoreData
private java.lang.Object[][] scoreData
private java.lang.Object[][] data
public int getColumnCount()
public int getRowCount()
public java.lang.String getColumnName(int col)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelpublic java.lang.Object getValueAt(int row,
int col)
public java.lang.Class getColumnClass(int c)
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelpublic void resize(int row)
row number of rows.row - Number of rows for the new array.public void displayScores(boolean display)
display - true to display scores, false to notpublic void clear()
public void setValueAt(java.lang.Object obj,
int row,
int col)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.AbstractTableModelpublic void setValueAt(int row,
java.lang.String doc,
java.lang.String title)
row - The row indexdoc - The document nametitle - The document title if anypublic void setValueAt(int row,
double score,
java.lang.String doc,
java.lang.String title)
row - The row indexscore - The document scoredoc - The document nametitle - The document title if any