KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > packaging > TextArea


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2004 INRIA - USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Christophe Contreras
23 Contributor(s): ___________________________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.openccm.packaging;
28
29 /**
30  * This is a widget allowing to set a multi-line text
31  *
32  *
33  * @author <a HREF="mailto:Christophe.Contreras@lifl.fr">Christophe Contreras</a>
34  *
35  */

36 public class TextArea
37      extends javax.swing.JPanel JavaDoc
38 {
39     // ==================================================================
40
//
41
// Internal state.
42
//
43
// ==================================================================
44

45     /** the swing text area */
46     private javax.swing.JTextArea JavaDoc text_area;
47
48     // ==================================================================
49
//
50
// Constructors.
51
//
52
// ==================================================================
53

54     /**
55      * The default constructor.
56      */

57     public
58     TextArea ()
59     {
60         // inits the text area
61
text_area = new javax.swing.JTextArea JavaDoc("", 5, 30);
62
63         this.setLayout(new java.awt.BorderLayout JavaDoc());
64
65         javax.swing.JPanel JavaDoc content = new javax.swing.JPanel JavaDoc();
66 // content.setPreferredSize(new java.awt.Dimension(360,0));
67

68         // building of the content panel with commas
69
content.add(this.text_area);
70
71         // adding the content to the panel
72
this.add(content, java.awt.BorderLayout.CENTER);
73     }
74
75     // ==================================================================
76
//
77
// Public methods.
78
//
79
// ==================================================================
80

81     /**
82      * The getter method
83      */

84     public String JavaDoc
85     getBigText()
86     {
87         return this.text_area.getText();
88     }
89
90     /**
91      * The setter method
92      */

93     public void
94     setBigText (String JavaDoc text)
95     {
96         this.text_area.setText(text);
97     }
98
99 }
100
Popular Tags