KickJava   Java API By Example, From Geeks To Geeks.

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


1 /* ConformanceClass.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 import org.w3c.dom.*;
16
17 /**
18 * Represents a WfMC DTD element that has the similar name.
19 */

20 public class ConformanceClass extends XMLComplexElement {
21
22    private XMLAttribute attrGraphConformance=new XMLAttribute("GraphConformance",
23       new String JavaDoc[] {
24          "",
25          "FULL_BLOCKED",
26          "LOOP_BLOCKED",
27          "NON_BLOCKED"
28       },3);
29
30    /**
31    * Creates a new instance of the class.
32    */

33    public ConformanceClass () {
34       super();
35
36       fillStructure();
37    }
38
39    /**
40    * Defines the super-class method. Read the explanation for
41    * this method within XMLComplexElement class.
42    */

43    protected void fillStructure () {
44       complexStructure.add(attrGraphConformance);
45       attributes.add(attrGraphConformance);
46    }
47
48    /**
49    * Prepares the panel with a combo box to choose the one of
50    * allowed types of graph conformance.
51    *
52    * @return XMLPanel to be shown.
53    */

54    public XMLPanel getPanel () {
55       return attrGraphConformance.getPanel();
56    }
57
58    /**
59    * Used to create exact copy of instance of this class.
60    * The newly created instance will have all the properties
61    * same as the copied one.
62    *
63    * @return The newly created instance of this class.
64    */

65    public Object JavaDoc clone () {
66       ConformanceClass c=(ConformanceClass)super.clone();
67
68       c.attrGraphConformance=(XMLAttribute)this.attrGraphConformance.clone();
69       c.fillStructure();
70
71       return c;
72    }
73
74 }
75
Popular Tags