root / tags / Root_CqCMSDvp / libraries / libCq CMS for java.old / src / org / cresques / ui / LoadableComboBox.java @ 1732
History | View | Annotate | Download (857 Bytes)
1 |
/*
|
---|---|
2 |
* Creado el 04-sep-2004
|
3 |
*/
|
4 |
package org.cresques.ui; |
5 |
|
6 |
import java.awt.event.ItemEvent; |
7 |
|
8 |
import javax.swing.JComboBox; |
9 |
|
10 |
/**
|
11 |
* @author "Luis W. Sevilla" <sevilla_lui@gva.es>
|
12 |
*/
|
13 |
public class LoadableComboBox extends JComboBox { |
14 |
public LoadableComboBox() {
|
15 |
super();
|
16 |
initialize(); |
17 |
// addItemListener(this);
|
18 |
// setSize(new java.awt.Dimension(185, 23));
|
19 |
} |
20 |
|
21 |
/**
|
22 |
* This method initializes this
|
23 |
*
|
24 |
* @return void
|
25 |
*/
|
26 |
private void initialize() { |
27 |
this.setPreferredSize(new java.awt.Dimension(185,23)); |
28 |
|
29 |
} |
30 |
public void loadData(String data[]) { |
31 |
if (data == null) return; |
32 |
for (int i=0; i<data.length; i++) |
33 |
addItem(data[i]); |
34 |
} |
35 |
|
36 |
/* public void itemStateChanged(ItemEvent e) {
|
37 |
if (e.getStateChange() == ItemEvent.SELECTED) {
|
38 |
//label.setVisible(true);
|
39 |
} else {
|
40 |
//label.setVisible(false);
|
41 |
}
|
42 |
}*/
|
43 |
} |
44 |
|