public class PropertyTableModel extends AbstractTableModel implements CellTableModel
listenerList
Constructor and Description |
---|
PropertyTableModel(List<String> readableProperties,
Object bean,
String propertiesRBBaseName,
Locale locale) |
PropertyTableModel(Object bean,
String propertiesRBBaseName,
Locale locale)
Creates a new instance of PropertyTableModel
|
Modifier and Type | Method and Description |
---|---|
Object |
getBean() |
Class |
getCellClass(int row,
int column) |
int |
getColumnCount()
Returns the number of columns in the model.
|
String |
getColumnName(int column) |
Locale |
getLocale() |
String |
getPropertiesRBBaseName() |
String |
getPropertyName(int row) |
List<String> |
getPropertyNames() |
int |
getRowCount()
Returns the number of rows in the model.
|
Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value for the cell at
columnIndex and rowIndex . |
boolean |
isCellEditable(int rowIndex,
int columnIndex) |
void |
setLocale(Locale locale)
Setter for property locale.
|
void |
setPropertiesRBBaseName(String propertiesRBBaseName) |
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex)
This empty implementation is provided so users don't have to implement this method if their data model is not editable.
|
void |
stopListening() |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addTableModelListener, getColumnClass, removeTableModelListener
public PropertyTableModel(Object bean, String propertiesRBBaseName, Locale locale) throws IntrospectionException
bean
- the bean to displaypropertiesRBBaseName
- the base name of the properties resource bundlelocale
- the localeIntrospectionException
- if an introspection error occurspublic int getColumnCount()
JTable
uses this method to determine how many columns it should create and display by default.getColumnCount
in interface TableModel
getRowCount()
public int getRowCount()
JTable
uses this method to determine how many rows it should display. This method should be quick, as it is called frequently during
rendering.getRowCount
in interface TableModel
getColumnCount()
public Object getValueAt(int rowIndex, int columnIndex)
columnIndex
and rowIndex
.getValueAt
in interface TableModel
rowIndex
- the row whose value is to be queriedcolumnIndex
- the column whose value is to be queriedpublic void setValueAt(Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel
aValue
- value to assign to cellrowIndex
- row of cellcolumnIndex
- column of cellpublic boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
public String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public Class getCellClass(int row, int column)
getCellClass
in interface CellTableModel
public String getPropertyName(int row)
public Object getBean()
public Locale getLocale()
public void setLocale(Locale locale)
locale
- New value of property locale.public String getPropertiesRBBaseName()
public void setPropertiesRBBaseName(String propertiesRBBaseName)
public void stopListening()
Copyright © 2002–2019 SoftSmithy. All rights reserved.