01: package br.com.gfpshare.beans;
02:
03: import javax.swing.ComboBoxModel;
04: import javax.swing.DefaultComboBoxModel;
05:
06: public abstract class LazyComboBoxModel extends DefaultComboBoxModel
07: implements ComboBoxModel {
08: public LazyComboBoxModel() {
09: addElement(BeansMessages.getMessages().getString("loading"));
10: new DataLoader().start();
11: }
12:
13: private class DataLoader extends Thread {
14: @Override
15: public void run() {
16: carregarDados();
17: }
18: }
19:
20: public abstract void carregarDados();
21: }
|