public class UsersTableModel extends AbstractMultipleOptionsTableModel<User>
Context
.listenerList
Constructor and Description |
---|
UsersTableModel()
Instantiates a new user table model.
|
UsersTableModel(List<User> users)
Instantiates a new users table model.
|
Modifier and Type | Method and Description |
---|---|
void |
addUser(User user)
Adds a new user to this model
|
Class<?> |
getColumnClass(int columnIndex) |
int |
getColumnCount() |
String |
getColumnName(int column) |
List<User> |
getElements() |
int |
getRowCount() |
List<User> |
getUsers()
Gets the internal list of users managed by this model.
|
Object |
getValueAt(int rowIndex,
int columnIndex) |
boolean |
isCellEditable(int rowIndex,
int columnIndex) |
void |
removeAllUsers()
Removes all the users for this model.
|
void |
setUsers(List<User> users)
Sets a new list of users for this model.
|
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex) |
fireTableColumnUpdated, setAllEnabled
addElement, clear, getElement, modifyElement, removeElement
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
public UsersTableModel(List<User> users)
users
- the userspublic UsersTableModel()
public int getColumnCount()
public int getRowCount()
public Object getValueAt(int rowIndex, int columnIndex)
public List<User> getElements()
getElements
in class AbstractMultipleOptionsBaseTableModel<User>
public List<User> getUsers()
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
public void setUsers(List<User> users)
users
- the new userspublic void removeAllUsers()
public void addUser(User user)
user
- the userpublic Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
public String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public void setValueAt(Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel