01: /*
02: * Koala Bean Markup Language - Copyright (C) 1999 Dyade
03: *
04: * Permission is hereby granted, free of charge, to any person obtaining a
05: * copy of this software and associated documentation files
06: * (the "Software"), to deal in the Software without restriction, including
07: * without limitation the rights to use, copy, modify, merge, publish,
08: * distribute, sublicense, and/or sell copies of the Software, and to permit
09: * persons to whom the Software is furnished to do so, subject to the
10: * following conditions:
11: * The above copyright notice and this permission notice shall be included
12: * in all copies or substantial portions of the Software.
13: *
14: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15: * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16: * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17: * IN NO EVENT SHALL Dyade BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19: * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20: * DEALINGS IN THE SOFTWARE.
21: *
22: * Except as contained in this notice, the name of Dyade shall not be
23: * used in advertising or otherwise to promote the sale, use or other
24: * dealings in this Software without prior written authorization from
25: * Dyade.
26: *
27: * $Id: CharEditor.java,v 1.1.1.1 1999/11/03 15:34:30 phk Exp $
28: * Author: Thierry.Kormann@sophia.inria.fr
29: */
30:
31: package fr.dyade.koala.xml.kbml.editors;
32:
33: import java.beans.*;
34:
35: /**
36: * A simple property editor for the <code>java.lang.Character</code>
37: * class and type.
38: *
39: * @author Thierry.Kormann@sophia.inria.fr
40: */
41: public class CharEditor extends PropertyEditorSupport {
42:
43: public String getJavaInitializationString() {
44: return ("" + getValue());
45: }
46:
47: public void setAsText(String s) {
48: setValue(new Character(s.charAt(0)));
49: }
50: }
|