org.tbee.swing.jdbc
Class JdbcComboBoxModel
java.lang.Object
javax.swing.AbstractListModel
org.tbee.swing.jdbc.JdbcListModel
org.tbee.swing.jdbc.JdbcComboBoxModel
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.ComboBoxModel, javax.swing.ListModel, TableModelValueWrapper.ValueWrapperFactory
public class JdbcComboBoxModel
- extends JdbcListModel
- implements javax.swing.ComboBoxModel
Extends the JdbcListModel for usage with the ComboBoxModel.
Note: if this is used within a JTable, make sure it is registered as a ValueWrapper:
table.setValueWrapper(c, comboBoxModel);
- Version:
- $Revision: 1.7 $
- See Also:
- Serialized Form
|
Field Summary |
static java.lang.String |
SOURCECODE_VERSION
Standard variable for determining version of a class file. |
| Fields inherited from class javax.swing.AbstractListModel |
listenerList |
|
Constructor Summary |
JdbcComboBoxModel(java.sql.Connection connection,
java.lang.String sql,
boolean hideFirstColumn)
Derrived from JdbcListModel |
JdbcComboBoxModel(java.sql.Connection connection,
java.lang.String sql,
boolean hideFirstColumn,
boolean cached)
Derrived from JdbcListModel |
|
Method Summary |
java.lang.Object |
getSelectedItem()
Implements the method in the ComboBoxModel interface |
void |
setSelectedItem(java.lang.Object item)
Implements the method in the ComboBoxModel interface
This method receives the key of the |
| Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.swing.ListModel |
addListDataListener, getElementAt, getSize, removeListDataListener |
SOURCECODE_VERSION
public static final java.lang.String SOURCECODE_VERSION
- Standard variable for determining version of a class file.
- See Also:
- Constant Field Values
JdbcComboBoxModel
public JdbcComboBoxModel(java.sql.Connection connection,
java.lang.String sql,
boolean hideFirstColumn)
throws java.sql.SQLException
- Derrived from JdbcListModel
- Parameters:
connection - sql - hideFirstColumn -
- Throws:
java.sql.SQLException
JdbcComboBoxModel
public JdbcComboBoxModel(java.sql.Connection connection,
java.lang.String sql,
boolean hideFirstColumn,
boolean cached)
throws java.sql.SQLException
- Derrived from JdbcListModel
- Parameters:
connection - sql - hideFirstColumn -
- Throws:
java.sql.SQLException
getSelectedItem
public java.lang.Object getSelectedItem()
- Implements the method in the ComboBoxModel interface
- Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel
- Returns:
- Object
- See Also:
ComboBoxModel.getSelectedItem()
setSelectedItem
public void setSelectedItem(java.lang.Object item)
- Implements the method in the ComboBoxModel interface
This method receives the key of the
- Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel
- See Also:
ComboBoxModel.setSelectedItem(java.lang.Object)
Copyright © 2010. All Rights Reserved.