Revision 707
tags/org.gvsig.gdal-1.0.123/org.gvsig.gdal.app/org.gvsig.gdal.app.ogr.mainplugin/pom.xml | ||
---|---|---|
1 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<parent> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.gdal.app</artifactId> |
|
6 |
<version>1.0.123</version> |
|
7 |
</parent> |
|
8 |
<artifactId>org.gvsig.gdal.app.ogr.mainplugin</artifactId> |
|
9 |
|
|
10 |
<properties> |
|
11 |
<gvsig.package.info.code>org.gvsig.gdal.app.ogr.mainplugin</gvsig.package.info.code> |
|
12 |
<gvsig.install.plugin>true</gvsig.install.plugin> |
|
13 |
<gvsig.package.info.name>Formats: OGR support</gvsig.package.info.name> |
|
14 |
<gvsig.package.info.categories>Formats,Vector</gvsig.package.info.categories> |
|
15 |
<gvsig.package.info.description>OGR formats: allows user to load files supported by OGR</gvsig.package.info.description> |
|
16 |
<gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2.3.0-A-0</gvsig.package.info.dependencies> |
|
17 |
</properties> |
|
18 |
|
|
19 |
<dependencies> |
|
20 |
<dependency> |
|
21 |
<groupId>org.gvsig</groupId> |
|
22 |
<artifactId>org.gvsig.app.mainplugin</artifactId> |
|
23 |
</dependency> |
|
24 |
<dependency> |
|
25 |
<groupId>org.gvsig</groupId> |
|
26 |
<artifactId>org.gvsig.gdal.prov.ogr</artifactId> |
|
27 |
</dependency> |
|
28 |
</dependencies> |
|
29 |
|
|
30 |
</project> |
tags/org.gvsig.gdal-1.0.123/org.gvsig.gdal.app/org.gvsig.gdal.app.ogr.mainplugin/buildNumber.properties | ||
---|---|---|
1 |
#Sun Mar 28 13:18:07 CEST 2021 |
|
2 |
buildNumber=108 |
tags/org.gvsig.gdal-1.0.123/org.gvsig.gdal.app/org.gvsig.gdal.app.ogr.mainplugin/src/main/assembly/gvsig-plugin-package.xml | ||
---|---|---|
1 |
<!-- gvSIG. Desktop Geographic Information System. Copyright (C) 2007-2016 |
|
2 |
gvSIG Association. This program is free software; you can redistribute it |
|
3 |
and/or modify it under the terms of the GNU General Public License as published |
|
4 |
by the Free Software Foundation; either version 3 of the License, or (at |
|
5 |
your option) any later version. This program is distributed in the hope that |
|
6 |
it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty |
|
7 |
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
8 |
Public License for more details. You should have received a copy of the GNU |
|
9 |
General Public License along with this program; if not, write to the Free |
|
10 |
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, |
|
11 |
USA. For any additional information, do not hesitate to contact us at info |
|
12 |
AT gvsig.com, or visit our website www.gvsig.com. --> |
|
13 |
<assembly> |
|
14 |
<id>gvsig-plugin-package</id> |
|
15 |
<formats> |
|
16 |
<format>zip</format> |
|
17 |
</formats> |
|
18 |
<baseDirectory>${project.artifactId}</baseDirectory> |
|
19 |
<includeBaseDirectory>true</includeBaseDirectory> |
|
20 |
<files> |
|
21 |
<file> |
|
22 |
<source>target/${project.artifactId}-${project.version}.jar</source> |
|
23 |
<outputDirectory>lib</outputDirectory> |
|
24 |
</file> |
|
25 |
<file> |
|
26 |
<source>target/package.info</source> |
|
27 |
</file> |
|
28 |
</files> |
|
29 |
|
|
30 |
<fileSets> |
|
31 |
<fileSet> |
|
32 |
<directory>src/main/resources-plugin</directory> |
|
33 |
<outputDirectory>.</outputDirectory> |
|
34 |
</fileSet> |
|
35 |
</fileSets> |
|
36 |
|
|
37 |
|
|
38 |
<dependencySets> |
|
39 |
<dependencySet> |
|
40 |
<useProjectArtifact>false</useProjectArtifact> |
|
41 |
<useTransitiveDependencies>false</useTransitiveDependencies> |
|
42 |
<outputDirectory>lib</outputDirectory> |
|
43 |
<includes> |
|
44 |
<include>org.gvsig:org.gvsig.gdal.prov.ogr</include> |
|
45 |
</includes> |
|
46 |
</dependencySet> |
|
47 |
</dependencySets> |
|
48 |
|
|
49 |
</assembly> |
|
50 |
|
|
51 |
|
tags/org.gvsig.gdal-1.0.123/org.gvsig.gdal.app/org.gvsig.gdal.app.ogr.mainplugin/src/main/java/org/gvsig/gdal/app/ogr/mainplugin/OGRExtension.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright ? 2007-2016 gvSIG Association |
|
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 |
* For any additional information, do not hesitate to contact us |
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
23 |
*/ |
|
24 |
package org.gvsig.gdal.app.ogr.mainplugin; |
|
25 |
|
|
26 |
import org.gvsig.andami.IconThemeHelper; |
|
27 |
import org.gvsig.andami.plugins.Extension; |
|
28 |
import org.gvsig.app.extension.AddLayer; |
|
29 |
import org.gvsig.gdal.app.ogr.mainplugin.gui.OGRWizarPanel; |
|
30 |
|
|
31 |
/** |
|
32 |
* @author <a href="mailto:lmarques@disid.com">Lluis Marques</a> |
|
33 |
* |
|
34 |
*/ |
|
35 |
public class OGRExtension extends Extension { |
|
36 |
|
|
37 |
@Override |
|
38 |
public void execute(String arg0) { |
|
39 |
} |
|
40 |
|
|
41 |
@Override |
|
42 |
public void initialize() { |
|
43 |
AddLayer.addWizard(OGRWizarPanel.class); |
|
44 |
|
|
45 |
IconThemeHelper.registerIcon("ogrprovider", "ogr-dataexplorer-settings", this); |
|
46 |
} |
|
47 |
|
|
48 |
@Override |
|
49 |
public boolean isEnabled() { |
|
50 |
return false; |
|
51 |
} |
|
52 |
|
|
53 |
@Override |
|
54 |
public boolean isVisible() { |
|
55 |
return false; |
|
56 |
} |
|
57 |
|
|
58 |
} |
tags/org.gvsig.gdal-1.0.123/org.gvsig.gdal.app/org.gvsig.gdal.app.ogr.mainplugin/src/main/java/org/gvsig/gdal/app/ogr/mainplugin/gui/JOGRDataExplorerController.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright ? 2007-2016 gvSIG Association |
|
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 |
* For any additional information, do not hesitate to contact us |
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
23 |
*/ |
|
24 |
package org.gvsig.gdal.app.ogr.mainplugin.gui; |
|
25 |
|
|
26 |
import java.awt.event.ActionEvent; |
|
27 |
import java.awt.event.ActionListener; |
|
28 |
import java.io.File; |
|
29 |
import java.util.ArrayList; |
|
30 |
import java.util.Arrays; |
|
31 |
import java.util.Collections; |
|
32 |
import java.util.List; |
|
33 |
import java.util.Locale; |
|
34 |
import java.util.prefs.Preferences; |
|
35 |
|
|
36 |
import javax.swing.JComponent; |
|
37 |
import javax.swing.JFileChooser; |
|
38 |
import javax.swing.JOptionPane; |
|
39 |
import javax.swing.ListSelectionModel; |
|
40 |
import javax.swing.event.ListSelectionEvent; |
|
41 |
import javax.swing.event.ListSelectionListener; |
|
42 |
import javax.swing.table.TableModel; |
|
43 |
|
|
44 |
import org.apache.commons.lang.StringUtils; |
|
45 |
import org.apache.commons.lang3.ArrayUtils; |
|
46 |
import org.gvsig.filedialogchooser.FileDialogChooser; |
|
47 |
import org.gvsig.filedialogchooser.FileDialogChooserManager; |
|
48 |
|
|
49 |
import org.gvsig.fmap.IconThemeHelper; |
|
50 |
import org.gvsig.fmap.dal.DALLocator; |
|
51 |
import org.gvsig.fmap.dal.DataManager; |
|
52 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
53 |
import org.gvsig.fmap.dal.DataStoreProviderFactory; |
|
54 |
import org.gvsig.fmap.dal.exception.DataException; |
|
55 |
import org.gvsig.fmap.dal.exception.InitializeException; |
|
56 |
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException; |
|
57 |
import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
|
58 |
import static org.gvsig.fmap.dal.serverexplorer.filesystem.swing.FilesystemExplorerWizardPanelController.OPEN_LAYER_FILE_CHOOSER_ID; |
|
59 |
import org.gvsig.fmap.mapcontrol.swing.dynobject.DynObjectEditor; |
|
60 |
import org.gvsig.gdal.prov.ogr.OGRDataExplorer; |
|
61 |
import org.gvsig.gdal.prov.ogr.OGRDataExplorerParameters; |
|
62 |
import org.gvsig.gdal.prov.ogr.OGRDataStoreParameters; |
|
63 |
import org.gvsig.gdal.prov.ogr.OGRDataStoreProvider; |
|
64 |
import org.gvsig.gdal.prov.ogr.OGRDataStoreProviderFactory; |
|
65 |
import org.gvsig.tools.ToolsLocator; |
|
66 |
import org.gvsig.tools.dynobject.DynObject; |
|
67 |
import org.gvsig.tools.folders.FoldersManager; |
|
68 |
import org.gvsig.tools.i18n.I18nManager; |
|
69 |
import org.gvsig.tools.service.ServiceException; |
|
70 |
import org.gvsig.tools.util.ToolsUtilLocator; |
|
71 |
import org.gvsig.tools.util.ToolsUtilManager; |
|
72 |
|
|
73 |
import org.slf4j.Logger; |
|
74 |
import org.slf4j.LoggerFactory; |
|
75 |
|
|
76 |
/** |
|
77 |
* |
|
78 |
* @author <a href="mailto:lmarques@disid.com">Lluis Marques</a> |
|
79 |
* |
|
80 |
*/ |
|
81 |
public class JOGRDataExplorerController extends JOGRDataExplorerView implements JOGRDataExplorer { |
|
82 |
|
|
83 |
private static final Logger LOG = LoggerFactory.getLogger(JOGRDataExplorerController.class); |
|
84 |
|
|
85 |
private static final long serialVersionUID = 2347040531301288139L; |
|
86 |
|
|
87 |
private String lastConnectionString; |
|
88 |
|
|
89 |
private OGRDataExplorerParameters dataExplorerParameters; |
|
90 |
|
|
91 |
/** |
|
92 |
* |
|
93 |
*/ |
|
94 |
public JOGRDataExplorerController() { |
|
95 |
init(); |
|
96 |
} |
|
97 |
|
|
98 |
private void init() { |
|
99 |
|
|
100 |
initFileChooserButton(); |
|
101 |
initDataExplorerPropertiesButton(); |
|
102 |
initOpenButton(); |
|
103 |
initPropertiesButton(); |
|
104 |
initLayerTable(); |
|
105 |
translate(); |
|
106 |
} |
|
107 |
|
|
108 |
private void initDataExplorerPropertiesButton() { |
|
109 |
|
|
110 |
this.dataExplorerPropertiesButton.setIcon(IconThemeHelper |
|
111 |
.getImageIcon("ogr-dataexplorer-settings")); |
|
112 |
this.dataExplorerPropertiesButton.addActionListener(new ActionListener() { |
|
113 |
|
|
114 |
@Override |
|
115 |
public void actionPerformed(ActionEvent e) { |
|
116 |
|
|
117 |
String connectionString = connectionField.getText(); |
|
118 |
|
|
119 |
if (StringUtils.isBlank(connectionString)) { |
|
120 |
lastConnectionString = null; |
|
121 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
122 |
JOptionPane.showMessageDialog(JOGRDataExplorerController.this, |
|
123 |
i18nManager.getTranslation("connection_string_can_not_be_empty"), |
|
124 |
i18nManager.getTranslation("error"), JOptionPane.ERROR_MESSAGE); |
|
125 |
return; |
|
126 |
} |
|
127 |
|
|
128 |
if (!getConnectionString().equals(lastConnectionString)) { |
|
129 |
setExplorerParameters(); |
|
130 |
} |
|
131 |
|
|
132 |
try { |
|
133 |
DynObjectEditor editor = new DynObjectEditor(dataExplorerParameters); |
|
134 |
editor.editObject(true); |
|
135 |
} catch (ServiceException e1) { |
|
136 |
LOG.error(String.format("Can not create DynObjectEditor with %1s", |
|
137 |
dataExplorerParameters), e); |
|
138 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
139 |
JOptionPane.showMessageDialog(JOGRDataExplorerController.this, |
|
140 |
i18nManager.getTranslation("error_creating_properties_panel"), |
|
141 |
i18nManager.getTranslation("error"), JOptionPane.ERROR_MESSAGE); |
|
142 |
return; |
|
143 |
} |
|
144 |
} |
|
145 |
|
|
146 |
}); |
|
147 |
} |
|
148 |
|
|
149 |
@SuppressWarnings("unchecked") |
|
150 |
private void setExplorerParameters() { |
|
151 |
DataManager dataManager = DALLocator.getDataManager(); |
|
152 |
List<String> storeProviders = dataManager.getStoreProviders(); |
|
153 |
for (String storeProviderName : storeProviders) { |
|
154 |
|
|
155 |
// First we have to search specific data explorer |
|
156 |
// parameters |
|
157 |
// to open connection string so we have to avoid create |
|
158 |
// default OGR parameters. |
|
159 |
if (storeProviderName.equals(OGRDataStoreProvider.NAME)) { |
|
160 |
continue; |
|
161 |
} |
|
162 |
|
|
163 |
DataStoreProviderFactory factory = |
|
164 |
dataManager.getStoreProviderFactory(storeProviderName); |
|
165 |
if (factory instanceof OGRDataStoreProviderFactory) { |
|
166 |
OGRDataStoreProviderFactory ogrFactory = (OGRDataStoreProviderFactory) factory; |
|
167 |
DynObject explorerParameters = |
|
168 |
ogrFactory.createDataExplorerParameters(getConnectionString()); |
|
169 |
dataExplorerParameters = (OGRDataExplorerParameters) explorerParameters; |
|
170 |
} |
|
171 |
} |
|
172 |
|
|
173 |
// If there are not specific data explorer parameters, |
|
174 |
// create |
|
175 |
// default OGR data explorer parameters. |
|
176 |
if (dataExplorerParameters == null) { |
|
177 |
OGRDataStoreProviderFactory factory = |
|
178 |
(OGRDataStoreProviderFactory) dataManager |
|
179 |
.getStoreProviderFactory(OGRDataStoreProvider.NAME); |
|
180 |
dataExplorerParameters = |
|
181 |
(OGRDataExplorerParameters) factory |
|
182 |
.createDataExplorerParameters(getConnectionString()); |
|
183 |
} |
|
184 |
|
|
185 |
File file = new File(getConnectionString()); |
|
186 |
if (file.exists() && file.isFile()) { |
|
187 |
dataExplorerParameters.setFile(file); |
|
188 |
} else { |
|
189 |
dataExplorerParameters.setConnectionString(getConnectionString()); |
|
190 |
} |
|
191 |
|
|
192 |
lastConnectionString = getConnectionString(); |
|
193 |
|
|
194 |
} |
|
195 |
|
|
196 |
private void initLayerTable() { |
|
197 |
layerTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); |
|
198 |
|
|
199 |
layerTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() { |
|
200 |
|
|
201 |
@Override |
|
202 |
public void valueChanged(ListSelectionEvent e) { |
|
203 |
if (layerTable.getSelectedRowCount() == 1) { |
|
204 |
propertiesButton.setEnabled(true); |
|
205 |
} else { |
|
206 |
propertiesButton.setEnabled(false); |
|
207 |
} |
|
208 |
} |
|
209 |
}); |
|
210 |
} |
|
211 |
|
|
212 |
private void initOpenButton() { |
|
213 |
|
|
214 |
this.openButton.addActionListener(new ActionListener() { |
|
215 |
|
|
216 |
@SuppressWarnings("unchecked") |
|
217 |
@Override |
|
218 |
public void actionPerformed(ActionEvent e) { |
|
219 |
|
|
220 |
String connectionString = connectionField.getText(); |
|
221 |
|
|
222 |
if (StringUtils.isBlank(connectionString)) { |
|
223 |
lastConnectionString = null; |
|
224 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
225 |
JOptionPane.showMessageDialog(JOGRDataExplorerController.this, |
|
226 |
i18nManager.getTranslation("connection_string_can_not_be_empty"), |
|
227 |
i18nManager.getTranslation("error"), JOptionPane.ERROR_MESSAGE); |
|
228 |
return; |
|
229 |
} |
|
230 |
|
|
231 |
DataManager dataManager = DALLocator.getDataManager(); |
|
232 |
OGRDataExplorer serverExplorer = null; |
|
233 |
if (!getConnectionString().equals(lastConnectionString)) { |
|
234 |
setExplorerParameters(); |
|
235 |
} |
|
236 |
|
|
237 |
// If there are not specific data explorer parameters, |
|
238 |
// create |
|
239 |
// default OGR data explorer parameters. |
|
240 |
if (dataExplorerParameters == null) { |
|
241 |
OGRDataStoreProviderFactory factory = |
|
242 |
(OGRDataStoreProviderFactory) dataManager |
|
243 |
.getStoreProviderFactory(OGRDataStoreProvider.NAME); |
|
244 |
dataExplorerParameters = |
|
245 |
(OGRDataExplorerParameters) factory |
|
246 |
.createDataExplorerParameters(connectionString); |
|
247 |
} |
|
248 |
|
|
249 |
File file = new File(connectionString); |
|
250 |
if (file.exists() && file.isFile()) { |
|
251 |
dataExplorerParameters.setFile(file); |
|
252 |
} else { |
|
253 |
dataExplorerParameters.setConnectionString(connectionString); |
|
254 |
} |
|
255 |
|
|
256 |
lastConnectionString = connectionString; |
|
257 |
|
|
258 |
try { |
|
259 |
serverExplorer = |
|
260 |
(OGRDataExplorer) dataManager.openServerExplorer( |
|
261 |
dataExplorerParameters.getExplorerName(), dataExplorerParameters); |
|
262 |
} catch (InitializeException ex) { |
|
263 |
LOG.error("Can not create OGR server explorer parameters", ex); |
|
264 |
|
|
265 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
266 |
JOptionPane.showMessageDialog(JOGRDataExplorerController.this, |
|
267 |
i18nManager.getTranslation("error_opening_connection_string"), |
|
268 |
i18nManager.getTranslation("error"), JOptionPane.ERROR_MESSAGE); |
|
269 |
return; |
|
270 |
|
|
271 |
} catch (ProviderNotRegisteredException ex) { |
|
272 |
LOG.error("OGR Provider is not registered", ex); |
|
273 |
|
|
274 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
275 |
JOptionPane.showMessageDialog(JOGRDataExplorerController.this, |
|
276 |
i18nManager.getTranslation("error_getting_OGR_provider"), |
|
277 |
i18nManager.getTranslation("error"), JOptionPane.ERROR_MESSAGE); |
|
278 |
return; |
|
279 |
} catch (ValidateDataParametersException ex) { |
|
280 |
LOG.error(String.format("Can not open OGR server explorer. Parameters: %1s", |
|
281 |
connectionString), ex); |
|
282 |
|
|
283 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
284 |
JOptionPane.showMessageDialog(JOGRDataExplorerController.this, |
|
285 |
i18nManager.getTranslation("error_opening_connection_string"), |
|
286 |
i18nManager.getTranslation("error"), JOptionPane.ERROR_MESSAGE); |
|
287 |
return; |
|
288 |
} |
|
289 |
|
|
290 |
List storeParametersList; |
|
291 |
try { |
|
292 |
storeParametersList = serverExplorer.list(); |
|
293 |
} catch (DataException ex) { |
|
294 |
LOG.error("Can not get layer list of OGR Data Explorer", ex); |
|
295 |
|
|
296 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
297 |
JOptionPane.showMessageDialog(JOGRDataExplorerController.this, |
|
298 |
i18nManager.getTranslation("error_getting_layers_from_connection_string"), |
|
299 |
i18nManager.getTranslation("error"), JOptionPane.ERROR_MESSAGE); |
|
300 |
return; |
|
301 |
} |
|
302 |
|
|
303 |
layerTable.setModel(new OGRDataStoreParameterTableModel(storeParametersList)); |
|
304 |
} |
|
305 |
}); |
|
306 |
} |
|
307 |
|
|
308 |
private void initPropertiesButton() { |
|
309 |
|
|
310 |
this.propertiesButton.setEnabled(false); |
|
311 |
this.propertiesButton.addActionListener(new ActionListener() { |
|
312 |
|
|
313 |
@Override |
|
314 |
public void actionPerformed(ActionEvent arg0) { |
|
315 |
|
|
316 |
OGRDataStoreParameterTableModel model = |
|
317 |
(OGRDataStoreParameterTableModel) layerTable.getModel(); |
|
318 |
|
|
319 |
OGRDataStoreParameters parameters = |
|
320 |
model.getDataStoreParameter(layerTable.getSelectedRow()); |
|
321 |
try { |
|
322 |
DynObjectEditor editor = new DynObjectEditor(parameters); |
|
323 |
editor.editObject(true); |
|
324 |
} catch (ServiceException e) { |
|
325 |
LOG.error(String.format("Can not create DynObjectEditor with %1s", parameters), |
|
326 |
e); |
|
327 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
328 |
JOptionPane.showMessageDialog(JOGRDataExplorerController.this, |
|
329 |
i18nManager.getTranslation("error_creating_properties_panel"), |
|
330 |
i18nManager.getTranslation("error"), JOptionPane.ERROR_MESSAGE); |
|
331 |
return; |
|
332 |
} |
|
333 |
} |
|
334 |
}); |
|
335 |
|
|
336 |
} |
|
337 |
|
|
338 |
private void initFileChooserButton() { |
|
339 |
|
|
340 |
fileChooserButton.addActionListener(new ActionListener() { |
|
341 |
|
|
342 |
@Override |
|
343 |
public void actionPerformed(ActionEvent e) { |
|
344 |
FoldersManager foldersManager = ToolsLocator.getFoldersManager(); |
|
345 |
FileDialogChooserManager fileDialogChooserManager = ToolsUtilLocator.getFileDialogChooserManager(); |
|
346 |
|
|
347 |
FileDialogChooser chooser = fileDialogChooserManager.create(OPEN_LAYER_FILE_CHOOSER_ID); |
|
348 |
chooser.setCurrentDirectory(foldersManager.get("DataFolder")); |
|
349 |
if (StringUtils.isNotBlank(getConnectionString())) { |
|
350 |
File file = new File(getConnectionString()); |
|
351 |
if (file.exists()) { |
|
352 |
chooser.setCurrentDirectory(file.getParentFile()); |
|
353 |
} |
|
354 |
} |
|
355 |
|
|
356 |
int reply = chooser.showOpenDialog(asJComponent()); |
|
357 |
|
|
358 |
if (reply == JFileChooser.APPROVE_OPTION) { |
|
359 |
|
|
360 |
File file = chooser.getSelectedFile(); |
|
361 |
if (file.isFile() && file.exists() && file.canRead()) { |
|
362 |
connectionField.setText(file.getAbsolutePath()); |
|
363 |
} |
|
364 |
} |
|
365 |
} |
|
366 |
}); |
|
367 |
} |
|
368 |
|
|
369 |
@Override |
|
370 |
public JComponent asJComponent() { |
|
371 |
return this; |
|
372 |
} |
|
373 |
|
|
374 |
@Override |
|
375 |
public void setLocale(Locale l) { |
|
376 |
|
|
377 |
if (!this.getLocale().equals(l)) { |
|
378 |
this.translate(); |
|
379 |
} |
|
380 |
super.setLocale(l); |
|
381 |
} |
|
382 |
|
|
383 |
private void translate() { |
|
384 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
385 |
this.connectionLabel.setText(i18nManager.getTranslation(this.connectionLabel.getText())); |
|
386 |
this.openButton.setText(i18nManager.getTranslation(this.openButton.getText())); |
|
387 |
this.propertiesButton.setText(i18nManager.getTranslation(this.propertiesButton.getText())); |
|
388 |
} |
|
389 |
|
|
390 |
@Override |
|
391 |
public List<String> getSelectedLayerNames() { |
|
392 |
|
|
393 |
List<String> selectedLayerNames = new ArrayList<String>(); |
|
394 |
OGRDataStoreParameterTableModel model = getOGRTableModel(); |
|
395 |
int[] selectedRows = layerTable.getSelectedRows(); |
|
396 |
for (int i = 0; i < selectedRows.length; i++) { |
|
397 |
OGRDataStoreParameters dataStoreParameter = |
|
398 |
model.getDataStoreParameter(selectedRows[i]); |
|
399 |
selectedLayerNames.add(dataStoreParameter.getLayerName()); |
|
400 |
} |
|
401 |
return selectedLayerNames; |
|
402 |
} |
|
403 |
|
|
404 |
public List<DataStoreParameters> getSelectedLayerProperties() throws InitializeException, |
|
405 |
ProviderNotRegisteredException { |
|
406 |
|
|
407 |
OGRDataStoreParameterTableModel model = getOGRTableModel(); |
|
408 |
if( model == null ) { |
|
409 |
return Collections.EMPTY_LIST; |
|
410 |
} |
|
411 |
int[] selectedRows = layerTable.getSelectedRows(); |
|
412 |
List<DataStoreParameters> parameters = new ArrayList<DataStoreParameters>(); |
|
413 |
for (int i = 0; i < selectedRows.length; i++) { |
|
414 |
parameters.add(model.getDataStoreParameter(selectedRows[i])); |
|
415 |
} |
|
416 |
return parameters; |
|
417 |
} |
|
418 |
|
|
419 |
@Override |
|
420 |
public List<Integer> getSelectedLayerIndexes() { |
|
421 |
int[] selectedRows = layerTable.getSelectedRows(); |
|
422 |
return Arrays.asList(ArrayUtils.toObject(selectedRows)); |
|
423 |
} |
|
424 |
|
|
425 |
@Override |
|
426 |
public String getConnectionString() { |
|
427 |
return connectionField.getText(); |
|
428 |
} |
|
429 |
|
|
430 |
private OGRDataStoreParameterTableModel getOGRTableModel() { |
|
431 |
TableModel model = layerTable.getModel(); |
|
432 |
if( model instanceof OGRDataStoreParameterTableModel) { |
|
433 |
return (OGRDataStoreParameterTableModel) model; |
|
434 |
} |
|
435 |
return null; |
|
436 |
} |
|
437 |
} |
tags/org.gvsig.gdal-1.0.123/org.gvsig.gdal.app/org.gvsig.gdal.app.ogr.mainplugin/src/main/java/org/gvsig/gdal/app/ogr/mainplugin/gui/OGRWizarPanel.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright ? 2007-2016 gvSIG Association |
|
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 |
* For any additional information, do not hesitate to contact us |
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
23 |
*/ |
|
24 |
package org.gvsig.gdal.app.ogr.mainplugin.gui; |
|
25 |
|
|
26 |
import java.awt.BorderLayout; |
|
27 |
import java.util.List; |
|
28 |
|
|
29 |
import javax.swing.JOptionPane; |
|
30 |
|
|
31 |
import org.apache.commons.lang.StringUtils; |
|
32 |
import org.gvsig.app.gui.WizardPanel; |
|
33 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
34 |
import org.gvsig.gdal.prov.ogr.OGRDataStoreParameters; |
|
35 |
import org.gvsig.tools.ToolsLocator; |
|
36 |
import org.gvsig.tools.i18n.I18nManager; |
|
37 |
import org.slf4j.Logger; |
|
38 |
import org.slf4j.LoggerFactory; |
|
39 |
|
|
40 |
/** |
|
41 |
* |
|
42 |
* @author <a href="mailto:lmarques@disid.com">Lluis Marques</a> |
|
43 |
* |
|
44 |
*/ |
|
45 |
public class OGRWizarPanel extends WizardPanel { |
|
46 |
|
|
47 |
private static final Logger LOG = LoggerFactory.getLogger(OGRWizarPanel.class); |
|
48 |
|
|
49 |
private static final long serialVersionUID = 678408522883979629L; |
|
50 |
|
|
51 |
private static final String TAB_NAME = "OGR"; |
|
52 |
|
|
53 |
private final JOGRDataExplorer component; |
|
54 |
|
|
55 |
/** |
|
56 |
* |
|
57 |
*/ |
|
58 |
public OGRWizarPanel() { |
|
59 |
super(); |
|
60 |
|
|
61 |
this.component = new JOGRDataExplorerController(); |
|
62 |
|
|
63 |
initWizard(); |
|
64 |
} |
|
65 |
|
|
66 |
@Override |
|
67 |
public void close() { |
|
68 |
|
|
69 |
} |
|
70 |
|
|
71 |
@Override |
|
72 |
public void execute() { |
|
73 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
74 |
|
|
75 |
String connectionString = this.component.getConnectionString(); |
|
76 |
|
|
77 |
if (StringUtils.isBlank(connectionString)) { |
|
78 |
return; |
|
79 |
} |
|
80 |
|
|
81 |
List<DataStoreParameters> layerProperties; |
|
82 |
try { |
|
83 |
layerProperties = this.component.getSelectedLayerProperties(); |
|
84 |
} catch (Throwable e) { |
|
85 |
LOG.warn("Can not get properties of selected layers", e); |
|
86 |
|
|
87 |
JOptionPane.showMessageDialog(component.asJComponent(), |
|
88 |
i18n.getTranslation("error_getting_selected_layer_properties"), |
|
89 |
i18n.getTranslation("error"), JOptionPane.ERROR_MESSAGE); |
|
90 |
return; |
|
91 |
} |
|
92 |
|
|
93 |
if( layerProperties==null || layerProperties.isEmpty() ) { |
|
94 |
JOptionPane.showMessageDialog(component.asJComponent(), |
|
95 |
i18n.getTranslation("_You_must_select_at_least_one_layer")+"\n\n"+ |
|
96 |
i18n.getTranslation("_Make_sure_that_in_addition_to_selecting_a_file_click_on_the_open_button_and_you_have_selected_at_least_one_layer_from_the_list"), |
|
97 |
i18n.getTranslation("_Warning"), |
|
98 |
JOptionPane.WARNING_MESSAGE); |
|
99 |
return; |
|
100 |
} |
|
101 |
for (DataStoreParameters parameters : layerProperties) { |
|
102 |
|
|
103 |
OGRDataStoreParameters ogrParameters = (OGRDataStoreParameters) parameters; |
|
104 |
|
|
105 |
if(ogrParameters.getCRS() == null){ |
|
106 |
ogrParameters.setCRS(getMapContext().getProjection()); |
|
107 |
} |
|
108 |
|
|
109 |
doAddLayer(ogrParameters.getLayerName(), ogrParameters); |
|
110 |
} |
|
111 |
} |
|
112 |
|
|
113 |
@Override |
|
114 |
public DataStoreParameters[] getParameters() { |
|
115 |
return null; |
|
116 |
} |
|
117 |
|
|
118 |
@Override |
|
119 |
public void initWizard() { |
|
120 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
121 |
setTabName(i18nManager.getTranslation(TAB_NAME)); |
|
122 |
this.setLayout(new BorderLayout()); |
|
123 |
this.add(this.component.asJComponent(), BorderLayout.CENTER); |
|
124 |
|
|
125 |
} |
|
126 |
} |
tags/org.gvsig.gdal-1.0.123/org.gvsig.gdal.app/org.gvsig.gdal.app.ogr.mainplugin/src/main/java/org/gvsig/gdal/app/ogr/mainplugin/gui/JOGRDataExplorerView.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<object classname="com.jeta.forms.store.memento.FormPackage"> |
|
4 |
<at name="fileversion"> |
|
5 |
<object classname="com.jeta.forms.store.memento.FormsVersion2"> |
|
6 |
<at name="major">2</at> |
|
7 |
<at name="minor">0</at> |
|
8 |
<at name="sub">0</at> |
|
9 |
</object> |
|
10 |
</at> |
|
11 |
<at name="form"> |
|
12 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
13 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
14 |
<at name="cellconstraints"> |
|
15 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
16 |
<at name="column">1</at> |
|
17 |
<at name="row">1</at> |
|
18 |
<at name="colspan">1</at> |
|
19 |
<at name="rowspan">1</at> |
|
20 |
<at name="halign">default</at> |
|
21 |
<at name="valign">default</at> |
|
22 |
<at name="insets" object="insets">0,0,0,0</at> |
|
23 |
</object> |
|
24 |
</at> |
|
25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
26 |
</super> |
|
27 |
<at name="id">/home/lmarques/projects/externals/org.gvsig.gdal/org.gvsig.gdal.app/org.gvsig.gdal.app.ogr.mainplugin/src/main/java/org/gvsig/gdal/app/ogr/mainplugin/gui/JOGRDataExplorerView.xml</at> |
|
28 |
<at name="rowspecs">CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),CENTER:4DLU:NONE</at> |
|
29 |
<at name="colspecs">FILL:8DLU:NONE,FILL:DEFAULT:GROW(0.8),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE</at> |
|
30 |
<at name="components"> |
|
31 |
<object classname="java.util.LinkedList"> |
|
32 |
<item > |
|
33 |
<at name="value"> |
|
34 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
35 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
36 |
<at name="cellconstraints"> |
|
37 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
38 |
<at name="column">2</at> |
|
39 |
<at name="row">4</at> |
|
40 |
<at name="colspan">1</at> |
|
41 |
<at name="rowspan">1</at> |
|
42 |
<at name="halign">default</at> |
|
43 |
<at name="valign">default</at> |
|
44 |
<at name="insets" object="insets">0,0,0,0</at> |
|
45 |
</object> |
|
46 |
</at> |
|
47 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
48 |
</super> |
|
49 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
50 |
<at name="beanclass">javax.swing.JTextField</at> |
|
51 |
<at name="beanproperties"> |
|
52 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
53 |
<at name="classname">javax.swing.JTextField</at> |
|
54 |
<at name="properties"> |
|
55 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
56 |
<at name="height">20</at> |
|
57 |
<at name="width">874</at> |
|
58 |
<at name="name">connectionField</at> |
|
59 |
<at name="border"> |
|
60 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
61 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
62 |
<at name="name">border</at> |
|
63 |
</super> |
|
64 |
<at name="borders"> |
|
65 |
<object classname="java.util.LinkedList"> |
|
66 |
<item > |
|
67 |
<at name="value"> |
|
68 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
69 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
70 |
<at name="name">border</at> |
|
71 |
</super> |
|
72 |
</object> |
|
73 |
</at> |
|
74 |
</item> |
|
75 |
</object> |
|
76 |
</at> |
|
77 |
</object> |
|
78 |
</at> |
|
79 |
</object> |
|
80 |
</at> |
|
81 |
</object> |
|
82 |
</at> |
|
83 |
</object> |
|
84 |
</at> |
|
85 |
</item> |
|
86 |
<item > |
|
87 |
<at name="value"> |
|
88 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
89 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
90 |
<at name="cellconstraints"> |
|
91 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
92 |
<at name="column">2</at> |
|
93 |
<at name="row">8</at> |
|
94 |
<at name="colspan">1</at> |
|
95 |
<at name="rowspan">2</at> |
|
96 |
<at name="halign">default</at> |
|
97 |
<at name="valign">default</at> |
|
98 |
<at name="insets" object="insets">0,0,0,0</at> |
|
99 |
</object> |
|
100 |
</at> |
|
101 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
102 |
</super> |
|
103 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
104 |
<at name="beanclass">javax.swing.JTable</at> |
|
105 |
<at name="beanproperties"> |
|
106 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
107 |
<at name="classname">javax.swing.JTable</at> |
|
108 |
<at name="properties"> |
|
109 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
110 |
<at name="height">32</at> |
|
111 |
<at name="width">872</at> |
|
112 |
<at name="name">layerTable</at> |
|
113 |
<at name="scollBars"> |
|
114 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
115 |
<at name="name">scollBars</at> |
|
116 |
<at name="verticalpolicy">20</at> |
|
117 |
<at name="horizontalpolicy">30</at> |
|
118 |
<at name="border"> |
|
119 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
120 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
121 |
<at name="name">border</at> |
|
122 |
</super> |
|
123 |
<at name="borders"> |
|
124 |
<object classname="java.util.LinkedList"> |
|
125 |
<item > |
|
126 |
<at name="value"> |
|
127 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
128 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
129 |
<at name="name">border</at> |
|
130 |
</super> |
|
131 |
</object> |
|
132 |
</at> |
|
133 |
</item> |
|
134 |
</object> |
|
135 |
</at> |
|
136 |
</object> |
|
137 |
</at> |
|
138 |
</object> |
|
139 |
</at> |
|
140 |
<at name="border"> |
|
141 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
142 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
143 |
<at name="name">border</at> |
|
144 |
</super> |
|
145 |
<at name="borders"> |
|
146 |
<object classname="java.util.LinkedList"> |
|
147 |
<item > |
|
148 |
<at name="value"> |
|
149 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
150 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
151 |
<at name="name">border</at> |
|
152 |
</super> |
|
153 |
</object> |
|
154 |
</at> |
|
155 |
</item> |
|
156 |
</object> |
|
157 |
</at> |
|
158 |
</object> |
|
159 |
</at> |
|
160 |
</object> |
|
161 |
</at> |
|
162 |
</object> |
|
163 |
</at> |
|
164 |
</object> |
|
165 |
</at> |
|
166 |
</item> |
|
167 |
<item > |
|
168 |
<at name="value"> |
|
169 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
170 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
171 |
<at name="cellconstraints"> |
|
172 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
173 |
<at name="column">4</at> |
|
174 |
<at name="row">8</at> |
|
175 |
<at name="colspan">1</at> |
|
176 |
<at name="rowspan">1</at> |
|
177 |
<at name="halign">default</at> |
|
178 |
<at name="valign">default</at> |
|
179 |
<at name="insets" object="insets">0,0,0,0</at> |
|
180 |
</object> |
|
181 |
</at> |
|
182 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
183 |
</super> |
|
184 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
185 |
<at name="beanclass">javax.swing.JButton</at> |
|
186 |
<at name="beanproperties"> |
|
187 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
188 |
<at name="classname">javax.swing.JButton</at> |
|
189 |
<at name="properties"> |
|
190 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
191 |
<at name="text">properties</at> |
|
192 |
<at name="height">22</at> |
|
193 |
<at name="width">92</at> |
|
194 |
<at name="name">propertiesButton</at> |
|
195 |
<at name="actionCommand">properties</at> |
|
196 |
<at name="border"> |
|
197 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
198 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
199 |
<at name="name">border</at> |
|
200 |
</super> |
|
201 |
<at name="borders"> |
|
202 |
<object classname="java.util.LinkedList"> |
|
203 |
<item > |
|
204 |
<at name="value"> |
|
205 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
206 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
207 |
<at name="name">border</at> |
|
208 |
</super> |
|
209 |
</object> |
|
210 |
</at> |
|
211 |
</item> |
|
212 |
</object> |
|
213 |
</at> |
|
214 |
</object> |
|
215 |
</at> |
|
216 |
</object> |
|
217 |
</at> |
|
218 |
</object> |
|
219 |
</at> |
|
220 |
</object> |
|
221 |
</at> |
|
222 |
</item> |
|
223 |
<item > |
|
224 |
<at name="value"> |
|
225 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
226 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
227 |
<at name="cellconstraints"> |
|
228 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
229 |
<at name="column">4</at> |
|
230 |
<at name="row">6</at> |
|
231 |
<at name="colspan">1</at> |
|
232 |
<at name="rowspan">1</at> |
|
233 |
<at name="halign">default</at> |
|
234 |
<at name="valign">default</at> |
|
235 |
<at name="insets" object="insets">0,0,0,0</at> |
|
236 |
</object> |
|
237 |
</at> |
|
238 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
239 |
</super> |
|
240 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
241 |
<at name="beanclass">javax.swing.JButton</at> |
|
242 |
<at name="beanproperties"> |
|
243 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
244 |
<at name="classname">javax.swing.JButton</at> |
|
245 |
<at name="properties"> |
|
246 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
247 |
<at name="text">Open</at> |
|
248 |
<at name="height">22</at> |
|
249 |
<at name="width">92</at> |
|
250 |
<at name="name">openButton</at> |
|
251 |
<at name="actionCommand">connect</at> |
|
252 |
<at name="border"> |
|
253 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
254 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
255 |
<at name="name">border</at> |
|
256 |
</super> |
|
257 |
<at name="borders"> |
|
258 |
<object classname="java.util.LinkedList"> |
|
259 |
<item > |
|
260 |
<at name="value"> |
|
261 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
262 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
263 |
<at name="name">border</at> |
|
264 |
</super> |
|
265 |
</object> |
|
266 |
</at> |
|
267 |
</item> |
|
268 |
</object> |
|
269 |
</at> |
|
270 |
</object> |
|
271 |
</at> |
|
272 |
</object> |
|
273 |
</at> |
|
274 |
</object> |
|
275 |
</at> |
|
276 |
</object> |
|
277 |
</at> |
|
278 |
</item> |
|
279 |
<item > |
|
280 |
<at name="value"> |
|
281 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
282 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
283 |
<at name="cellconstraints"> |
|
284 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
285 |
<at name="column">2</at> |
|
286 |
<at name="row">2</at> |
|
287 |
<at name="colspan">1</at> |
|
288 |
<at name="rowspan">1</at> |
|
289 |
<at name="halign">default</at> |
|
290 |
<at name="valign">default</at> |
|
291 |
<at name="insets" object="insets">0,0,0,0</at> |
|
292 |
</object> |
|
293 |
</at> |
|
294 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
295 |
</super> |
|
296 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
297 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
298 |
<at name="beanproperties"> |
|
299 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
300 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
301 |
<at name="properties"> |
|
302 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
303 |
<at name="text">connection_string</at> |
|
304 |
<at name="height">14</at> |
|
305 |
<at name="width">874</at> |
|
306 |
<at name="name">connectionLabel</at> |
|
307 |
<at name="fill"> |
|
308 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
309 |
<at name="name">fill</at> |
|
310 |
</object> |
|
311 |
</at> |
|
312 |
<at name="border"> |
|
313 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
314 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
315 |
<at name="name">border</at> |
|
316 |
</super> |
|
317 |
<at name="borders"> |
|
318 |
<object classname="java.util.LinkedList"> |
|
319 |
<item > |
|
320 |
<at name="value"> |
|
321 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
322 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
323 |
<at name="name">border</at> |
|
324 |
</super> |
|
325 |
</object> |
|
326 |
</at> |
|
327 |
</item> |
|
328 |
</object> |
|
329 |
</at> |
|
330 |
</object> |
|
331 |
</at> |
|
332 |
</object> |
|
333 |
</at> |
|
334 |
</object> |
|
335 |
</at> |
|
336 |
</object> |
|
337 |
</at> |
|
338 |
</item> |
|
339 |
<item > |
|
340 |
<at name="value"> |
|
341 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
342 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
343 |
<at name="cellconstraints"> |
|
344 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
345 |
<at name="column">4</at> |
|
346 |
<at name="row">4</at> |
|
347 |
<at name="colspan">1</at> |
|
348 |
<at name="rowspan">1</at> |
|
349 |
<at name="halign">default</at> |
|
350 |
<at name="valign">default</at> |
|
351 |
<at name="insets" object="insets">0,0,0,0</at> |
|
352 |
</object> |
|
353 |
</at> |
|
354 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
355 |
</super> |
|
356 |
<at name="id">embedded.X7ac1519cQ151e8804b91RF7fff</at> |
|
357 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
|
358 |
<at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0)</at> |
|
359 |
<at name="components"> |
|
360 |
<object classname="java.util.LinkedList"> |
|
361 |
<item > |
|
362 |
<at name="value"> |
|
363 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
364 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
365 |
<at name="cellconstraints"> |
|
366 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
367 |
<at name="column">3</at> |
|
368 |
<at name="row">1</at> |
|
369 |
<at name="colspan">1</at> |
|
370 |
<at name="rowspan">1</at> |
|
371 |
<at name="halign">default</at> |
|
372 |
<at name="valign">default</at> |
|
373 |
<at name="insets" object="insets">0,0,0,0</at> |
|
374 |
</object> |
|
375 |
</at> |
|
376 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
377 |
</super> |
|
378 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
379 |
<at name="beanclass">javax.swing.JButton</at> |
|
380 |
<at name="beanproperties"> |
|
381 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
382 |
<at name="classname">javax.swing.JButton</at> |
|
383 |
<at name="properties"> |
|
384 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
385 |
<at name="height">12</at> |
|
386 |
<at name="width">32</at> |
|
387 |
<at name="name">dataExplorerPropertiesButton</at> |
|
388 |
<at name="border"> |
|
389 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
390 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
391 |
<at name="name">border</at> |
|
392 |
</super> |
|
393 |
<at name="borders"> |
|
394 |
<object classname="java.util.LinkedList"> |
|
395 |
<item > |
|
396 |
<at name="value"> |
|
397 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
398 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
399 |
<at name="name">border</at> |
|
400 |
</super> |
|
401 |
</object> |
|
402 |
</at> |
|
403 |
</item> |
|
404 |
</object> |
|
405 |
</at> |
|
406 |
</object> |
|
407 |
</at> |
|
408 |
</object> |
|
409 |
</at> |
|
410 |
</object> |
|
411 |
</at> |
|
412 |
</object> |
|
413 |
</at> |
|
414 |
</item> |
|
415 |
<item > |
|
416 |
<at name="value"> |
|
417 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
418 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
419 |
<at name="cellconstraints"> |
|
420 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
421 |
<at name="column">1</at> |
|
422 |
<at name="row">1</at> |
|
423 |
<at name="colspan">1</at> |
|
424 |
<at name="rowspan">1</at> |
|
425 |
<at name="halign">default</at> |
|
426 |
<at name="valign">default</at> |
|
427 |
<at name="insets" object="insets">0,0,0,0</at> |
|
428 |
</object> |
|
429 |
</at> |
|
430 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
431 |
</super> |
|
432 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
433 |
<at name="beanclass">javax.swing.JButton</at> |
|
434 |
<at name="beanproperties"> |
|
435 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
436 |
<at name="classname">javax.swing.JButton</at> |
|
437 |
<at name="properties"> |
|
438 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
439 |
<at name="text">...</at> |
|
440 |
<at name="height">22</at> |
|
441 |
<at name="width">44</at> |
|
442 |
<at name="name">fileChooserButton</at> |
|
443 |
<at name="actionCommand">...</at> |
|
444 |
<at name="border"> |
|
445 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
446 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
447 |
<at name="name">border</at> |
|
448 |
</super> |
|
449 |
<at name="borders"> |
|
450 |
<object classname="java.util.LinkedList"> |
|
451 |
<item > |
|
452 |
<at name="value"> |
|
453 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
454 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
455 |
<at name="name">border</at> |
|
456 |
</super> |
|
457 |
</object> |
|
458 |
</at> |
|
459 |
</item> |
|
460 |
</object> |
|
461 |
</at> |
|
462 |
</object> |
|
463 |
</at> |
|
464 |
</object> |
|
465 |
</at> |
|
466 |
</object> |
|
467 |
</at> |
|
468 |
</object> |
|
469 |
</at> |
|
470 |
</item> |
|
471 |
</object> |
|
472 |
</at> |
|
473 |
<at name="properties"> |
|
474 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
475 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
476 |
<at name="properties"> |
|
477 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
478 |
<at name="name"></at> |
|
479 |
<at name="fill"> |
|
480 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
481 |
<at name="name">fill</at> |
|
482 |
</object> |
|
483 |
</at> |
|
484 |
<at name="scollBars"> |
|
485 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
486 |
<at name="name">scollBars</at> |
|
487 |
<at name="verticalpolicy">21</at> |
|
488 |
<at name="horizontalpolicy">31</at> |
|
489 |
</object> |
|
490 |
</at> |
|
491 |
<at name="border"> |
|
492 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
493 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
494 |
<at name="name">border</at> |
|
495 |
</super> |
|
496 |
<at name="borders"> |
|
497 |
<object classname="java.util.LinkedList"/> |
|
498 |
</at> |
|
499 |
</object> |
|
500 |
</at> |
|
501 |
</object> |
|
502 |
</at> |
|
503 |
</object> |
|
504 |
</at> |
|
505 |
<at name="cellpainters"> |
|
506 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
507 |
<at name="rows"> |
|
508 |
<object classname="[Ljava.lang.Object;" size="1"> |
|
509 |
<at name="item" index="0"> |
|
510 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
511 |
</at> |
|
512 |
</object> |
|
513 |
</at> |
|
514 |
</object> |
|
515 |
</at> |
|
516 |
<at name="rowgroups"> |
|
517 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
518 |
<at name="groups"> |
|
519 |
<object classname="java.util.HashMap"/> |
|
520 |
</at> |
|
521 |
</object> |
|
522 |
</at> |
|
523 |
<at name="colgroups"> |
|
524 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
525 |
<at name="groups"> |
|
526 |
<object classname="java.util.HashMap"/> |
|
527 |
</at> |
|
528 |
</object> |
|
529 |
</at> |
|
530 |
</object> |
|
531 |
</at> |
|
532 |
</item> |
|
533 |
</object> |
|
534 |
</at> |
|
535 |
<at name="properties"> |
|
536 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
537 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
538 |
<at name="properties"> |
|
539 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
540 |
<at name="name"/> |
|
541 |
<at name="fill"> |
|
542 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
543 |
<at name="name">fill</at> |
|
544 |
</object> |
|
545 |
</at> |
|
546 |
<at name="scollBars"> |
|
547 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
548 |
<at name="name">scollBars</at> |
|
549 |
<at name="verticalpolicy">21</at> |
|
550 |
<at name="horizontalpolicy">31</at> |
|
551 |
<at name="border"> |
|
552 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
553 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
554 |
<at name="name">border</at> |
|
555 |
</super> |
|
556 |
<at name="borders"> |
|
557 |
<object classname="java.util.LinkedList"> |
|
558 |
<item > |
|
559 |
<at name="value"> |
|
560 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
561 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
562 |
<at name="name">border</at> |
|
563 |
</super> |
|
564 |
</object> |
|
565 |
</at> |
|
566 |
</item> |
|
567 |
</object> |
|
568 |
</at> |
|
569 |
</object> |
|
570 |
</at> |
|
571 |
</object> |
|
572 |
</at> |
|
573 |
<at name="border"> |
|
574 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
575 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
576 |
<at name="name">border</at> |
|
577 |
</super> |
|
578 |
<at name="borders"> |
|
579 |
<object classname="java.util.LinkedList"/> |
|
580 |
</at> |
|
581 |
</object> |
|
582 |
</at> |
|
583 |
</object> |
|
584 |
</at> |
|
585 |
</object> |
|
586 |
</at> |
|
587 |
<at name="cellpainters"> |
|
588 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
589 |
<at name="rows"> |
|
590 |
<object classname="[Ljava.lang.Object;" size="10"> |
|
591 |
<at name="item" index="0"> |
|
592 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
593 |
</at> |
|
594 |
<at name="item" index="1"> |
|
595 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
596 |
</at> |
|
597 |
<at name="item" index="2"> |
|
598 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
599 |
</at> |
|
600 |
<at name="item" index="3"> |
|
601 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
602 |
</at> |
|
603 |
<at name="item" index="4"> |
|
604 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
605 |
</at> |
|
606 |
<at name="item" index="5"> |
|
607 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
608 |
</at> |
|
609 |
<at name="item" index="6"> |
|
610 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
611 |
</at> |
|
612 |
<at name="item" index="7"> |
|
613 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
614 |
</at> |
|
615 |
<at name="item" index="8"> |
|
616 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
617 |
</at> |
|
618 |
<at name="item" index="9"> |
|
619 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
620 |
</at> |
|
621 |
</object> |
|
622 |
</at> |
|
623 |
</object> |
|
624 |
</at> |
|
625 |
<at name="rowgroups"> |
|
626 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
627 |
<at name="groups"> |
|
628 |
<object classname="java.util.HashMap"/> |
|
629 |
</at> |
|
630 |
</object> |
|
631 |
</at> |
|
632 |
<at name="colgroups"> |
|
633 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
634 |
<at name="groups"> |
|
635 |
<object classname="java.util.HashMap"/> |
|
636 |
</at> |
|
637 |
</object> |
|
638 |
</at> |
|
639 |
</object> |
|
640 |
</at> |
|
641 |
</object> |
tags/org.gvsig.gdal-1.0.123/org.gvsig.gdal.app/org.gvsig.gdal.app.ogr.mainplugin/src/main/java/org/gvsig/gdal/app/ogr/mainplugin/gui/JOGRDataExplorerView.java | ||
---|---|---|
1 |
package org.gvsig.gdal.app.ogr.mainplugin.gui; |
|
2 |
|
|
3 |
import com.jgoodies.forms.layout.CellConstraints; |
|
4 |
import com.jgoodies.forms.layout.FormLayout; |
|
5 |
import java.awt.BorderLayout; |
|
6 |
import java.awt.ComponentOrientation; |
|
7 |
import java.awt.Container; |
|
8 |
import java.awt.Dimension; |
|
9 |
import javax.swing.Box; |
|
10 |
import javax.swing.ImageIcon; |
|
11 |
import javax.swing.JButton; |
|
12 |
import javax.swing.JFrame; |
|
13 |
import javax.swing.JLabel; |
|
14 |
import javax.swing.JPanel; |
|
15 |
import javax.swing.JScrollPane; |
|
16 |
import javax.swing.JTable; |
|
17 |
import javax.swing.JTextField; |
|
18 |
|
|
19 |
|
|
20 |
public class JOGRDataExplorerView extends JPanel |
|
21 |
{ |
|
22 |
JTextField connectionField = new JTextField(); |
|
23 |
JTable layerTable = new JTable(); |
|
24 |
JButton propertiesButton = new JButton(); |
|
25 |
JButton openButton = new JButton(); |
|
26 |
JLabel connectionLabel = new JLabel(); |
|
27 |
JButton dataExplorerPropertiesButton = new JButton(); |
|
28 |
JButton fileChooserButton = new JButton(); |
|
29 |
|
|
30 |
/** |
|
31 |
* Default constructor |
|
32 |
*/ |
|
33 |
public JOGRDataExplorerView() |
|
34 |
{ |
|
35 |
initializePanel(); |
|
36 |
} |
|
37 |
|
|
38 |
/** |
|
39 |
* Adds fill components to empty cells in the first row and first column of the grid. |
|
40 |
* This ensures that the grid spacing will be the same as shown in the designer. |
|
41 |
* @param cols an array of column indices in the first row where fill components should be added. |
|
42 |
* @param rows an array of row indices in the first column where fill components should be added. |
|
43 |
*/ |
|
44 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
|
45 |
{ |
|
46 |
Dimension filler = new Dimension(10,10); |
|
47 |
|
|
48 |
boolean filled_cell_11 = false; |
|
49 |
CellConstraints cc = new CellConstraints(); |
|
50 |
if ( cols.length > 0 && rows.length > 0 ) |
|
51 |
{ |
|
52 |
if ( cols[0] == 1 && rows[0] == 1 ) |
|
53 |
{ |
|
54 |
/** add a rigid area */ |
|
55 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
|
56 |
filled_cell_11 = true; |
|
57 |
} |
|
58 |
} |
|
59 |
|
|
60 |
for( int index = 0; index < cols.length; index++ ) |
|
61 |
{ |
|
62 |
if ( cols[index] == 1 && filled_cell_11 ) |
|
63 |
{ |
|
64 |
continue; |
|
65 |
} |
|
66 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
|
67 |
} |
|
68 |
|
|
69 |
for( int index = 0; index < rows.length; index++ ) |
|
70 |
{ |
|
71 |
if ( rows[index] == 1 && filled_cell_11 ) |
|
72 |
{ |
|
73 |
continue; |
|
74 |
} |
|
75 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
|
76 |
} |
|
77 |
|
|
78 |
} |
|
79 |
|
|
80 |
/** |
|
81 |
* Helper method to load an image file from the CLASSPATH |
|
82 |
* @param imageName the package and name of the file to load relative to the CLASSPATH |
|
83 |
* @return an ImageIcon instance with the specified image file |
|
84 |
* @throws IllegalArgumentException if the image resource cannot be loaded. |
|
85 |
*/ |
|
86 |
public ImageIcon loadImage( String imageName ) |
|
87 |
{ |
|
88 |
try |
|
89 |
{ |
|
90 |
ClassLoader classloader = getClass().getClassLoader(); |
|
91 |
java.net.URL url = classloader.getResource( imageName ); |
|
92 |
if ( url != null ) |
|
93 |
{ |
|
94 |
ImageIcon icon = new ImageIcon( url ); |
|
95 |
return icon; |
|
96 |
} |
|
97 |
} |
|
98 |
catch( Exception e ) |
|
99 |
{ |
|
100 |
e.printStackTrace(); |
|
101 |
} |
|
102 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
|
103 |
} |
|
104 |
|
|
105 |
/** |
|
106 |
* Method for recalculating the component orientation for |
|
107 |
* right-to-left Locales. |
|
108 |
* @param orientation the component orientation to be applied |
|
109 |
*/ |
|
110 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
|
111 |
{ |
|
112 |
// Not yet implemented... |
|
113 |
// I18NUtils.applyComponentOrientation(this, orientation); |
|
114 |
super.applyComponentOrientation(orientation); |
|
115 |
} |
|
116 |
|
Also available in: Unified diff