public class TableViewAdapter extends AbstractTableModel implements TableViewModelListener
TableViewModel to TableModel.listenerList| 构造器和说明 |
|---|
TableViewAdapter(TableViewModel pModel)
Construct.
|
| 限定符和类型 | 方法和说明 |
|---|---|
TableViewColumn |
getColumn(int pVisibleIndex)
Get the table view column from table model index.
|
Class |
getColumnClass(int pColumnIndex)
Returns the column class
|
int |
getColumnCount()
Returns the number of column
|
String |
getColumnName(int pColumnIndex)
Returns the name of the column
|
TableViewModel |
getModel()
Get the model to be adapted
|
Object |
getNewRow(int pRowIndex)
Convert a model index to row Object.
|
int |
getRowCount()
Get the number of column.
|
String |
getSearchText(int pColumn)
Returns the text to search.
|
String |
getSearchText(TableViewColumn pColumn)
Gets the search text
|
int |
getSortColumnIndex()
Returns the index if the sorted column.
|
Object |
getValueAt(int pRowIndex,
int pColumnIndex)
Returns the cell value.
|
int |
indexOf(Object pRow)
Convert row Object to index.
|
boolean |
isAsendent()
Returns the sorted direction
|
boolean |
isCellEditable(int pRowIndex,
int pColumnIndex)
Return the editable status.
|
boolean |
isMakeIndex()
Is the index made
|
boolean |
isVisible(TableViewColumn pColumn)
Returns the visiblity of a column
|
static String |
replace(String pSource,
String pReplace,
String pWith)
Replave in a string
|
void |
search(TableViewColumn pColumn,
String pText)
Search
|
void |
setMakeIndex(boolean pMakeIndex)
Sets the index is made
|
void |
setValueAt(Object pValue,
int pRowIndex,
int pColumnIndex)
Set a sell value.
|
boolean |
setVisible(TableViewColumn pColumn,
boolean pVisible)
Stes the column visible
|
void |
sort(TableViewColumn pColumn)
Sort
|
void |
tableViewChanged(TableViewModelEvent pEvent)
Redirect tTable view model changes to table model changes.
|
public TableViewAdapter(TableViewModel pModel)
pModel - model to adaptepublic boolean setVisible(TableViewColumn pColumn, boolean pVisible)
pColumn - the columnpVisible - to visible valuepublic void search(TableViewColumn pColumn, String pText)
pColumn - the column to searchpText - the text to searchpublic String getSearchText(TableViewColumn pColumn)
pColumn - the colimn to querypublic void sort(TableViewColumn pColumn)
pColumn - the column to sortpublic Object getNewRow(int pRowIndex)
pRowIndex - the table model indexpublic int indexOf(Object pRow)
pRow - the row Objectpublic int getRowCount()
getRowCount 在接口中 TableModelpublic TableViewColumn getColumn(int pVisibleIndex)
pVisibleIndex - table model indexpublic int getColumnCount()
getColumnCount 在接口中 TableModelpublic String getColumnName(int pColumnIndex)
getColumnName 在接口中 TableModelgetColumnName 在类中 AbstractTableModelpColumnIndex - the table model column indexpublic Class getColumnClass(int pColumnIndex)
getColumnClass 在接口中 TableModelgetColumnClass 在类中 AbstractTableModelpColumnIndex - the table model column indexpublic boolean isCellEditable(int pRowIndex,
int pColumnIndex)
isCellEditable 在接口中 TableModelisCellEditable 在类中 AbstractTableModelpRowIndex - the table model row indexpColumnIndex - the table model column indexpublic Object getValueAt(int pRowIndex, int pColumnIndex)
getValueAt 在接口中 TableModelpRowIndex - the table model row indexpColumnIndex - the table model column indexpublic void setValueAt(Object pValue, int pRowIndex, int pColumnIndex)
setValueAt 在接口中 TableModelsetValueAt 在类中 AbstractTableModelpValue - the new valuepRowIndex - the table model row indexpColumnIndex - the table model column indexpublic void tableViewChanged(TableViewModelEvent pEvent)
tableViewChanged 在接口中 TableViewModelListenerpEvent - the eventpublic TableViewModel getModel()
public boolean isVisible(TableViewColumn pColumn)
pColumn - the table view columnpublic int getSortColumnIndex()
public boolean isAsendent()
public String getSearchText(int pColumn)
pColumn - table model column indexpublic boolean isMakeIndex()
public void setMakeIndex(boolean pMakeIndex)
pMakeIndex - the index is madeCopyright © 2023 onecode. All rights reserved.