01: /*
02: JSmooth: a VM wrapper toolkit for Windows
03: Copyright (C) 2003-2007 Rodrigo Reyes <reyes@charabia.net>
04:
05: This program is free software; you can redistribute it and/or modify
06: it under the terms of the GNU General Public License as published by
07: the Free Software Foundation; either version 2 of the License, or
08: (at your option) any later version.
09:
10: This program is distributed in the hope that it will be useful,
11: but WITHOUT ANY WARRANTY; without even the implied warranty of
12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13: GNU General Public License for more details.
14:
15: You should have received a copy of the GNU General Public License
16: along with this program; if not, write to the Free Software
17: Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18:
19: */
20:
21: package net.charabia.jsmoothgen.application.gui.skeleditors;
22:
23: import javax.swing.*;
24: import javax.swing.event.*;
25: import javax.swing.text.*;
26: import java.util.*;
27:
28: public class TextAreaEditor extends SkelPropEditor {
29: JTextArea m_comp;
30: JScrollPane m_sp;
31:
32: public TextAreaEditor() {
33: m_comp = new JTextArea(5, 40);
34: PlainDocument doc = new PlainDocument();
35: m_comp.setDocument(doc);
36: m_sp = new JScrollPane(m_comp);
37: }
38:
39: public java.awt.Component getGUI() {
40: return m_sp;
41: }
42:
43: public void valueChanged(String val) {
44: m_comp.setText(val);
45: }
46:
47: public void set(String o) {
48: m_comp.setText(o);
49: }
50:
51: public String get() {
52: return m_comp.getText();
53: }
54:
55: }
|