|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractListModel
edu.iastate.metnet.model.JDBCComboModel
public class JDBCComboModel
general adpater between JDBC and JComboxModel
| Field Summary | |
|---|---|
(package private) java.util.Vector |
rows
|
(package private) java.lang.Object |
selectedObject
Creates a new instance of JDBCComboModel |
| Fields inherited from class javax.swing.AbstractListModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
JDBCComboModel(java.sql.ResultSet rs)
construct the table model from the column of the result set. |
|
JDBCComboModel(java.sql.ResultSet rs,
int index)
construct the table model from the column of the result set |
|
JDBCComboModel(java.sql.ResultSet rs,
java.lang.String columnName)
construct the table model from the column of the result set |
|
| Method Summary | |
|---|---|
void |
appendResultSet(java.sql.ResultSet rs)
|
void |
appendResultSet(java.sql.ResultSet rs,
int index)
append another row data from another result set |
void |
appendResultSet(java.sql.ResultSet rs,
java.lang.String columnName)
append another row data from another result set |
java.lang.Object |
getElementAt(int param)
get the value object in the list model |
java.lang.Object |
getSelectedItem()
get the selected value object |
int |
getSize()
get the size of the combobox model |
void |
setSelectedItem(java.lang.Object anItem)
set the selected item to the specified value object |
| Methods inherited from class javax.swing.AbstractListModel |
|---|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.swing.ListModel |
|---|
addListDataListener, removeListDataListener |
| Field Detail |
|---|
java.lang.Object selectedObject
java.util.Vector rows
| Constructor Detail |
|---|
public JDBCComboModel(java.sql.ResultSet rs,
int index)
rs - the result set used by the modelindex - the column index of the result set
public JDBCComboModel(java.sql.ResultSet rs,
java.lang.String columnName)
rs - the result set used by the modelcolumnName - the name of the columnpublic JDBCComboModel(java.sql.ResultSet rs)
rs - the result set used by the model| Method Detail |
|---|
public void appendResultSet(java.sql.ResultSet rs,
int index)
rs - the result setindex - the row index
public void appendResultSet(java.sql.ResultSet rs,
java.lang.String columnName)
rs - the result set to be usedcolumnName - the name of the columnpublic void appendResultSet(java.sql.ResultSet rs)
public int getSize()
getSize in interface javax.swing.ListModelpublic java.lang.Object getElementAt(int param)
getElementAt in interface javax.swing.ListModelparam - the index of the object in the list model
public java.lang.Object getSelectedItem()
getSelectedItem in interface javax.swing.ComboBoxModelpublic void setSelectedItem(java.lang.Object anItem)
setSelectedItem in interface javax.swing.ComboBoxModelanItem - the value object to be selected
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||