KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > wcf > ui > ListBox1


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package com.tonbeller.wcf.ui;
14
15 import org.w3c.dom.Document JavaDoc;
16 import org.w3c.dom.Element JavaDoc;
17
18 import com.tonbeller.wcf.utils.XoplonNS;
19
20 /**
21  * single selection listbox
22  */

23 public class ListBox1 extends SelectSingle {
24   public static final String JavaDoc NODENAME = "listBox1";
25
26   public static boolean isListBox1(Element JavaDoc elem) {
27     return elem.getNodeName().equals(NODENAME);
28   }
29
30   /** factory function to create listbox */
31   public static Element JavaDoc createListBox1(Document JavaDoc doc) {
32     Element JavaDoc listBox = XoplonCtrl.createCtrl(doc, NODENAME);
33     XoplonNS.setAttribute(listBox, "multiple", "false");
34     return listBox;
35   }
36
37   /** factory function for adding listbox to parent */
38   public static Element JavaDoc addListBox1(Element JavaDoc parent) {
39     Element JavaDoc listBox = createListBox1(parent.getOwnerDocument());
40     parent.appendChild(listBox);
41     return listBox;
42   }
43
44
45 }
46
Popular Tags