KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > contineo > core > config > LayoutConfigurator


1 /*
2  * LayoutConfigurator.java
3  *
4  * Created on 19. August 2003, 22:52
5  */

6
7 package org.contineo.core.config;
8
9 import org.contineo.core.XMLBean;
10 /**
11  * This class processes the file layout.xml
12  * @author Michael Scholz
13  * @version 1.0
14  */

15 public class LayoutConfigurator {
16
17     /**
18      *
19      * @uml.property name="xml"
20      * @uml.associationEnd
21      * @uml.property name="xml" multiplicity="(1 1)"
22      */

23     private XMLBean xml;
24
25     /** Creates a new instance of LayoutConfigurator */
26     public LayoutConfigurator() {
27         ClassLoader JavaDoc loader = Thread.currentThread().getContextClassLoader();
28         xml = new XMLBean(loader.getResource("layout.xml"));
29     }
30
31     /**
32      * This method return a layoutelement.
33      * @param elementname Name of the layoutelement.
34      */

35     public String JavaDoc getLayout(String JavaDoc elementname) {
36         return xml.getAllChildText("layout", "name", elementname, "=\"", "\" ");
37         //return xml.getChildText("layout", "bgcolor", "name", elementname);
38
}
39 }
40
Popular Tags