KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > jawe > xml > elements > DataType


1 /* DataType.java
2  *
3  * Authors:
4  * Stefanovic Nenad chupo@iis.ns.ac.yu
5  * Bojanic Sasa sasaboy@neobee.net
6  * Puskas Vladimir vpuskas@eunet.yu
7  * Pilipovic Goran zboniek@uns.ac.yu
8  *
9  */

10
11 package org.enhydra.jawe.xml.elements;
12
13 import org.enhydra.jawe.xml.*;
14 import org.enhydra.jawe.xml.panels.*;
15
16 /**
17 * Represents a WfMC DTD element that has the similar name.
18 *
19 * @see XML
20 */

21 public class DataType extends XMLComplexElement {
22    private DataTypes refDataTypes;
23
24    /**
25    * Creates a new instance of the class.
26    *
27    * @param p The package which elements holds instance of
28    * of this class.
29    */

30    public DataType (Package JavaDoc p) {
31       super();
32
33       refDataTypes=new DataTypes(this,p,null,0);
34
35       fillStructure();
36    }
37
38    /**
39    * Defines the super-class method. Read the explanation for
40    * this method within XMLComplexElement class.
41    */

42    protected void fillStructure () {
43       refDataTypes.setRequired(true);
44       complexStructure.add(refDataTypes);
45    }
46
47    /**
48    * Returns the value of choosen type.
49    *
50    * @return The value of choosen data type.
51    */

52    public Object JavaDoc toValue () {
53       return refDataTypes.toValue();
54    }
55
56    /**
57    * Prepares the panel with a combo box to choose the one of
58    * allowed data types.
59    *
60    * @return XMLPanel to be shown.
61    */

62    public XMLPanel getPanel () {
63       return refDataTypes.getPanel();
64    }
65 }
66
Popular Tags