Package: javax.swing.* |
Product: Swing |
Release: 1.0.3 |
Related Links: |
ComboBox
JDialog
JFileChooser
JFrame
JOptionPane
JProgressBar
JScrollPane
JTable
General
JTree
JWindow
KeyStroke
LayeredPane
UIDefaults
|
Comment: |
class AbstractComboBoxModel extends AbstractListModel implements ComboBoxModel { private Object selectedObject = null; public void setSelectedItem(Object item) { selectedObject = item; //dbg("" + selectedObject); fireContentsChanged(this, -1, -1); } public Object getSelectedItem() { return selectedObject; } public Object getElementAt(int i) { if (getCargadoors() != null && i <= getSize()) { return getCargadoors().elementAt(i); } return null; } public int getSize() { if (getCargadoors() != null) { return getCargadoors().size(); } return 0; } } |