public class ListTableModel extends Object implements TableModel
PageableTable| Modifier and Type | Field and Description |
|---|---|
static String |
CELL_RENDERER |
static String |
MAX_WIDTH |
| Constructor and Description |
|---|
ListTableModel()
Creates a new ListTableModel with a empty list model
|
ListTableModel(List l)
Creates a new ListTableModel with model set to List l
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Object o)
Add a Object to underlaying list
|
void |
addAction(Action action)
Add an action to action List
|
void |
addTableModelListener(TableModelListener listener) |
void |
check(List<Serializable> keys)
Check a list of keys
|
void |
checkAll()
Check all models on list
|
int |
columnToPropertyIndex(int column)
Convert column model index to property index
|
void |
fireTableCellUpdated(int row,
int column)
Notifies all listeners that the value of the cell at
[row, column] has been updated. |
void |
fireTableChanged()
Fire a model table changed
|
void |
fireTableChanged(TableModelEvent e)
Fire a TableModelChanged event
|
List<Action> |
getActions() |
List<Serializable> |
getChecked()
Get a List with all selected model keys
|
Class<?> |
getColumnClass(int columnIndex) |
int |
getColumnCount() |
String |
getColumnName(int columnIndex)
Get the column name of an index
|
List<String> |
getColumnNames() |
List<ColumnDefinition> |
getColumns() |
TableCellRenderer |
getDefaultTableCellRenderer() |
List<String> |
getDisplayNames() |
Map<String,Boolean> |
getEditableMap() |
List |
getList() |
org.springframework.context.MessageSource |
getMessageSource() |
Class |
getModelClass() |
int |
getPropertyCount() |
String |
getPropertyName(int index)
Get a property name from column index, used in PageableTable
|
int |
getRowCount() |
String |
getSortPropertyName(int column) |
TableColumnModel |
getTableColumnModel()
Create a TableColumnModel for JTable.
|
Object |
getValueAt(int rowIndex,
int columnIndex) |
List |
getVisibleChecked() |
void |
init()
Initialize table.
|
boolean |
isActionColumn(int column) |
boolean |
isCellEditable(int rowIndex,
int columnIndex) |
boolean |
isCheckColum(int column)
Test if index is a check column
|
boolean |
isPropertyColumn(int column)
Test if index is a property column
|
boolean |
isUsingActions() |
boolean |
isUsingChecks() |
boolean |
isUsingIntrospection() |
Iterator<?> |
iterator() |
Object |
remove(int index)
Remove a object from underlaying list model
|
void |
remove(Object toRemove) |
void |
removeAll(Collection toRemove) |
void |
removeTableModelListener(TableModelListener l) |
void |
setActions(List<Action> actions) |
void |
setColumnEditable(int columnIndex,
boolean value) |
void |
setColumnNames(List<String> columnNames) |
void |
setColumnNames(String[] columnNames) |
void |
setColumns(List<ColumnDefinition> columns) |
void |
setDefaultTableCellRenderer(TableCellRenderer defaultTableCellRenderer) |
void |
setDisplayNames(List<String> displayNames) |
void |
setDisplayNames(String[] displayNames) |
void |
setEditableMap(Map<String,Boolean> editableMap) |
void |
setList(List list) |
void |
setMessageSource(org.springframework.context.MessageSource messageSource) |
void |
setModelClass(Class modelClass) |
void |
setUsingActions(boolean useActions) |
void |
setUsingChecks(boolean useChecks) |
void |
setUsingIntrospection(boolean usingIntrospection) |
void |
setValueAt(Object value,
int rowIndex,
int columnIndex) |
void |
uncheckAll()
Uncheck All checks
|
public static final String MAX_WIDTH
public static final String CELL_RENDERER
public ListTableModel(List l)
l - the list to set as modelpublic ListTableModel()
public String getColumnName(int columnIndex)
getColumnName in interface TableModelpublic Class<?> getColumnClass(int columnIndex)
getColumnClass in interface TableModelpublic int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface TableModelpublic Object getValueAt(int rowIndex, int columnIndex)
getValueAt in interface TableModelpublic void setValueAt(Object value, int rowIndex, int columnIndex)
setValueAt in interface TableModelpublic void fireTableCellUpdated(int row,
int column)
[row, column] has been updated.row - row of cell which has been updatedcolumn - column of cell which has been updatedTableModelEvent,
EventListenerListpublic void addTableModelListener(TableModelListener listener)
addTableModelListener in interface TableModelpublic void removeTableModelListener(TableModelListener l)
removeTableModelListener in interface TableModelpublic void init()
public void fireTableChanged(TableModelEvent e)
e - event to firepublic TableColumnModel getTableColumnModel()
public boolean add(Object o)
o - the object to addpublic Object remove(int index)
index - column to removepublic boolean isPropertyColumn(int column)
column - index to checkpublic boolean isCheckColum(int column)
column - column index to checkpublic boolean isActionColumn(int column)
public String getPropertyName(int index)
index - to convertpublic int columnToPropertyIndex(int column)
column - the column to convertpublic void fireTableChanged()
public void setColumnEditable(int columnIndex,
boolean value)
public void setList(List list)
public List getList()
public Iterator<?> iterator()
public boolean isUsingIntrospection()
public void setUsingIntrospection(boolean usingIntrospection)
public int getPropertyCount()
public void setColumnNames(String[] columnNames)
public void setDisplayNames(String[] displayNames)
public boolean isUsingChecks()
public void setUsingChecks(boolean useChecks)
public boolean isUsingActions()
public void setUsingActions(boolean useActions)
public void check(List<Serializable> keys)
keys - public List<Serializable> getChecked()
public List getVisibleChecked()
public void uncheckAll()
public void addAction(Action action)
action - public Class getModelClass()
public void setModelClass(Class modelClass)
modelClass - the modelClass to setpublic List<ColumnDefinition> getColumns()
public void setColumns(List<ColumnDefinition> columns)
columns - the columns to setpublic TableCellRenderer getDefaultTableCellRenderer()
public void setDefaultTableCellRenderer(TableCellRenderer defaultTableCellRenderer)
defaultTableCellRenderer - the defaultTableCellRenderer to setpublic String getSortPropertyName(int column)
column - column indexpublic org.springframework.context.MessageSource getMessageSource()
@Autowired public void setMessageSource(org.springframework.context.MessageSource messageSource)
messageSource - the messageSource to setpublic void checkAll()
public void removeAll(Collection toRemove)
toRemove - public void remove(Object toRemove)
Copyright © 2014 JDAL. All Rights Reserved.