|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.joseluismartin.gui.ListTableModel
public class ListTableModel
TableModel that use a List of Objects to hold data.
PageableTable
Field Summary | |
---|---|
static String |
CELL_RENDERER
|
static String |
MAX_WIDTH
|
Constructor Summary | |
---|---|
ListTableModel()
Creates a new ListTableModel with a empty list model |
|
ListTableModel(List l)
Creates a new ListTableModel with model set to List l |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MAX_WIDTH
public static final String CELL_RENDERER
Constructor Detail |
---|
public ListTableModel(List l)
l
- the list to set as modelpublic ListTableModel()
Method Detail |
---|
public String getColumnName(int columnIndex)
getColumnName
in interface TableModel
public Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface TableModel
public int getRowCount()
getRowCount
in interface TableModel
public int getColumnCount()
getColumnCount
in interface TableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
public Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface TableModel
public void setValueAt(Object value, int rowIndex, int columnIndex)
setValueAt
in interface TableModel
public 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
,
EventListenerList
public void addTableModelListener(TableModelListener listener)
addTableModelListener
in interface TableModel
public void removeTableModelListener(TableModelListener l)
removeTableModelListener
in interface TableModel
public void init()
public void fireTableChanged(TableModelEvent e)
e
- event to firepublic TableColumnModel getTableColumnModel()
public boolean add(Object o)
o
- the object to add
public Object remove(int index)
index
- column to remove
public boolean isPropertyColumn(int column)
column
- index to check
public boolean isCheckColum(int column)
column
- column index to check
public boolean isActionColumn(int column)
public String getPropertyName(int index)
index
- to convert
public int columnToPropertyIndex(int column)
column
- the column to convert
public void fireTableChanged()
public void setColumnEditable(int columnIndex, boolean value)
public void setEditableMap(Map<String,Boolean> editableMap)
public void setList(List list)
public List getList()
public Iterator<?> iterator()
public boolean isUsingIntrospection()
public void setUsingIntrospection(boolean usingIntrospection)
public List<String> getColumnNames()
public int getPropertyCount()
public void setColumnNames(List<String> columnNames)
public void setColumnNames(String[] columnNames)
public List<String> getDisplayNames()
public void setDisplayNames(List<String> displayNames)
public void setDisplayNames(String[] displayNames)
public boolean isUsingChecks()
public void setUsingChecks(boolean useChecks)
public List<Action> getActions()
public void setActions(List<Action> actions)
public boolean isUsingActions()
public void setUsingActions(boolean useActions)
public Map<String,Boolean> getEditableMap()
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 index
public 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |