KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwt > awt > List


1 /*
2    SwingWT
3    Copyright(c)2003-2004, R. Rawson-Tetley
4
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file.
7
8    Contact me by electronic mail: bobintetley@users.sourceforge.net
9
10    $Log: List.java,v $
11    Revision 1.5 2004/03/21 17:22:53 bobintetley
12    Compatibility methods for awt Graphics, List and Label. Dummy Applet implementation
13
14    Revision 1.4 2004/01/15 10:11:14 bobintetley
15    Fixed AWT constructors/hierarchy
16
17    Revision 1.3 2003/12/14 09:13:38 bobintetley
18    Added CVS log to source headers
19
20 */

21
22 package swingwt.awt;
23
24 public class List extends swingwtx.swing.JList {
25
26     public List() { super(); }
27     public List(Object JavaDoc[] items) { super(items); }
28     public List(java.util.Vector JavaDoc items) { super(items); }
29     public List(int rows) { super(); }
30     public List(int rows, boolean multipleMode) { super(); }
31     
32     public void add(String JavaDoc item) {
33         super.addItem(item);
34     }
35     
36     public int countItems() {
37         return super.getItemCount();
38     }
39     
40     public String JavaDoc getItem(int index) {
41         return super.getItemAt(index).toString();
42     }
43     
44     public void select(int index) {
45         super.setSelectedIndex(index);
46     }
47     
48     public void remove(String JavaDoc item) {
49         super.removeItem(item);
50     }
51     
52     public void remove(int index) {
53         super.removeItemAt(index);
54     }
55     
56     public void removeAll() {
57         super.removeAllItems();
58     }
59     
60     public void replaceItem(String JavaDoc item, int index) {
61         super.replaceItemAt(item, index);
62     }
63
64 }
65
Popular Tags