KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejtools > adwt > editor > URLEditor


1 /*
2  * EJTools, the Enterprise Java Tools
3  *
4  * Distributable under LGPL license.
5  * See terms of license at www.gnu.org.
6  */

7 package org.ejtools.adwt.editor;
8
9 import java.net.URL JavaDoc;
10
11 /**
12  * Description of the Class
13  *
14  * @author Laurent Etiemble
15  * @version $Revision: 1.5 $
16  * @todo Javadoc to complete
17  */

18 public class URLEditor extends GenericEditor
19 {
20    /** Constructor */
21    public URLEditor() { }
22
23
24    /**
25     * Getter for the asText attribute
26     *
27     * @return The value
28     */

29    public String JavaDoc getAsText()
30    {
31       if (this.value != null)
32       {
33          return value.toString();
34       }
35       else
36       {
37          return null;
38       }
39    }
40
41
42    /**
43     * Setter for the asText attribute
44     *
45     * @param s The new value
46     */

47    public void setAsText(String JavaDoc s)
48    {
49       try
50       {
51          value = new URL JavaDoc(s);
52       }
53       catch (Exception JavaDoc e)
54       {
55       }
56       this.firePropertyChange();
57    }
58 }
59
60
Popular Tags