root / trunk / libraries / libUIComponent / src / org / gvsig / gui / beans / jEditableTextComponent / JEditableTextArea.java @ 17767
History | View | Annotate | Download (2.74 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*/
|
19 |
|
20 |
package org.gvsig.gui.beans.jEditableTextComponent; |
21 |
|
22 |
import javax.swing.JTextArea; |
23 |
import javax.swing.text.Document; |
24 |
|
25 |
/**
|
26 |
* <p>Text area with options to edit its text easily.</p>
|
27 |
*
|
28 |
* @see JTextArea
|
29 |
*
|
30 |
* @version 03/01/2008
|
31 |
* @author Pablo Piqueras Bartolom? (pablo.piqueras@iver.es)
|
32 |
*/
|
33 |
public class JEditableTextArea extends JTextArea implements IEditableText { |
34 |
private static final long serialVersionUID = 2222773198233508808L; |
35 |
|
36 |
// REFERENCE TO THE TEXT EDITOR DECORATOR
|
37 |
private EditableTextDecorator editableTextDecorator;
|
38 |
// END REFERENCE TO THE TEXT EDITOR DECORATOR
|
39 |
|
40 |
/**
|
41 |
* @see JEditableTextArea#JEditableTextArea()
|
42 |
*/
|
43 |
public JEditableTextArea() {
|
44 |
super();
|
45 |
|
46 |
initialize(); |
47 |
} |
48 |
|
49 |
/**
|
50 |
* @see JEditableTextArea#JEditableTextArea(Document, String, int, int)
|
51 |
*/
|
52 |
public JEditableTextArea(Document doc, String text, int rows, int columns) { |
53 |
super(doc, text, rows, columns);
|
54 |
|
55 |
initialize(); |
56 |
} |
57 |
|
58 |
/**
|
59 |
* @see JEditableTextArea#JEditableTextArea(Document)
|
60 |
*/
|
61 |
public JEditableTextArea(Document doc) { |
62 |
super(doc);
|
63 |
|
64 |
initialize(); |
65 |
} |
66 |
|
67 |
/**
|
68 |
* @see JEditableTextArea#JEditableTextArea(int, int)
|
69 |
*/
|
70 |
public JEditableTextArea(int rows, int columns) { |
71 |
super(rows, columns);
|
72 |
|
73 |
initialize(); |
74 |
} |
75 |
|
76 |
/**
|
77 |
* @see JEditableTextArea#JEditableTextArea(String, int, int)
|
78 |
*/
|
79 |
public JEditableTextArea(String text, int rows, int columns) { |
80 |
super(text, rows, columns);
|
81 |
|
82 |
initialize(); |
83 |
} |
84 |
|
85 |
/**
|
86 |
* @see JEditableTextArea#JEditableTextArea(String)
|
87 |
*/
|
88 |
public JEditableTextArea(String text) { |
89 |
super(text);
|
90 |
|
91 |
initialize(); |
92 |
} |
93 |
|
94 |
/**
|
95 |
* <p>Fits this component to be ready to be used.</p>
|
96 |
*/
|
97 |
protected void initialize() { |
98 |
editableTextDecorator = new EditableTextDecorator(this); |
99 |
} |
100 |
|
101 |
/*
|
102 |
* (non-Javadoc)
|
103 |
* @see org.gvsig.gui.beans.swing.jTextComponentEditable.IEditableText#getEditableTextDecorator()
|
104 |
*/
|
105 |
public EditableTextDecorator getEditableTextDecorator() {
|
106 |
return editableTextDecorator;
|
107 |
} |
108 |
} |