KickJava   Java API By Example, From Geeks To Geeks.

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


1 /* ExtendedAttributes.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 * Helper class.
18 */

19 public class Namespaces extends XMLCollection {
20    /**
21    * Creates a new instance of the class.
22    */

23    public Namespaces (Package JavaDoc owner) {
24       super(owner);
25    }
26
27
28    /**
29    * Generates a new element of the class which instances
30    * are members of collection of this class.
31    *
32    * return The generated instance of class that makes collection.
33    */

34    public XMLElement generateNewElement() {
35       Namespace ns=new Namespace();
36       ns.setRequired(true);
37       return ns;
38    }
39
40    /**
41    * Used to create exact copy of instance of this class.
42    * The newly created instance will have all the properties
43    * same as the copied one.
44    *
45    * @return The newly created instance of this class.
46    */

47    public Object JavaDoc clone () {
48       Namespaces nss=(Namespaces)super.clone();
49       nss.myOwner=this.myOwner;
50       return nss;
51    }
52
53    // First, the controlled panel must be created, and then the control panel
54
public XMLPanel getPanel () {
55       controlledPanel=new XMLTablePanel(this,"",false,false,true);
56       controlPanel=new XMLTableControlPanel(this,"",true,false);
57       return new XMLGroupPanel(this,new XMLPanel[]{
58          controlledPanel,controlPanel},toLabel(),XMLPanel.BOX_LAYOUT,
59          false,true);
60    }
61
62 }
63
Popular Tags