public abstract class UITableModelAdapter<T> extends javax.swing.table.AbstractTableModel implements UITableEditorLoader
限定符和类型 | 类和说明 |
---|---|
protected class |
UITableModelAdapter.AddTableRowAction |
protected class |
UITableModelAdapter.DeleteAction |
protected class |
UITableModelAdapter.EditAction |
protected class |
UITableModelAdapter.MoveDownAction |
protected class |
UITableModelAdapter.MoveUpAction |
限定符和类型 | 字段和说明 |
---|---|
protected javax.swing.JTable |
table |
限定符 | 构造器和说明 |
---|---|
protected |
UITableModelAdapter(java.lang.String[] columnNames) |
限定符和类型 | 方法和说明 |
---|---|
void |
addRow(T obj)
增加行
|
void |
clear()
去除所有
|
javax.swing.JTable |
createTable()
创建表
|
void |
fireTableDataChanged()
通知所有linstener,Table每一行的值可能改变,并检查
|
java.lang.Class<?> |
getColumnClass(int columnIndex) |
int |
getColumnCount() |
java.lang.String |
getColumnName(int col) |
java.util.List<T> |
getList() |
int |
getRowCount() |
T |
getSelectedValue() |
abstract java.lang.Object |
getValueAt(int rowIndex,
int columnIndex) |
abstract boolean |
isCellEditable(int row,
int col)
单元格是否可编辑
|
void |
removeRow(int rowIndex)
去掉行
|
void |
setColumnClass(java.lang.Class<?>[] classes) |
void |
setDefaultEditor(java.lang.Class<?> columnClass,
javax.swing.table.TableCellEditor editor) |
void |
setDefaultRenderer(java.lang.Class<?> columnClass,
javax.swing.table.TableCellRenderer renderer) |
void |
setList(java.util.List<T> list) |
void |
setRowAt(T value,
int rowIndwx) |
void |
setSelectedValue(T value) |
void |
stopCellEditing()
停止编辑
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createAction
public javax.swing.JTable createTable()
public java.lang.String getColumnName(int col)
getColumnName
在接口中 javax.swing.table.TableModel
getColumnName
在类中 javax.swing.table.AbstractTableModel
public T getSelectedValue()
public void setColumnClass(java.lang.Class<?>[] classes)
public void setDefaultEditor(java.lang.Class<?> columnClass, javax.swing.table.TableCellEditor editor)
public void setDefaultRenderer(java.lang.Class<?> columnClass, javax.swing.table.TableCellRenderer renderer)
public void setList(java.util.List<T> list)
public java.util.List<T> getList()
public void addRow(T obj)
obj
- 行public void setSelectedValue(T value)
public void setRowAt(T value, int rowIndwx)
public void removeRow(int rowIndex)
rowIndex
- 行号public void clear()
public void fireTableDataChanged()
fireTableDataChanged
在类中 javax.swing.table.AbstractTableModel
public java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass
在接口中 javax.swing.table.TableModel
getColumnClass
在类中 javax.swing.table.AbstractTableModel
public int getRowCount()
getRowCount
在接口中 javax.swing.table.TableModel
public int getColumnCount()
getColumnCount
在接口中 javax.swing.table.TableModel
public abstract java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
在接口中 javax.swing.table.TableModel
public void stopCellEditing()
stopCellEditing
在接口中 UITableEditorLoader
public abstract boolean isCellEditable(int row, int col)
isCellEditable
在接口中 javax.swing.table.TableModel
isCellEditable
在类中 javax.swing.table.AbstractTableModel
row
- 行col
- 列