|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
ca.odell.glazedlists.swing.EventTableModel
org.springframework.richclient.table.support.GlazedTableModel
public class GlazedTableModel
TableModel
that accepts a EventList
.
By default, a WritableTableFormat
will be generated for this model. If you want to change this, you can
override the createTableFormat()
method to provide your own format. In addition, an implementation of an
AdvancedTableFormat
is provided for use. It allows for the specification of an object prototype (for
determining column classes) and the ability to specify comparators per column for sorting support.
This model can be given an Id, which is used in obtaining the text of the column headers.
Column header text is generated from the column property names in the method createColumnNames
. Using the
field face source configured, or the default application field face source if none was configured.
Nested Class Summary | |
---|---|
protected class |
GlazedTableModel.DefaultAdvancedTableFormat
This inner class can be used by derived implementations to use an AdvancedTableFormat instead of the default WritableTableFormat created by createTableFormat() . |
protected class |
GlazedTableModel.DefaultTableFormat
This inner class is the default TableFormat constructed. |
Field Summary |
---|
Fields inherited from class ca.odell.glazedlists.swing.EventTableModel |
---|
swingThreadSource |
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
GlazedTableModel(Class beanClass,
ca.odell.glazedlists.EventList rows,
String[] columnPropertyNames)
Constructor using the provided row data and column property names. |
|
GlazedTableModel(ca.odell.glazedlists.EventList rows,
String[] columnPropertyNames)
Constructor using the given model data and a null model Id. |
|
GlazedTableModel(ca.odell.glazedlists.EventList rows,
String[] columnPropertyNames,
String modelId)
Fully specified Constructor. |
|
GlazedTableModel(String[] columnPropertyNames)
|
Method Summary | |
---|---|
protected String[] |
createColumnNames(String[] propertyColumnNames)
Create the text for the column headers. |
protected ca.odell.glazedlists.gui.TableFormat |
createTableFormat()
Construct the table format to use for this table model. |
protected String[] |
getColumnLabels()
|
protected String[] |
getColumnPropertyNames()
|
protected Object |
getColumnValue(Object row,
int column)
|
protected FieldFaceSource |
getFieldFaceSource()
|
String |
getModelId()
Get the model Id. |
protected boolean |
isEditable(Object row,
int column)
May be overridden to achieve control over editable columns. |
protected Object |
setColumnValue(Object row,
Object value,
int column)
|
void |
setFieldFaceSource(FieldFaceSource fieldFaceSource)
|
Methods inherited from class ca.odell.glazedlists.swing.EventTableModel |
---|
dispose, getColumnClass, getColumnCount, getColumnName, getElementAt, getRowCount, getTableFormat, getValueAt, isCellEditable, listChanged, setTableFormat, setValueAt |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GlazedTableModel(String[] columnPropertyNames)
public GlazedTableModel(Class beanClass, ca.odell.glazedlists.EventList rows, String[] columnPropertyNames)
beanClass
.
beanClass
- rows
- columnPropertyNames
- public GlazedTableModel(ca.odell.glazedlists.EventList rows, String[] columnPropertyNames)
rows
- The data for the modelcolumnPropertyNames
- Names of properties to show in the table columnsmodelId
- Id for this model, used to create column header message keyspublic GlazedTableModel(ca.odell.glazedlists.EventList rows, String[] columnPropertyNames, String modelId)
rows
- The data for the modelcolumnPropertyNames
- Names of properties to show in the table columnsmodelId
- Id for this model, used to create column header message keysMethod Detail |
---|
public void setFieldFaceSource(FieldFaceSource fieldFaceSource)
protected FieldFaceSource getFieldFaceSource()
protected Object getColumnValue(Object row, int column)
protected String[] getColumnLabels()
protected String[] getColumnPropertyNames()
public String getModelId()
protected boolean isEditable(Object row, int column)
row
- the current rowcolumn
- the column
protected Object setColumnValue(Object row, Object value, int column)
protected String[] createColumnNames(String[] propertyColumnNames)
propertyColumnNames
-
protected ca.odell.glazedlists.gui.TableFormat createTableFormat()
GlazedTableModel.DefaultTableFormat
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |