KickJava   Java API By Example, From Geeks To Geeks.

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


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.Element JavaDoc;
16
17 import com.tonbeller.wcf.format.BasicTypes;
18 import com.tonbeller.wcf.utils.XoplonNS;
19
20 /**
21  * A DOM element with attributes describing a data type.
22  * @author av
23  */

24 public class TypedCtrl extends XoplonCtrl implements BasicTypes {
25   
26
27   /** Set format string */
28   public static void setFormatString(Element JavaDoc element, String JavaDoc formatString) {
29     XoplonNS.setAttribute(element, "format", formatString);
30   }
31
32   /** Get format string */
33   public static String JavaDoc getFormatString(Element JavaDoc element) {
34     return XoplonNS.getAttribute(element, "format");
35   }
36
37   /** returns the data type */
38   public static String JavaDoc getType(Element JavaDoc element) {
39     return XoplonNS.getAttribute(element, "type");
40   }
41
42   /** sets data type */
43   public static void setType(Element JavaDoc element, String JavaDoc type) {
44     XoplonNS.setAttribute(element, "type", type);
45   }
46
47
48 }
49
Popular Tags