Revision 249
org.gvsig.projection.jcrs/trunk/org.gvsig.projection.jcrs/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.common/src/main/java/org/gvsig/crs/installer/EPSGDatabaseInstaller.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.crs.installer; |
|
25 |
|
|
26 |
import java.io.File; |
|
27 |
import java.io.FileOutputStream; |
|
28 |
import java.io.IOException; |
|
29 |
import java.io.InputStream; |
|
30 |
import java.net.MalformedURLException; |
|
31 |
import java.util.zip.ZipEntry; |
|
32 |
import java.util.zip.ZipException; |
|
33 |
import java.util.zip.ZipInputStream; |
|
34 |
import org.apache.commons.io.FileUtils; |
|
35 |
import org.apache.commons.io.FilenameUtils; |
|
36 |
import org.gvsig.andami.LocaleManager; |
|
37 |
import org.gvsig.andami.PluginServices; |
|
38 |
import org.gvsig.andami.PluginsLocator; |
|
39 |
import org.gvsig.andami.PluginsManager; |
|
40 |
import org.gvsig.crs.CrsFactory; |
|
41 |
import org.gvsig.crs.JCrsExtension; |
|
42 |
import org.gvsig.installer.lib.api.PackageInfo; |
|
43 |
import org.gvsig.installer.lib.api.execution.InstallPackageServiceException; |
|
44 |
import org.gvsig.installer.lib.spi.InstallerInfoFileException; |
|
45 |
import org.gvsig.installer.lib.spi.execution.InstallPackageProvider; |
|
46 |
import org.gvsig.tools.ToolsLocator; |
|
47 |
import org.gvsig.tools.service.spi.AbstractProvider; |
|
48 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
49 |
import org.gvsig.tools.task.SimpleTaskStatus; |
|
50 |
import org.gvsig.tools.task.TaskStatusManager; |
|
51 |
import org.slf4j.Logger; |
|
52 |
import org.slf4j.LoggerFactory; |
|
53 |
|
|
54 |
public class EPSGDatabaseInstaller extends AbstractProvider implements InstallPackageProvider { |
|
55 |
|
|
56 |
private static Logger logger = LoggerFactory.getLogger(EPSGDatabaseInstaller.class); |
|
57 |
|
|
58 |
private int BUFFER = 2048; |
|
59 |
|
|
60 |
public EPSGDatabaseInstaller(ProviderServices providerServices) { |
|
61 |
super(providerServices); |
|
62 |
} |
|
63 |
|
|
64 |
public void install(File applicationFolder, InputStream inputStream, PackageInfo packageInfo) throws InstallPackageServiceException { |
|
65 |
PluginsManager pluginsManager = PluginsLocator.getManager(); |
|
66 |
File i18nFolder = pluginsManager.getApplicationI18nFolder(); |
|
67 |
|
|
68 |
File epsgDatabaseFolder = new File(CrsFactory.getDataBaseFolder(),"EPSG"); |
|
69 |
|
|
70 |
logger.info("Installing package '" + packageInfo.getCode() + "' in '" + epsgDatabaseFolder.getAbsolutePath() + "'."); |
|
71 |
try { |
|
72 |
FileUtils.forceMkdir(epsgDatabaseFolder); |
|
73 |
decompress(inputStream, epsgDatabaseFolder); |
|
74 |
} catch (Exception e) { |
|
75 |
try { |
|
76 |
logger.warn("Can install package '" + packageInfo.getCode() + "'.", e); |
|
77 |
// if there is an exception, installLater is called |
|
78 |
installLater(applicationFolder, inputStream, packageInfo); |
|
79 |
} catch (IOException e1) { |
|
80 |
logger.warn("Can install package '" + packageInfo.getCode() + "'.", e1); |
|
81 |
throw new InstallPackageServiceException(e1); |
|
82 |
} |
|
83 |
} |
|
84 |
|
|
85 |
} |
|
86 |
|
|
87 |
private void decompress(InputStream inputStream, File folder) |
|
88 |
throws ZipException, IOException, InstallerInfoFileException { |
|
89 |
|
|
90 |
ZipInputStream zis = null; |
|
91 |
ZipEntry entry = null; |
|
92 |
byte data[] = new byte[BUFFER]; |
|
93 |
int count = 0; |
|
94 |
|
|
95 |
TaskStatusManager manager = ToolsLocator.getTaskStatusManager(); |
|
96 |
SimpleTaskStatus taskStatus = manager.createDefaultSimpleTaskStatus("Uncompressing..."); |
|
97 |
|
|
98 |
manager.add(taskStatus); |
|
99 |
String entryName = "(header)"; |
|
100 |
try { |
|
101 |
long readed = 0; |
|
102 |
zis = new ZipInputStream(inputStream); |
|
103 |
while ( (entry = zis.getNextEntry()) != null ) { |
|
104 |
entryName = FilenameUtils.separatorsToSystem(entry.getName()); |
|
105 |
taskStatus.message(entryName); |
|
106 |
|
|
107 |
File file = new File(folder, entryName); |
|
108 |
if ( entry.isDirectory() ) { |
|
109 |
file.mkdirs(); |
|
110 |
} else { |
|
111 |
if ( file.exists() ) { |
|
112 |
FileUtils.forceDelete(file); |
|
113 |
} |
|
114 |
if ( !file.getParentFile().exists() ) { |
|
115 |
FileUtils.forceMkdir(file.getParentFile()); |
|
116 |
} |
|
117 |
logger.debug("extracting " + file.getAbsolutePath()); |
|
118 |
FileOutputStream fos = new FileOutputStream(file); |
|
119 |
while ( (count = zis.read(data, 0, BUFFER)) != -1 ) { |
|
120 |
fos.write(data, 0, count); |
|
121 |
readed += count; |
|
122 |
taskStatus.setCurValue(readed); |
|
123 |
} |
|
124 |
fos.flush(); |
|
125 |
fos.close(); |
|
126 |
} |
|
127 |
} |
|
128 |
zis.close(); |
|
129 |
} catch (IOException ex) { |
|
130 |
logger.warn("Problems uncompresing 'EPSG database' (last entry '" + entryName + "'.", ex); |
|
131 |
throw ex; |
|
132 |
|
|
133 |
} catch (RuntimeException ex) { |
|
134 |
logger.warn("Problems uncompresing 'EPSG database' (last entry '" + entryName + "'.", ex); |
|
135 |
throw ex; |
|
136 |
|
|
137 |
} finally { |
|
138 |
taskStatus.remove(); |
|
139 |
|
|
140 |
} |
|
141 |
} |
|
142 |
|
|
143 |
public void installLater(File applicationDirectory, InputStream inputStream, PackageInfo packageInfo) throws InstallPackageServiceException, IOException { |
|
144 |
logger.warn("installLater is not implementes."); |
|
145 |
} |
|
146 |
} |
org.gvsig.projection.jcrs/trunk/org.gvsig.projection.jcrs/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.common/src/main/java/org/gvsig/crs/installer/EPSGDatabaseInstallerFactory.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.crs.installer; |
|
25 |
|
|
26 |
import java.io.File; |
|
27 |
import java.io.IOException; |
|
28 |
import org.apache.commons.io.FileUtils; |
|
29 |
import org.gvsig.andami.PluginServices; |
|
30 |
import org.gvsig.andami.PluginsLocator; |
|
31 |
import org.gvsig.andami.PluginsManager; |
|
32 |
import org.gvsig.crs.CrsFactory; |
|
33 |
import org.gvsig.crs.JCrsExtension; |
|
34 |
import org.gvsig.installer.lib.api.InstallerLocator; |
|
35 |
import org.gvsig.installer.lib.api.InstallerManager; |
|
36 |
import org.gvsig.installer.lib.spi.InstallerProviderLocator; |
|
37 |
import org.gvsig.tools.ToolsLocator; |
|
38 |
import org.gvsig.tools.dynobject.DynClass; |
|
39 |
import org.gvsig.tools.dynobject.DynObject; |
|
40 |
import org.gvsig.tools.dynobject.DynObjectManager; |
|
41 |
import org.gvsig.tools.service.spi.AbstractProviderFactory; |
|
42 |
import org.gvsig.tools.service.spi.Provider; |
|
43 |
import org.gvsig.tools.service.spi.ProviderManager; |
|
44 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
45 |
import org.slf4j.Logger; |
|
46 |
import org.slf4j.LoggerFactory; |
|
47 |
|
|
48 |
public class EPSGDatabaseInstallerFactory extends |
|
49 |
AbstractProviderFactory { |
|
50 |
|
|
51 |
private static final Logger logger = LoggerFactory.getLogger(EPSGDatabaseInstallerFactory.class); |
|
52 |
|
|
53 |
public static final String PROVIDER_NAME = "jCRS_EPSG"; |
|
54 |
public static final String PROVIDER_DESCRIPTION = "EPSG database installer for jCRS"; |
|
55 |
|
|
56 |
private DynClass dynclass; |
|
57 |
|
|
58 |
@Override |
|
59 |
protected DynClass createParametersDynClass() { |
|
60 |
if ( dynclass == null ) { |
|
61 |
initialize(); |
|
62 |
} |
|
63 |
return dynclass; |
|
64 |
} |
|
65 |
|
|
66 |
@Override |
|
67 |
protected Provider doCreate(DynObject parameters, ProviderServices services) { |
|
68 |
return new EPSGDatabaseInstaller(services); |
|
69 |
} |
|
70 |
|
|
71 |
public void initialize() { |
|
72 |
if ( dynclass == null ) { |
|
73 |
DynObjectManager dynObjectManager = ToolsLocator |
|
74 |
.getDynObjectManager(); |
|
75 |
dynclass = dynObjectManager.createDynClass(PROVIDER_NAME, |
|
76 |
PROVIDER_DESCRIPTION); |
|
77 |
dynObjectManager.add(dynclass); |
|
78 |
} |
|
79 |
} |
|
80 |
|
|
81 |
|
|
82 |
public static void registerEPSGDatabaseInstaller() { |
|
83 |
|
|
84 |
InstallerManager installerManager = InstallerLocator.getInstallerManager(); |
|
85 |
ProviderManager providerManager = InstallerProviderLocator.getProviderManager(); |
|
86 |
PluginsManager pluginsManager = PluginsLocator.getManager(); |
|
87 |
|
|
88 |
providerManager.addProviderFactory(new EPSGDatabaseInstallerFactory()); |
|
89 |
|
|
90 |
File epsgDatabaseFolder = new File(CrsFactory.getDataBaseFolder(),"EPSG"); |
|
91 |
|
|
92 |
try { |
|
93 |
FileUtils.forceMkdir(epsgDatabaseFolder); |
|
94 |
} catch (IOException ex) { |
|
95 |
logger.warn("Can't create EPSG databases folder in '"+epsgDatabaseFolder.getAbsolutePath()+"'.",ex); |
|
96 |
} |
|
97 |
installerManager.addLocalAddonRepository(epsgDatabaseFolder, PROVIDER_NAME); |
|
98 |
} |
|
99 |
} |
org.gvsig.projection.jcrs/trunk/org.gvsig.projection.jcrs/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.common/src/main/java/org/gvsig/crs/preferences/JCRSPreferencesPage.java | ||
---|---|---|
1 |
/* |
|
2 |
* To change this license header, choose License Headers in Project Properties. |
|
3 |
* To change this template file, choose Tools | Templates |
|
4 |
* and open the template in the editor. |
|
5 |
*/ |
|
6 |
package org.gvsig.crs.preferences; |
|
7 |
|
|
8 |
import java.awt.BorderLayout; |
|
9 |
import java.io.File; |
|
10 |
import java.util.Collection; |
|
11 |
import java.util.Iterator; |
|
12 |
import javax.swing.DefaultListModel; |
|
13 |
import javax.swing.ImageIcon; |
|
14 |
import javax.swing.JPanel; |
|
15 |
import org.apache.commons.io.FileUtils; |
|
16 |
import org.apache.commons.io.FilenameUtils; |
|
17 |
import org.apache.commons.lang3.BooleanUtils; |
|
18 |
import org.apache.commons.lang3.StringUtils; |
|
19 |
import org.gvsig.andami.IconThemeHelper; |
|
20 |
import org.gvsig.andami.PluginServices; |
|
21 |
import org.gvsig.andami.PluginsLocator; |
|
22 |
import org.gvsig.andami.PluginsManager; |
|
23 |
import org.gvsig.andami.preferences.AbstractPreferencePage; |
|
24 |
import org.gvsig.andami.preferences.StoreException; |
|
25 |
import org.gvsig.crs.CrsFactory; |
|
26 |
import org.gvsig.tools.ToolsLocator; |
|
27 |
import org.gvsig.tools.dynobject.DynObject; |
|
28 |
import org.gvsig.tools.exception.BaseException; |
|
29 |
import org.gvsig.tools.i18n.I18nManager; |
|
30 |
import org.gvsig.tools.packageutils.PackageInfo; |
|
31 |
import org.gvsig.tools.packageutils.PackageManager; |
|
32 |
import org.slf4j.Logger; |
|
33 |
import org.slf4j.LoggerFactory; |
|
34 |
|
|
35 |
/** |
|
36 |
* |
|
37 |
* @author usuario |
|
38 |
*/ |
|
39 |
public class JCRSPreferencesPage extends AbstractPreferencePage { |
|
40 |
|
|
41 |
private static final Logger logger = LoggerFactory.getLogger(JCRSPreferencesPage.class); |
|
42 |
private static final long serialVersionUID = -7838901334080793221L; |
|
43 |
|
|
44 |
private JCRSPreferencesPanel preferences; |
|
45 |
private DynObject pluginProperties; |
|
46 |
private PluginServices plugin; |
|
47 |
|
|
48 |
private class ListItem { |
|
49 |
|
|
50 |
private PackageInfo pkg; |
|
51 |
private File epsgFile; |
|
52 |
|
|
53 |
ListItem(PackageInfo pkg, File epsgFile) { |
|
54 |
this.pkg = pkg; |
|
55 |
this.epsgFile = epsgFile; |
|
56 |
} |
|
57 |
|
|
58 |
public File getEPSGFile() { |
|
59 |
return this.epsgFile; |
|
60 |
} |
|
61 |
|
|
62 |
public PackageInfo getPackageInfo() { |
|
63 |
return this.pkg; |
|
64 |
} |
|
65 |
|
|
66 |
public String toString() { |
|
67 |
return this.pkg.getName(); |
|
68 |
} |
|
69 |
|
|
70 |
} |
|
71 |
|
|
72 |
public JCRSPreferencesPage() { |
|
73 |
initComponents(); |
|
74 |
} |
|
75 |
|
|
76 |
private void initComponents() { |
|
77 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
78 |
PluginsManager pluginManager = PluginsLocator.getManager(); |
|
79 |
this.plugin = pluginManager.getPlugin(this); |
|
80 |
this.pluginProperties = this.plugin.getPluginProperties(); |
|
81 |
|
|
82 |
this.preferences = new JCRSPreferencesPanel(); |
|
83 |
this.preferences.lblHeader.setText( |
|
84 |
i18nManager.getTranslation("_Select_the_EPSG_data_base_to_use") |
|
85 |
); |
|
86 |
this.setLayout(new BorderLayout()); |
|
87 |
this.add(this.preferences, BorderLayout.NORTH); |
|
88 |
initializeValues(); |
|
89 |
} |
|
90 |
|
|
91 |
public void storeValues() throws StoreException { |
|
92 |
ListItem item = (ListItem) this.preferences.lstBBDD.getSelectedValue(); |
|
93 |
if( item == null ) { |
|
94 |
return; |
|
95 |
} |
|
96 |
this.pluginProperties.setDynValue("epsgDatabase", item.getEPSGFile()); |
|
97 |
this.pluginProperties.setDynValue("useMemoryCacheForCRSs", |
|
98 |
new Boolean(this.preferences.chkUseMomoryChacheForCRSs.isSelected()) |
|
99 |
); |
|
100 |
this.plugin.savePluginProperties(); |
|
101 |
} |
|
102 |
|
|
103 |
public void setChangesApplied() { |
|
104 |
// ???? |
|
105 |
} |
|
106 |
|
|
107 |
public String getID() { |
|
108 |
return getClass().getName(); |
|
109 |
} |
|
110 |
|
|
111 |
public String getTitle() { |
|
112 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
113 |
return i18nManager.getTranslation("jCRS_preferences"); |
|
114 |
|
|
115 |
} |
|
116 |
|
|
117 |
public JPanel getPanel() { |
|
118 |
return this; |
|
119 |
} |
|
120 |
|
|
121 |
public void initializeValues() { |
|
122 |
PackageManager pkgManager = ToolsLocator.getPackageManager(); |
|
123 |
|
|
124 |
File dbfolder = CrsFactory.getDataBaseFolder(); |
|
125 |
File epsgFolders = new File(dbfolder,"EPSG"); |
|
126 |
Collection<File> files = FileUtils.listFiles(epsgFolders, new String[]{"info"}, true); |
|
127 |
DefaultListModel<ListItem> model = new DefaultListModel<ListItem>(); |
|
128 |
|
|
129 |
File currentEPSG = getCurrentEPSG(); |
|
130 |
|
|
131 |
int selectedOption = 0; |
|
132 |
int n = 0; |
|
133 |
Iterator<File> it = files.iterator(); |
|
134 |
while( it.hasNext() ) { |
|
135 |
File f = it.next(); |
|
136 |
if( f.getName().equals("package.info") ) { |
|
137 |
try { |
|
138 |
PackageInfo pkginfo = pkgManager.createPackageInfo(f); |
|
139 |
File epsgdb = new File(f.getParentFile(),"EPSG.sql"); |
|
140 |
epsgdb = makeRelative(dbfolder, epsgdb); |
|
141 |
model.addElement(new ListItem(pkginfo, epsgdb)); |
|
142 |
if( epsgdb.equals(currentEPSG) ) { |
|
143 |
selectedOption = n; |
|
144 |
} |
|
145 |
n++; |
|
146 |
} catch (BaseException ex) { |
|
147 |
logger.warn("Can't load package information from '"+f.getAbsolutePath()+"'.",ex); |
|
148 |
} |
|
149 |
} |
|
150 |
} |
|
151 |
this.preferences.lstBBDD.setModel(model); |
|
152 |
this.preferences.lstBBDD.setSelectedIndex(selectedOption); |
|
153 |
|
|
154 |
boolean currentUseChacheForCRSs = BooleanUtils.isTrue( |
|
155 |
(Boolean) this.pluginProperties.getDynValue("useMemoryCacheForCRSs") |
|
156 |
); |
|
157 |
this.preferences.chkUseMomoryChacheForCRSs.setSelected(currentUseChacheForCRSs); |
|
158 |
} |
|
159 |
|
|
160 |
private File makeRelative(File parent, File file) { |
|
161 |
String parent_path = parent.getAbsolutePath(); |
|
162 |
if( !parent_path.endsWith(File.separator) ) { |
|
163 |
parent_path += File.separator; |
|
164 |
} |
|
165 |
if( file.getAbsolutePath().startsWith(parent_path) ) { |
|
166 |
file = new File(file.getAbsolutePath().substring(parent_path.length())); |
|
167 |
} |
|
168 |
return file; |
|
169 |
} |
|
170 |
|
|
171 |
private File getCurrentEPSG() { |
|
172 |
File dbfolder = CrsFactory.getDataBaseFolder(); |
|
173 |
File currentEPSG = null; |
|
174 |
String s = StringUtils.defaultIfBlank((String) this.pluginProperties.getDynValue("epsgDatabase"),null); |
|
175 |
if( s!=null ) { |
|
176 |
currentEPSG = new File(s); |
|
177 |
if( !currentEPSG.isAbsolute() ) { |
|
178 |
currentEPSG = new File(dbfolder,s); |
|
179 |
} |
|
180 |
currentEPSG = makeRelative(dbfolder,currentEPSG); |
|
181 |
} |
|
182 |
return currentEPSG; |
|
183 |
} |
|
184 |
|
|
185 |
public void initializeDefaults() { |
|
186 |
|
|
187 |
} |
|
188 |
|
|
189 |
public ImageIcon getIcon() { |
|
190 |
return IconThemeHelper.getImageIcon("jcrs-preferences"); |
|
191 |
} |
|
192 |
|
|
193 |
public boolean isValueChanged() { |
|
194 |
File currentEPSG = this.getCurrentEPSG(); |
|
195 |
ListItem item = (ListItem) this.preferences.lstBBDD.getSelectedValue(); |
|
196 |
if( item == null ) { |
|
197 |
return false; |
|
198 |
} |
|
199 |
boolean changed = ! currentEPSG.equals(item.getEPSGFile()); |
|
200 |
if( !changed ) { |
|
201 |
boolean currentUseChacheForCRSs = BooleanUtils.isTrue( |
|
202 |
(Boolean) this.pluginProperties.getDynValue("useMemoryCacheForCRSs") |
|
203 |
); |
|
204 |
if( this.preferences.chkUseMomoryChacheForCRSs.isSelected()!=currentUseChacheForCRSs ) { |
|
205 |
changed = true; |
|
206 |
} |
|
207 |
} |
|
208 |
return changed; |
|
209 |
} |
|
210 |
|
|
211 |
public boolean isResizeable() { |
|
212 |
return true; |
|
213 |
} |
|
214 |
|
|
215 |
|
|
216 |
} |
org.gvsig.projection.jcrs/trunk/org.gvsig.projection.jcrs/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.common/src/main/java/org/gvsig/crs/preferences/JCRSPreferencesPanel.java | ||
---|---|---|
1 |
/* |
|
2 |
* To change this license header, choose License Headers in Project Properties. |
|
3 |
* To change this template file, choose Tools | Templates |
|
4 |
* and open the template in the editor. |
|
5 |
*/ |
|
6 |
|
|
7 |
package org.gvsig.crs.preferences; |
|
8 |
|
|
9 |
import java.awt.Dimension; |
|
10 |
import java.awt.GridBagConstraints; |
|
11 |
import java.awt.GridBagLayout; |
|
12 |
import javax.swing.AbstractListModel; |
|
13 |
import javax.swing.Box; |
|
14 |
import javax.swing.JCheckBox; |
|
15 |
import javax.swing.JLabel; |
|
16 |
import javax.swing.JList; |
|
17 |
import javax.swing.JScrollPane; |
|
18 |
import org.jdesktop.layout.GroupLayout; |
|
19 |
|
|
20 |
/** |
|
21 |
* |
|
22 |
* @author usuario |
|
23 |
*/ |
|
24 |
public class JCRSPreferencesPanel extends javax.swing.JPanel { |
|
25 |
|
|
26 |
/** |
|
27 |
* Creates new form JCRSPreferencesPanel |
|
28 |
*/ |
|
29 |
public JCRSPreferencesPanel() { |
|
30 |
initComponents(); |
|
31 |
} |
|
32 |
|
|
33 |
/** |
|
34 |
* This method is called from within the constructor to |
|
35 |
* initialize the form. |
|
36 |
* WARNING: Do NOT modify this code. The content of this method is |
|
37 |
* always regenerated by the Form Editor. |
|
38 |
*/ |
|
39 |
@SuppressWarnings("unchecked") |
|
40 |
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents |
|
41 |
private void initComponents() { |
|
42 |
GridBagConstraints gridBagConstraints; |
|
43 |
|
|
44 |
lblHeader = new JLabel(); |
|
45 |
jScrollPane1 = new JScrollPane(); |
|
46 |
lstBBDD = new JList(); |
|
47 |
filler1 = new Box.Filler(new Dimension(16, 16), new Dimension(16, 16), new Dimension(16, 16)); |
|
48 |
filler2 = new Box.Filler(new Dimension(16, 16), new Dimension(16, 16), new Dimension(16, 16)); |
|
49 |
chkUseMomoryChacheForCRSs = new JCheckBox(); |
|
50 |
|
|
51 |
GridBagLayout layout = new GridBagLayout(); |
|
52 |
layout.columnWidths = new int[] {0, 4, 0, 4, 0}; |
|
53 |
layout.rowHeights = new int[] {0, 4, 0, 4, 0, 4, 0, 4, 0}; |
|
54 |
setLayout(layout); |
|
55 |
|
|
56 |
lblHeader.setText("<html> Seleccione la base de datos EPSG a utilizar </html>"); // NOI18N |
|
57 |
gridBagConstraints = new GridBagConstraints(); |
|
58 |
gridBagConstraints.gridx = 2; |
|
59 |
gridBagConstraints.gridy = 2; |
|
60 |
gridBagConstraints.anchor = GridBagConstraints.LINE_START; |
|
61 |
add(lblHeader, gridBagConstraints); |
|
62 |
|
|
63 |
jScrollPane1.setViewportView(lstBBDD); |
|
64 |
|
|
65 |
gridBagConstraints = new GridBagConstraints(); |
|
66 |
gridBagConstraints.gridx = 2; |
|
67 |
gridBagConstraints.gridy = 4; |
|
68 |
gridBagConstraints.fill = GridBagConstraints.BOTH; |
|
69 |
gridBagConstraints.weightx = 0.1; |
|
70 |
gridBagConstraints.weighty = 0.2; |
|
71 |
add(jScrollPane1, gridBagConstraints); |
|
72 |
gridBagConstraints = new GridBagConstraints(); |
|
73 |
gridBagConstraints.gridx = 0; |
|
74 |
gridBagConstraints.gridy = 6; |
|
75 |
add(filler1, gridBagConstraints); |
|
76 |
gridBagConstraints = new GridBagConstraints(); |
|
77 |
gridBagConstraints.gridx = 4; |
|
78 |
gridBagConstraints.gridy = 6; |
|
79 |
add(filler2, gridBagConstraints); |
|
80 |
|
|
81 |
chkUseMomoryChacheForCRSs.setText("Usar cache para los CRSs"); |
|
82 |
gridBagConstraints = new GridBagConstraints(); |
|
83 |
gridBagConstraints.gridx = 2; |
|
84 |
gridBagConstraints.gridy = 6; |
|
85 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL; |
|
86 |
add(chkUseMomoryChacheForCRSs, gridBagConstraints); |
|
87 |
}// </editor-fold>//GEN-END:initComponents |
|
88 |
|
|
89 |
|
|
90 |
// Variables declaration - do not modify//GEN-BEGIN:variables |
|
91 |
protected JCheckBox chkUseMomoryChacheForCRSs; |
|
92 |
protected Box.Filler filler1; |
|
93 |
protected Box.Filler filler2; |
|
94 |
protected JScrollPane jScrollPane1; |
|
95 |
protected JLabel lblHeader; |
|
96 |
protected JList lstBBDD; |
|
97 |
// End of variables declaration//GEN-END:variables |
|
98 |
} |
org.gvsig.projection.jcrs/trunk/org.gvsig.projection.jcrs/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.common/src/main/java/org/gvsig/crs/preferences/JCRSPreferencesPanel.form | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
2 |
|
|
3 |
<Form version="1.8" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> |
|
4 |
<AuxValues> |
|
5 |
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> |
|
6 |
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> |
|
7 |
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="false"/> |
|
8 |
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> |
|
9 |
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> |
|
10 |
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/> |
|
11 |
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> |
|
12 |
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> |
|
13 |
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="4"/> |
|
14 |
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/> |
|
15 |
</AuxValues> |
|
16 |
<SubComponents> |
|
17 |
<Component class="javax.swing.JLabel" name="lblHeader"> |
|
18 |
<Properties> |
|
19 |
<Property name="text" type="java.lang.String" value="<html> Seleccione la base de datos EPSG a utilizar </html>" noResource="true"/> |
|
20 |
</Properties> |
|
21 |
<Constraints> |
|
22 |
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
23 |
<GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/> |
|
24 |
</Constraint> |
|
25 |
</Constraints> |
|
26 |
</Component> |
|
27 |
<Container class="javax.swing.JScrollPane" name="jScrollPane1"> |
|
28 |
<AuxValues> |
|
29 |
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> |
|
30 |
</AuxValues> |
|
31 |
<Constraints> |
|
32 |
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
33 |
<GridBagConstraints gridX="2" gridY="4" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.1" weightY="0.2"/> |
|
34 |
</Constraint> |
|
35 |
</Constraints> |
|
36 |
|
|
37 |
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> |
|
38 |
<SubComponents> |
|
39 |
<Component class="javax.swing.JList" name="lstBBDD"> |
|
40 |
<Properties> |
|
41 |
<Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor"> |
|
42 |
<StringArray count="0"/> |
|
43 |
</Property> |
|
44 |
</Properties> |
|
45 |
</Component> |
|
46 |
</SubComponents> |
|
47 |
</Container> |
|
48 |
<Component class="javax.swing.Box$Filler" name="filler1"> |
|
49 |
<Properties> |
|
50 |
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> |
|
51 |
<Dimension value="[16, 16]"/> |
|
52 |
</Property> |
|
53 |
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> |
|
54 |
<Dimension value="[16, 16]"/> |
|
55 |
</Property> |
|
56 |
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> |
|
57 |
<Dimension value="[16, 16]"/> |
|
58 |
</Property> |
|
59 |
</Properties> |
|
60 |
<AuxValues> |
|
61 |
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/> |
|
62 |
</AuxValues> |
|
63 |
<Constraints> |
|
64 |
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
65 |
<GridBagConstraints gridX="0" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> |
|
66 |
</Constraint> |
|
67 |
</Constraints> |
|
68 |
</Component> |
|
69 |
<Component class="javax.swing.Box$Filler" name="filler2"> |
|
70 |
<Properties> |
|
71 |
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> |
|
72 |
<Dimension value="[16, 16]"/> |
|
73 |
</Property> |
|
74 |
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> |
|
75 |
<Dimension value="[16, 16]"/> |
|
76 |
</Property> |
|
77 |
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> |
|
78 |
<Dimension value="[16, 16]"/> |
|
79 |
</Property> |
|
80 |
</Properties> |
|
81 |
<AuxValues> |
|
82 |
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/> |
|
83 |
</AuxValues> |
|
84 |
<Constraints> |
|
85 |
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
86 |
<GridBagConstraints gridX="4" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> |
|
87 |
</Constraint> |
|
88 |
</Constraints> |
|
89 |
</Component> |
|
90 |
<Component class="javax.swing.JCheckBox" name="chkUseMomoryChacheForCRSs"> |
|
91 |
<Properties> |
|
92 |
<Property name="text" type="java.lang.String" value="Usar cache para los CRSs"/> |
|
93 |
</Properties> |
|
94 |
<Constraints> |
|
95 |
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
96 |
<GridBagConstraints gridX="2" gridY="6" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> |
|
97 |
</Constraint> |
|
98 |
</Constraints> |
|
99 |
</Component> |
|
100 |
</SubComponents> |
|
101 |
<LayoutCode> |
|
102 |
<CodeStatement> |
|
103 |
<CodeExpression id="1_layout"> |
|
104 |
<CodeVariable name="layout" type="4096" declaredType="java.awt.GridBagLayout"/> |
|
105 |
<ExpressionOrigin> |
|
106 |
<ExpressionProvider type="CodeConstructor"> |
|
107 |
<CodeConstructor class="java.awt.GridBagLayout" parameterTypes=""/> |
|
108 |
</ExpressionProvider> |
|
109 |
</ExpressionOrigin> |
|
110 |
</CodeExpression> |
|
111 |
<StatementProvider type="CodeExpression"> |
|
112 |
<CodeExpression id="1_layout"/> |
|
113 |
</StatementProvider> |
|
114 |
</CodeStatement> |
|
115 |
<CodeStatement> |
|
116 |
<CodeExpression id="1_layout"/> |
|
117 |
<StatementProvider type="CodeField"> |
|
118 |
<CodeField name="columnWidths" class="java.awt.GridBagLayout"/> |
|
119 |
</StatementProvider> |
|
120 |
<Parameters> |
|
121 |
<CodeExpression id="2"> |
|
122 |
<ExpressionOrigin> |
|
123 |
<Value type="[I" editor="org.netbeans.modules.form.layoutsupport.delegates.GridBagLayoutSupport$IntArrayPropertyEditor"> |
|
124 |
<PropertyValue value="[0, 4, 0, 4, 0]"/> |
|
125 |
</Value> |
|
126 |
</ExpressionOrigin> |
|
127 |
</CodeExpression> |
|
128 |
</Parameters> |
|
129 |
</CodeStatement> |
|
130 |
<CodeStatement> |
|
131 |
<CodeExpression id="1_layout"/> |
|
132 |
<StatementProvider type="CodeField"> |
|
133 |
<CodeField name="rowHeights" class="java.awt.GridBagLayout"/> |
|
134 |
</StatementProvider> |
|
135 |
<Parameters> |
|
136 |
<CodeExpression id="3"> |
|
137 |
<ExpressionOrigin> |
|
138 |
<Value type="[I" editor="org.netbeans.modules.form.layoutsupport.delegates.GridBagLayoutSupport$IntArrayPropertyEditor"> |
|
139 |
<PropertyValue value="[0, 4, 0, 4, 0, 4, 0, 4, 0]"/> |
|
140 |
</Value> |
|
141 |
</ExpressionOrigin> |
|
142 |
</CodeExpression> |
|
143 |
</Parameters> |
|
144 |
</CodeStatement> |
|
145 |
<CodeStatement> |
|
146 |
<CodeExpression id="4"> |
|
147 |
<ExpressionOrigin> |
|
148 |
<ExpressionProvider type="ComponentRef"> |
|
149 |
<ComponentRef name="."/> |
|
150 |
</ExpressionProvider> |
|
151 |
</ExpressionOrigin> |
|
152 |
</CodeExpression> |
|
153 |
<StatementProvider type="CodeMethod"> |
|
154 |
<CodeMethod name="setLayout" class="java.awt.Container" parameterTypes="java.awt.LayoutManager"/> |
|
155 |
</StatementProvider> |
|
156 |
<Parameters> |
|
157 |
<CodeExpression id="1_layout"/> |
|
158 |
</Parameters> |
|
159 |
</CodeStatement> |
|
160 |
<CodeStatement> |
|
161 |
<CodeExpression id="5_gridBagConstraints"> |
|
162 |
<CodeVariable name="gridBagConstraints" type="20480" declaredType="java.awt.GridBagConstraints"/> |
|
163 |
<ExpressionOrigin> |
|
164 |
<ExpressionProvider type="CodeConstructor"> |
|
165 |
<CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/> |
|
166 |
</ExpressionProvider> |
|
167 |
</ExpressionOrigin> |
|
168 |
</CodeExpression> |
|
169 |
<StatementProvider type="CodeExpression"> |
|
170 |
<CodeExpression id="5_gridBagConstraints"/> |
|
171 |
</StatementProvider> |
|
172 |
</CodeStatement> |
|
173 |
<CodeStatement> |
|
174 |
<CodeExpression id="5_gridBagConstraints"/> |
|
175 |
<StatementProvider type="CodeField"> |
|
176 |
<CodeField name="gridx" class="java.awt.GridBagConstraints"/> |
|
177 |
</StatementProvider> |
|
178 |
<Parameters> |
|
179 |
<CodeExpression id="6"> |
|
180 |
<ExpressionOrigin> |
|
181 |
<Value type="int" value="2"/> |
|
182 |
</ExpressionOrigin> |
|
183 |
</CodeExpression> |
|
184 |
</Parameters> |
|
185 |
</CodeStatement> |
|
186 |
<CodeStatement> |
|
187 |
<CodeExpression id="5_gridBagConstraints"/> |
|
188 |
<StatementProvider type="CodeField"> |
|
189 |
<CodeField name="gridy" class="java.awt.GridBagConstraints"/> |
|
190 |
</StatementProvider> |
|
191 |
<Parameters> |
|
192 |
<CodeExpression id="7"> |
|
193 |
<ExpressionOrigin> |
|
194 |
<Value type="int" value="2"/> |
|
195 |
</ExpressionOrigin> |
|
196 |
</CodeExpression> |
|
197 |
</Parameters> |
|
198 |
</CodeStatement> |
|
199 |
<CodeStatement> |
|
200 |
<CodeExpression id="5_gridBagConstraints"/> |
|
201 |
<StatementProvider type="CodeField"> |
|
202 |
<CodeField name="anchor" class="java.awt.GridBagConstraints"/> |
|
203 |
</StatementProvider> |
|
204 |
<Parameters> |
|
205 |
<CodeExpression id="8"> |
|
206 |
<ExpressionOrigin> |
|
207 |
<Value type="int" value="21"/> |
|
208 |
</ExpressionOrigin> |
|
209 |
</CodeExpression> |
|
210 |
</Parameters> |
|
211 |
</CodeStatement> |
|
212 |
<CodeStatement> |
|
213 |
<CodeExpression id="4"/> |
|
214 |
<StatementProvider type="CodeMethod"> |
|
215 |
<CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/> |
|
216 |
</StatementProvider> |
|
217 |
<Parameters> |
|
218 |
<CodeExpression id="9_lblHeader"> |
|
219 |
<CodeVariable name="lblHeader" type="8196" declaredType="javax.swing.JLabel"/> |
|
220 |
<ExpressionOrigin> |
|
221 |
<ExpressionProvider type="ComponentRef"> |
|
222 |
<ComponentRef name="lblHeader"/> |
|
223 |
</ExpressionProvider> |
|
224 |
</ExpressionOrigin> |
|
225 |
</CodeExpression> |
|
226 |
<CodeExpression id="5_gridBagConstraints"/> |
|
227 |
</Parameters> |
|
228 |
</CodeStatement> |
|
229 |
<CodeStatement> |
|
230 |
<CodeExpression id="10_gridBagConstraints"> |
|
231 |
<CodeVariable name="gridBagConstraints"/> |
|
232 |
<ExpressionOrigin> |
|
233 |
<ExpressionProvider type="CodeConstructor"> |
|
234 |
<CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/> |
|
235 |
</ExpressionProvider> |
|
236 |
</ExpressionOrigin> |
|
237 |
</CodeExpression> |
|
238 |
<StatementProvider type="CodeExpression"> |
|
239 |
<CodeExpression id="10_gridBagConstraints"/> |
|
240 |
</StatementProvider> |
|
241 |
</CodeStatement> |
|
242 |
<CodeStatement> |
|
243 |
<CodeExpression id="10_gridBagConstraints"/> |
|
244 |
<StatementProvider type="CodeField"> |
|
245 |
<CodeField name="gridx" class="java.awt.GridBagConstraints"/> |
|
246 |
</StatementProvider> |
|
247 |
<Parameters> |
|
248 |
<CodeExpression id="11"> |
|
249 |
<ExpressionOrigin> |
|
250 |
<Value type="int" value="2"/> |
|
251 |
</ExpressionOrigin> |
|
252 |
</CodeExpression> |
|
253 |
</Parameters> |
|
254 |
</CodeStatement> |
|
255 |
<CodeStatement> |
|
256 |
<CodeExpression id="10_gridBagConstraints"/> |
|
257 |
<StatementProvider type="CodeField"> |
|
258 |
<CodeField name="gridy" class="java.awt.GridBagConstraints"/> |
|
259 |
</StatementProvider> |
|
260 |
<Parameters> |
|
261 |
<CodeExpression id="12"> |
|
262 |
<ExpressionOrigin> |
|
263 |
<Value type="int" value="4"/> |
|
264 |
</ExpressionOrigin> |
|
265 |
</CodeExpression> |
|
266 |
</Parameters> |
|
267 |
</CodeStatement> |
|
268 |
<CodeStatement> |
|
269 |
<CodeExpression id="10_gridBagConstraints"/> |
|
270 |
<StatementProvider type="CodeField"> |
|
271 |
<CodeField name="fill" class="java.awt.GridBagConstraints"/> |
|
272 |
</StatementProvider> |
|
273 |
<Parameters> |
|
274 |
<CodeExpression id="13"> |
|
275 |
<ExpressionOrigin> |
|
276 |
<Value type="int" value="1"/> |
|
277 |
</ExpressionOrigin> |
|
278 |
</CodeExpression> |
|
279 |
</Parameters> |
|
280 |
</CodeStatement> |
|
281 |
<CodeStatement> |
|
282 |
<CodeExpression id="10_gridBagConstraints"/> |
|
283 |
<StatementProvider type="CodeField"> |
|
284 |
<CodeField name="weightx" class="java.awt.GridBagConstraints"/> |
|
285 |
</StatementProvider> |
|
286 |
<Parameters> |
|
287 |
<CodeExpression id="14"> |
|
288 |
<ExpressionOrigin> |
|
289 |
<Value type="double" value="0.1"/> |
|
290 |
</ExpressionOrigin> |
|
291 |
</CodeExpression> |
|
292 |
</Parameters> |
|
293 |
</CodeStatement> |
|
294 |
<CodeStatement> |
|
295 |
<CodeExpression id="10_gridBagConstraints"/> |
|
296 |
<StatementProvider type="CodeField"> |
|
297 |
<CodeField name="weighty" class="java.awt.GridBagConstraints"/> |
|
298 |
</StatementProvider> |
|
299 |
<Parameters> |
|
300 |
<CodeExpression id="15"> |
|
301 |
<ExpressionOrigin> |
|
302 |
<Value type="double" value="0.2"/> |
|
303 |
</ExpressionOrigin> |
|
304 |
</CodeExpression> |
|
305 |
</Parameters> |
|
306 |
</CodeStatement> |
|
307 |
<CodeStatement> |
|
308 |
<CodeExpression id="4"/> |
|
309 |
<StatementProvider type="CodeMethod"> |
|
310 |
<CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/> |
|
311 |
</StatementProvider> |
|
312 |
<Parameters> |
|
313 |
<CodeExpression id="16_jScrollPane1"> |
|
314 |
<CodeVariable name="jScrollPane1" type="8196" declaredType="javax.swing.JScrollPane"/> |
|
315 |
<ExpressionOrigin> |
|
316 |
<ExpressionProvider type="ComponentRef"> |
|
317 |
<ComponentRef name="jScrollPane1"/> |
|
318 |
</ExpressionProvider> |
|
319 |
</ExpressionOrigin> |
|
320 |
</CodeExpression> |
|
321 |
<CodeExpression id="10_gridBagConstraints"/> |
|
322 |
</Parameters> |
|
323 |
</CodeStatement> |
|
324 |
<CodeStatement> |
|
325 |
<CodeExpression id="17_gridBagConstraints"> |
|
326 |
<CodeVariable name="gridBagConstraints"/> |
|
327 |
<ExpressionOrigin> |
|
328 |
<ExpressionProvider type="CodeConstructor"> |
|
329 |
<CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/> |
|
330 |
</ExpressionProvider> |
|
331 |
</ExpressionOrigin> |
|
332 |
</CodeExpression> |
|
333 |
<StatementProvider type="CodeExpression"> |
|
334 |
<CodeExpression id="17_gridBagConstraints"/> |
|
335 |
</StatementProvider> |
|
336 |
</CodeStatement> |
|
337 |
<CodeStatement> |
|
338 |
<CodeExpression id="17_gridBagConstraints"/> |
|
339 |
<StatementProvider type="CodeField"> |
|
340 |
<CodeField name="gridx" class="java.awt.GridBagConstraints"/> |
|
341 |
</StatementProvider> |
|
342 |
<Parameters> |
|
343 |
<CodeExpression id="18"> |
|
344 |
<ExpressionOrigin> |
|
345 |
<Value type="int" value="0"/> |
|
346 |
</ExpressionOrigin> |
|
347 |
</CodeExpression> |
|
348 |
</Parameters> |
|
349 |
</CodeStatement> |
|
350 |
<CodeStatement> |
|
351 |
<CodeExpression id="17_gridBagConstraints"/> |
|
352 |
<StatementProvider type="CodeField"> |
|
353 |
<CodeField name="gridy" class="java.awt.GridBagConstraints"/> |
|
354 |
</StatementProvider> |
|
355 |
<Parameters> |
|
356 |
<CodeExpression id="19"> |
|
357 |
<ExpressionOrigin> |
|
358 |
<Value type="int" value="6"/> |
|
359 |
</ExpressionOrigin> |
|
360 |
</CodeExpression> |
|
361 |
</Parameters> |
|
362 |
</CodeStatement> |
|
363 |
<CodeStatement> |
|
364 |
<CodeExpression id="4"/> |
|
365 |
<StatementProvider type="CodeMethod"> |
|
366 |
<CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/> |
|
367 |
</StatementProvider> |
|
368 |
<Parameters> |
|
369 |
<CodeExpression id="20_filler1"> |
|
370 |
<CodeVariable name="filler1" type="8196" declaredType="javax.swing.Box$Filler"/> |
|
371 |
<ExpressionOrigin> |
|
372 |
<ExpressionProvider type="ComponentRef"> |
|
373 |
<ComponentRef name="filler1"/> |
|
374 |
</ExpressionProvider> |
|
375 |
</ExpressionOrigin> |
|
376 |
</CodeExpression> |
|
377 |
<CodeExpression id="17_gridBagConstraints"/> |
|
378 |
</Parameters> |
|
379 |
</CodeStatement> |
|
380 |
<CodeStatement> |
|
381 |
<CodeExpression id="21_gridBagConstraints"> |
|
382 |
<CodeVariable name="gridBagConstraints"/> |
|
383 |
<ExpressionOrigin> |
|
384 |
<ExpressionProvider type="CodeConstructor"> |
|
385 |
<CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/> |
|
386 |
</ExpressionProvider> |
|
387 |
</ExpressionOrigin> |
|
388 |
</CodeExpression> |
|
389 |
<StatementProvider type="CodeExpression"> |
|
390 |
<CodeExpression id="21_gridBagConstraints"/> |
|
391 |
</StatementProvider> |
|
392 |
</CodeStatement> |
|
393 |
<CodeStatement> |
|
394 |
<CodeExpression id="21_gridBagConstraints"/> |
|
395 |
<StatementProvider type="CodeField"> |
|
396 |
<CodeField name="gridx" class="java.awt.GridBagConstraints"/> |
|
397 |
</StatementProvider> |
|
398 |
<Parameters> |
|
399 |
<CodeExpression id="22"> |
|
400 |
<ExpressionOrigin> |
|
401 |
<Value type="int" value="4"/> |
|
402 |
</ExpressionOrigin> |
|
403 |
</CodeExpression> |
|
404 |
</Parameters> |
|
405 |
</CodeStatement> |
|
406 |
<CodeStatement> |
|
407 |
<CodeExpression id="21_gridBagConstraints"/> |
|
408 |
<StatementProvider type="CodeField"> |
|
409 |
<CodeField name="gridy" class="java.awt.GridBagConstraints"/> |
|
410 |
</StatementProvider> |
|
411 |
<Parameters> |
|
412 |
<CodeExpression id="23"> |
|
413 |
<ExpressionOrigin> |
|
414 |
<Value type="int" value="6"/> |
|
415 |
</ExpressionOrigin> |
|
416 |
</CodeExpression> |
|
417 |
</Parameters> |
|
418 |
</CodeStatement> |
|
419 |
<CodeStatement> |
|
420 |
<CodeExpression id="4"/> |
|
421 |
<StatementProvider type="CodeMethod"> |
|
422 |
<CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/> |
|
423 |
</StatementProvider> |
|
424 |
<Parameters> |
|
425 |
<CodeExpression id="24_filler2"> |
|
426 |
<CodeVariable name="filler2" type="8196" declaredType="javax.swing.Box$Filler"/> |
|
427 |
<ExpressionOrigin> |
|
428 |
<ExpressionProvider type="ComponentRef"> |
|
429 |
<ComponentRef name="filler2"/> |
|
430 |
</ExpressionProvider> |
|
431 |
</ExpressionOrigin> |
|
432 |
</CodeExpression> |
|
433 |
<CodeExpression id="21_gridBagConstraints"/> |
|
434 |
</Parameters> |
|
435 |
</CodeStatement> |
|
436 |
<CodeStatement> |
|
437 |
<CodeExpression id="25_gridBagConstraints"> |
|
438 |
<CodeVariable name="gridBagConstraints"/> |
|
439 |
<ExpressionOrigin> |
|
440 |
<ExpressionProvider type="CodeConstructor"> |
|
441 |
<CodeConstructor class="java.awt.GridBagConstraints" parameterTypes=""/> |
|
442 |
</ExpressionProvider> |
|
443 |
</ExpressionOrigin> |
|
444 |
</CodeExpression> |
|
445 |
<StatementProvider type="CodeExpression"> |
|
446 |
<CodeExpression id="25_gridBagConstraints"/> |
|
447 |
</StatementProvider> |
|
448 |
</CodeStatement> |
|
449 |
<CodeStatement> |
|
450 |
<CodeExpression id="25_gridBagConstraints"/> |
|
451 |
<StatementProvider type="CodeField"> |
|
452 |
<CodeField name="gridx" class="java.awt.GridBagConstraints"/> |
|
453 |
</StatementProvider> |
|
454 |
<Parameters> |
|
455 |
<CodeExpression id="26"> |
|
456 |
<ExpressionOrigin> |
|
457 |
<Value type="int" value="2"/> |
|
458 |
</ExpressionOrigin> |
|
459 |
</CodeExpression> |
|
460 |
</Parameters> |
|
461 |
</CodeStatement> |
|
462 |
<CodeStatement> |
|
463 |
<CodeExpression id="25_gridBagConstraints"/> |
|
464 |
<StatementProvider type="CodeField"> |
|
465 |
<CodeField name="gridy" class="java.awt.GridBagConstraints"/> |
|
466 |
</StatementProvider> |
|
467 |
<Parameters> |
|
468 |
<CodeExpression id="27"> |
|
469 |
<ExpressionOrigin> |
|
470 |
<Value type="int" value="6"/> |
|
471 |
</ExpressionOrigin> |
|
472 |
</CodeExpression> |
|
473 |
</Parameters> |
|
474 |
</CodeStatement> |
|
475 |
<CodeStatement> |
|
476 |
<CodeExpression id="25_gridBagConstraints"/> |
|
477 |
<StatementProvider type="CodeField"> |
|
478 |
<CodeField name="fill" class="java.awt.GridBagConstraints"/> |
|
479 |
</StatementProvider> |
|
480 |
<Parameters> |
|
481 |
<CodeExpression id="28"> |
|
482 |
<ExpressionOrigin> |
|
483 |
<Value type="int" value="2"/> |
|
484 |
</ExpressionOrigin> |
|
485 |
</CodeExpression> |
|
486 |
</Parameters> |
|
487 |
</CodeStatement> |
|
488 |
<CodeStatement> |
|
489 |
<CodeExpression id="4"/> |
|
490 |
<StatementProvider type="CodeMethod"> |
|
491 |
<CodeMethod name="add" class="java.awt.Container" parameterTypes="java.awt.Component, java.lang.Object"/> |
|
492 |
</StatementProvider> |
|
493 |
<Parameters> |
|
494 |
<CodeExpression id="29_chkUseMomoryChacheForCRSs"> |
|
495 |
<CodeVariable name="chkUseMomoryChacheForCRSs" type="8196" declaredType="javax.swing.JCheckBox"/> |
|
496 |
<ExpressionOrigin> |
|
497 |
<ExpressionProvider type="ComponentRef"> |
|
498 |
<ComponentRef name="chkUseMomoryChacheForCRSs"/> |
|
499 |
</ExpressionProvider> |
|
500 |
</ExpressionOrigin> |
|
501 |
</CodeExpression> |
|
502 |
<CodeExpression id="25_gridBagConstraints"/> |
|
503 |
</Parameters> |
|
504 |
</CodeStatement> |
|
505 |
</LayoutCode> |
|
506 |
</Form> |
org.gvsig.projection.jcrs/trunk/org.gvsig.projection.jcrs/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.common/src/main/resources-plugin/plugin-persistence.def | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<!-- |
|
3 |
Definitions of plugin persistence org.gvsig.geodb. |
|
4 |
--> |
|
5 |
<definitions> |
|
6 |
<version>1.0.0</version> |
|
7 |
<classes> |
|
8 |
<class name="org.gvsig.projection.app.jcrs"> |
|
9 |
<description>plugin persistence org.gvsig.projection.app.jcrs</description> |
|
10 |
<fields> |
|
11 |
<field name="recentCRSs" type="List" classOfItems="org.gvsig.crs.persistence.RecentCRSsPersistence" mandatory="false"> |
|
12 |
<description>List of recents CRSs</description> |
|
13 |
</field> |
|
14 |
<field name="recentTransformations" type="List" classOfItems="org.gvsig.crs.persistence.RecentTrsPersistence" mandatory="false"> |
|
15 |
<description>List of recents recentTransformations</description> |
|
16 |
</field> |
|
17 |
<field name="epsgDatabase" type="String" defaultValue="EPSG/EPSG_v6/EPSG.sql" mandatory="false"> |
|
18 |
<description></description> |
|
19 |
</field> |
|
20 |
<field name="useMemoryCacheForCRSs" type="Boolean" defaultValue="true" mandatory="false"> |
|
21 |
<description></description> |
|
22 |
</field> |
|
23 |
</fields> |
|
24 |
</class> |
|
25 |
</classes> |
|
26 |
</definitions> |
Also available in: Unified diff