KickJava   Java API By Example, From Geeks To Geeks.

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


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  * factory for generating password ctrls
20  */

21 public class Password extends EditCtrl {
22   public static final String JavaDoc NODENAME = "password";
23
24   public static boolean isPassword(Element JavaDoc elem) {
25     return elem.getNodeName().equals(NODENAME);
26   }
27
28   /** factory function for password ctrl */
29   public static Element JavaDoc createPasswordCtrl(Document JavaDoc doc) {
30     return createValueHolder(doc, NODENAME);
31   }
32
33   /** factory function for adding text ctrl to parent */
34   public static Element JavaDoc addPasswordCtrl(Element JavaDoc parent) {
35     Element JavaDoc pwdCtrl = createPasswordCtrl(parent.getOwnerDocument());
36     parent.appendChild(pwdCtrl);
37     return pwdCtrl;
38   }
39
40 }
41
Popular Tags