1 |
alfonx |
1161 |
package skrueger.geotools.io; |
2 |
|
|
|
3 |
|
|
import javax.swing.DefaultComboBoxModel; |
4 |
|
|
import javax.swing.JComboBox; |
5 |
|
|
|
6 |
|
|
public class DbSettingsJComboBox extends JComboBox { |
7 |
|
|
|
8 |
|
|
private final DbServerList dbList; |
9 |
|
|
|
10 |
|
|
public DbSettingsJComboBox(DbServerList wfsList) { |
11 |
|
|
super(wfsList.toArray(new DbServerSettings[0])); |
12 |
|
|
this.dbList = wfsList; |
13 |
|
|
} |
14 |
|
|
|
15 |
|
|
public DbServerList getDbList() { |
16 |
|
|
return dbList; |
17 |
|
|
} |
18 |
|
|
|
19 |
|
|
public void listChanged() { |
20 |
|
|
setModel(new DefaultComboBoxModel(dbList.toArray(new DbServerSettings[0]))); |
21 |
|
|
} |
22 |
|
|
|
23 |
|
|
} |