01: package net.xoetrope.swing;
02:
03: import javax.swing.JComboBox;
04:
05: import net.xoetrope.xui.XListHolder;
06:
07: /**
08: * <p>A wrapper for the Swing JComboBox class</p>
09: * <p>Copyright (c) Xoetrope Ltd., 1998-2003<br>
10: * License: see license.txt
11: * @version 1.0
12: */
13: public class XComboBox extends JComboBox implements XListHolder {
14: public XComboBox() {
15: super ();
16: }
17:
18: public void addItem(String s) {
19: super .addItem(s);
20: }
21:
22: public void select(int i) {
23: super .setSelectedIndex(i);
24: }
25:
26: public void select(Object o) {
27: super .setSelectedItem(o);
28: }
29:
30: public Object getSelectedObject() {
31: return getSelectedItem();
32: }
33:
34: public void add(String s) {
35: }
36:
37: public void removeAll() {
38: super.removeAllItems();
39: }
40: }
|