KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
19  * Form ctrl class, used as factory for generating buttons
20  */

21 public class Form extends XoplonCtrl {
22   public static final String JavaDoc NODENAME = "form";
23
24   public static boolean isForm(Element JavaDoc elem) {
25     return elem.getNodeName().equals(NODENAME);
26   }
27
28   public static Element JavaDoc createForm(Document JavaDoc doc) {
29     Element JavaDoc retVal = XoplonCtrl.createCtrl(doc, NODENAME);
30     return retVal;
31   }
32
33   public static Element JavaDoc addForm(Element JavaDoc parent) {
34     Element JavaDoc form = createForm(parent.getOwnerDocument());
35     parent.appendChild(form);
36     return form;
37   }
38
39 }
40
Popular Tags