org.tbee.swing.jdbc
Class JdbcListModel
java.lang.Object
javax.swing.AbstractListModel
org.tbee.swing.jdbc.JdbcListModel
- All Implemented Interfaces:
- Serializable, ListModel, TableModelValueWrapper.ValueWrapperFactory
- Direct Known Subclasses:
- JdbcComboBoxModel
public class JdbcListModel
- extends AbstractListModel
- implements ListModel, TableModelValueWrapper.ValueWrapperFactory
This model populates a ListModel from a ResultSet (or SQL statement).
It offers support for the TableModelValueWrapper so Comboboxes may show a different description for their actual values.
- Version:
- $Revision: 1.10 $
- See Also:
- Serialized Form
SOURCECODE_VERSION
public static final String SOURCECODE_VERSION
- Standard variable for determining version of a class file.
- See Also:
- Constant Field Values
JdbcListModel
public JdbcListModel(Connection connection,
String sql,
boolean hideFirstColumn)
throws SQLException
- Parameters:
connection - sql - hideFirstColumn -
- Throws:
SQLException
JdbcListModel
public JdbcListModel(Connection connection,
String sql,
boolean hideFirstColumn,
boolean cached)
throws SQLException
- Parameters:
connection - sql - hideFirstColumn -
- Throws:
SQLException
reload
public void reload()
throws SQLException
- Requery
- Throws:
SQLException
finalize
public void finalize()
- clean up
- Overrides:
finalize in class Object
getSize
public int getSize()
- Specified by:
getSize in interface ListModel
getElementAt
public Object getElementAt(int idx)
- Specified by:
getElementAt in interface ListModel
wrap
public TableModelValueWrapper.ValueWrapper wrap(Object value)
- This implementation of JTable.ValueWrapperFactory
- Specified by:
wrap in interface TableModelValueWrapper.ValueWrapperFactory
Copyright © 2012 KnowledgePlaza. All Rights Reserved.