svn-gvsig-desktop / branches / v2_0_0_prep / extensions / extGeocoding / src / org / gvsig / geocoding / preferences / PreferencesGeocoPanel.java @ 27140
History | View | Annotate | Download (4.87 KB)
1 | 26843 | vsanjaime | /* gvSIG. Geographic Information System of the Valencian Government
|
---|---|---|---|
2 | *
|
||
3 | * Copyright (C) 2007-2008 Infrastructures and Transports Department
|
||
4 | * of the Valencian Government (CIT)
|
||
5 | *
|
||
6 | * This program is free software; you can redistribute it and/or
|
||
7 | * modify it under the terms of the GNU General Public License
|
||
8 | * as published by the Free Software Foundation; either version 2
|
||
9 | * of the License, or (at your option) any later version.
|
||
10 | *
|
||
11 | * This program is distributed in the hope that it will be useful,
|
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
14 | * GNU General Public License for more details.
|
||
15 | *
|
||
16 | * You should have received a copy of the GNU General Public License
|
||
17 | * along with this program; if not, write to the Free Software
|
||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||
19 | * MA 02110-1301, USA.
|
||
20 | *
|
||
21 | */
|
||
22 | |||
23 | /*
|
||
24 | * AUTHORS (In addition to CIT):
|
||
25 | * 2008 Prodevelop S.L.main developer
|
||
26 | */
|
||
27 | package org.gvsig.geocoding.preferences; |
||
28 | |||
29 | 27140 | csanchez | import org.slf4j.Logger; |
30 | 26843 | vsanjaime | |
31 | import com.iver.andami.PluginServices; |
||
32 | |||
33 | /**
|
||
34 | *
|
||
35 | * @author vsanjaime
|
||
36 | */
|
||
37 | public class PreferencesGeocoPanel extends javax.swing.JPanel { |
||
38 | |||
39 | private static final long serialVersionUID = 1L; |
||
40 | |||
41 | /* COMPONENTS */
|
||
42 | private javax.swing.JLabel jLabEdit;
|
||
43 | private javax.swing.JLabel jLabLocation;
|
||
44 | private javax.swing.JPanel jPanElememts;
|
||
45 | private javax.swing.JScrollPane jScrollPaneArea;
|
||
46 | private javax.swing.JTextArea jTextArea;
|
||
47 | private javax.swing.JTextField jTextFile;
|
||
48 | |||
49 | private String text = ""; |
||
50 | |||
51 | /**
|
||
52 | * Constructor
|
||
53 | */
|
||
54 | public PreferencesGeocoPanel() {
|
||
55 | initComponents(); |
||
56 | } |
||
57 | |||
58 | /**
|
||
59 | * Panel's components
|
||
60 | */
|
||
61 | private void initComponents() { |
||
62 | java.awt.GridBagConstraints gridBagConstraints; |
||
63 | |||
64 | jPanElememts = new javax.swing.JPanel();
|
||
65 | jScrollPaneArea = new javax.swing.JScrollPane();
|
||
66 | jTextArea = new javax.swing.JTextArea();
|
||
67 | jTextFile = new javax.swing.JTextField();
|
||
68 | jLabEdit = new javax.swing.JLabel();
|
||
69 | jLabLocation = new javax.swing.JLabel();
|
||
70 | |||
71 | setPreferredSize(new java.awt.Dimension(450, 350)); |
||
72 | setLayout(new java.awt.GridBagLayout());
|
||
73 | |||
74 | jPanElememts.setBorder(javax.swing.BorderFactory |
||
75 | .createTitledBorder(PluginServices.getText(this,
|
||
76 | "preference_file")));
|
||
77 | jPanElememts.setLayout(new java.awt.GridBagLayout());
|
||
78 | |||
79 | jTextArea.setColumns(20);
|
||
80 | jTextArea.setFont(new java.awt.Font("Arial", 1, 11)); |
||
81 | jTextArea.setRows(5);
|
||
82 | jTextArea.setMargin(new java.awt.Insets(5, 10, 5, 5)); |
||
83 | jScrollPaneArea.setViewportView(jTextArea); |
||
84 | |||
85 | gridBagConstraints = new java.awt.GridBagConstraints();
|
||
86 | gridBagConstraints.gridx = 0;
|
||
87 | gridBagConstraints.gridy = 3;
|
||
88 | gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; |
||
89 | gridBagConstraints.weightx = 1.0;
|
||
90 | gridBagConstraints.weighty = 1.0;
|
||
91 | gridBagConstraints.insets = new java.awt.Insets(5, 10, 10, 10); |
||
92 | jPanElememts.add(jScrollPaneArea, gridBagConstraints); |
||
93 | |||
94 | jTextFile.setBackground(new java.awt.Color(204, 204, 204)); |
||
95 | jTextFile.setEditable(false);
|
||
96 | gridBagConstraints = new java.awt.GridBagConstraints();
|
||
97 | gridBagConstraints.gridx = 0;
|
||
98 | gridBagConstraints.gridy = 1;
|
||
99 | gridBagConstraints.gridwidth = 2;
|
||
100 | gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
||
101 | gridBagConstraints.weightx = 1.0;
|
||
102 | gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 10); |
||
103 | jPanElememts.add(jTextFile, gridBagConstraints); |
||
104 | |||
105 | jLabEdit.setText(PluginServices.getText(this, "preference_edit")); |
||
106 | jLabEdit.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); |
||
107 | gridBagConstraints = new java.awt.GridBagConstraints();
|
||
108 | gridBagConstraints.gridx = 0;
|
||
109 | gridBagConstraints.gridy = 2;
|
||
110 | gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
||
111 | gridBagConstraints.weightx = 1.0;
|
||
112 | gridBagConstraints.insets = new java.awt.Insets(10, 10, 0, 10); |
||
113 | jPanElememts.add(jLabEdit, gridBagConstraints); |
||
114 | |||
115 | jLabLocation.setText(PluginServices |
||
116 | .getText(this, "preference_location")); |
||
117 | jLabLocation.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); |
||
118 | gridBagConstraints = new java.awt.GridBagConstraints();
|
||
119 | gridBagConstraints.gridx = 0;
|
||
120 | gridBagConstraints.gridy = 0;
|
||
121 | gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; |
||
122 | gridBagConstraints.weightx = 1.0;
|
||
123 | gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10); |
||
124 | jPanElememts.add(jLabLocation, gridBagConstraints); |
||
125 | |||
126 | gridBagConstraints = new java.awt.GridBagConstraints();
|
||
127 | gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; |
||
128 | gridBagConstraints.weightx = 1.0;
|
||
129 | gridBagConstraints.weighty = 1.0;
|
||
130 | gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10); |
||
131 | add(jPanElememts, gridBagConstraints); |
||
132 | } |
||
133 | |||
134 | |||
135 | |||
136 | public void setFileName(String name) { |
||
137 | jTextFile.setText(name); |
||
138 | } |
||
139 | |||
140 | public void setFileText(String text) { |
||
141 | jTextArea.setText(text); |
||
142 | } |
||
143 | |||
144 | public String getFileText() { |
||
145 | return jTextArea.getText();
|
||
146 | } |
||
147 | |||
148 | |||
149 | /* EVENTS */
|
||
150 | |||
151 | private void EvJButSave(java.awt.event.ActionEvent evt) { |
||
152 | text = jTextArea.getText(); |
||
153 | } |
||
154 | |||
155 | |||
156 | |||
157 | } |