Revision 518

View differences:

org.gvsig.raster.tilecache/trunk/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.app/.settings/org.eclipse.jdt.core.prefs
1
#Fri Apr 15 11:32:45 CEST 2011
2
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
3
eclipse.preferences.version=1
4
org.eclipse.jdt.core.compiler.source=1.5
5
org.eclipse.jdt.core.compiler.compliance=1.5
0 6

  
org.gvsig.raster.tilecache/trunk/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.app/distribution/distribution.xml
1
<assembly>
2
	<id>distribution</id>
3
	<formats>
4
		<format>dir</format>
5
	</formats>
6
	<fileSets>
7
		<!-- Estructure for the extension -->
8
		<fileSet>
9
			<directory>src/main/resources</directory>
10
			<outputDirectory>${extension.install.dir.name}
11
			</outputDirectory>
12
		</fileSet>
13
	</fileSets>
14
	<dependencySets>
15
		<dependencySet>
16
			<outputDirectory>${extension.install.dir.name}/${library-dir}
17
			</outputDirectory>
18
			<includes>
19
				<include>org.gvsig:org.gvsig.raster.cache.app:jar</include>
20
				<include>org.gvsig:org.gvsig.raster.cache.io:jar</include>
21
				<include>org.gvsig:org.gvsig.raster.cache.lib.api:jar</include>
22
				<include>org.gvsig:org.gvsig.raster.cache.lib.impl:jar</include>
23
				<include>org.gvsig:org.gvsig.raster.lib.api:jar</include>
24
				<include>org.gvsig:org.gvsig.raster.lib.impl:jar</include>
25
				<include>org.gvsig:org.gvsig.jgdal:jar</include>
26
				<include>org.gvsig:org.gvsig.raster.fmap:jar</include>
27
				<include>org.gvsig:org.gvsig.jpotrace:jar</include>
28
			</includes>
29
		</dependencySet>
30
		
31
		
32
	</dependencySets>
33
</assembly>
0 34

  
org.gvsig.raster.tilecache/trunk/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.app/.classpath
1
<classpath>
2
  <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
3
  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
4
  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
5
  <classpathentry kind="output" path="target/classes"/>
6
  <classpathentry kind="var" path="M2_REPO/javax/media/jai_codec/1.1.3/jai_codec-1.1.3.jar"/>
7
  <classpathentry kind="var" path="M2_REPO/javax/media/jai_core/1.1.3/jai_core-1.1.3.jar">
8
    <attributes>
9
      <attribute value="jar:file:/home/nacho/.m2/repository/javax/media/jai_core/1.1.3/jai_core-1.1.3-javadoc.jar!/" name="javadoc_location"/>
10
    </attributes>
11
  </classpathentry>
12
  <classpathentry kind="var" path="M2_REPO/javax/help/javahelp/2.0.05/javahelp-2.0.05.jar" sourcepath="M2_REPO/javax/help/javahelp/2.0.05/javahelp-2.0.05-sources.jar">
13
    <attributes>
14
      <attribute value="jar:file:/home/nacho/.m2/repository/javax/help/javahelp/2.0.05/javahelp-2.0.05-javadoc.jar!/" name="javadoc_location"/>
15
    </attributes>
16
  </classpathentry>
17
  <classpathentry kind="var" path="M2_REPO/javax/units/jsr108/0.01/jsr108-0.01.jar"/>
18
  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.8.1/ant-1.8.1.jar"/>
19
  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.8.1/ant-launcher-1.8.1.jar"/>
20
  <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-anim/1.7/batik-anim-1.7.jar"/>
21
  <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-awt-util/1.7/batik-awt-util-1.7.jar"/>
22
  <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-bridge/1.7/batik-bridge-1.7.jar"/>
23
  <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-css/1.7/batik-css-1.7.jar"/>
24
  <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-dom/1.7/batik-dom-1.7.jar"/>
25
  <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-ext/1.7/batik-ext-1.7.jar"/>
26
  <classpathentry kind="var" path="M2_REPO/org/gvsig/batik-ext-gvsig-custom/1.7.0/batik-ext-gvsig-custom-1.7.0.jar"/>
27
  <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-gui-util/1.7/batik-gui-util-1.7.jar"/>
28
  <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-gvt/1.7/batik-gvt-1.7.jar"/>
29
  <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-js/1.7/batik-js-1.7.jar"/>
30
  <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-parser/1.7/batik-parser-1.7.jar"/>
31
  <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-script/1.7/batik-script-1.7.jar"/>
32
  <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-svg-dom/1.7/batik-svg-dom-1.7.jar"/>
33
  <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-util/1.7/batik-util-1.7.jar"/>
34
  <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-xml/1.7/batik-xml-1.7.jar"/>
35
  <classpathentry kind="var" path="M2_REPO/bouncycastle/bcmail-jdk14/138/bcmail-jdk14-138.jar"/>
36
  <classpathentry kind="var" path="M2_REPO/bouncycastle/bcprov-jdk14/138/bcprov-jdk14-138.jar"/>
37
  <classpathentry kind="var" path="M2_REPO/castor/castor/0.9.5.3/castor-0.9.5.3.jar"/>
38
  <classpathentry kind="var" path="M2_REPO/easymock/easymock/1.2_Java1.3/easymock-1.2_Java1.3.jar" sourcepath="M2_REPO/easymock/easymock/1.2_Java1.3/easymock-1.2_Java1.3-sources.jar"/>
39
  <classpathentry kind="var" path="M2_REPO/net/sf/flib-jcalendar/unknown/flib-jcalendar-unknown.jar"/>
40
  <classpathentry kind="var" path="M2_REPO/org/opengis/geoapi/2.0/geoapi-2.0.jar"/>
41
  <classpathentry kind="var" path="M2_REPO/geojava/geojava/unknown/geojava-unknown.jar"/>
42
  <classpathentry kind="var" path="M2_REPO/org/geotools/gt2-legacy/unknown/gt2-legacy-unknown.jar"/>
43
  <classpathentry kind="var" path="M2_REPO/org/geotools/gt2-main/unknown/gt2-main-unknown.jar"/>
44
  <classpathentry kind="var" path="M2_REPO/com/lowagie/itext/2.1.4/itext-2.1.4.jar" sourcepath="M2_REPO/com/lowagie/itext/2.1.4/itext-2.1.4-sources.jar">
45
    <attributes>
46
      <attribute value="jar:file:/home/nacho/.m2/repository/com/lowagie/itext/2.1.4/itext-2.1.4-javadoc.jar!/" name="javadoc_location"/>
47
    </attributes>
48
  </classpathentry>
49
  <classpathentry kind="var" path="M2_REPO/jfree/jcommon/1.0.12/jcommon-1.0.12.jar" sourcepath="M2_REPO/jfree/jcommon/1.0.12/jcommon-1.0.12-sources.jar">
50
    <attributes>
51
      <attribute value="jar:file:/home/nacho/.m2/repository/jfree/jcommon/1.0.12/jcommon-1.0.12-javadoc.jar!/" name="javadoc_location"/>
52
    </attributes>
53
  </classpathentry>
54
  <classpathentry kind="var" path="M2_REPO/jfree/jfreechart/1.0.7/jfreechart-1.0.7.jar" sourcepath="M2_REPO/jfree/jfreechart/1.0.7/jfreechart-1.0.7-sources.jar">
55
    <attributes>
56
      <attribute value="jar:file:/home/nacho/.m2/repository/jfree/jfreechart/1.0.7/jfreechart-1.0.7-javadoc.jar!/" name="javadoc_location"/>
57
    </attributes>
58
  </classpathentry>
59
  <classpathentry kind="var" path="M2_REPO/com/sun/jimi/1.1/jimi-1.1.jar"/>
60
  <classpathentry kind="var" path="M2_REPO/org/jpedal/jpedal_lgpl/4.37b36/jpedal_lgpl-4.37b36.jar"/>
61
  <classpathentry kind="var" path="M2_REPO/net/sf/jsi/unknown/jsi-unknown.jar"/>
62
  <classpathentry kind="var" path="M2_REPO/com/vividsolutions/jts/1.9/jts-1.9.jar" sourcepath="M2_REPO/com/vividsolutions/jts/1.9/jts-1.9-sources.jar"/>
63
  <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>
64
  <classpathentry kind="var" path="M2_REPO/jwizardcomponent/jwizardcomponent/1.2.2/jwizardcomponent-1.2.2.jar"/>
65
  <classpathentry kind="var" path="M2_REPO/net/sf/kxml/kxml2/2.2.2/kxml2-2.2.2.jar"/>
66
  <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
67
  <classpathentry kind="var" path="M2_REPO/com/jgoodies/looks/2.1.4/looks-2.1.4.jar" sourcepath="M2_REPO/com/jgoodies/looks/2.1.4/looks-2.1.4-sources.jar">
68
    <attributes>
69
      <attribute value="jar:file:/home/nacho/.m2/repository/com/jgoodies/looks/2.1.4/looks-2.1.4-javadoc.jar!/" name="javadoc_location"/>
70
    </attributes>
71
  </classpathentry>
72
  <classpathentry kind="var" path="M2_REPO/essi-unidata/netcdf-java/4.2/netcdf-java-4.2.jar"/>
73
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.about.api/1.0.0-SNAPSHOT/org.gvsig.about.api-1.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.about.api/1.0.0-SNAPSHOT/org.gvsig.about.api-1.0.0-SNAPSHOT-sources.jar"/>
74
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.about.impl/1.0.0-SNAPSHOT/org.gvsig.about.impl-1.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.about.impl/1.0.0-SNAPSHOT/org.gvsig.about.impl-1.0.0-SNAPSHOT-sources.jar"/>
75
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.andami/2.0-SNAPSHOT/org.gvsig.andami-2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.andami/2.0-SNAPSHOT/org.gvsig.andami-2.0-SNAPSHOT-sources.jar"/>
76
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.app/2.0-SNAPSHOT/org.gvsig.app-2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.app/2.0-SNAPSHOT/org.gvsig.app-2.0-SNAPSHOT-sources.jar"/>
77
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.compat/2.0-SNAPSHOT/org.gvsig.compat-2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.compat/2.0-SNAPSHOT/org.gvsig.compat-2.0-SNAPSHOT-sources.jar"/>
78
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.compat/2.0-SNAPSHOT/org.gvsig.compat-2.0-SNAPSHOT-se.jar"/>
79
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.coreplugin/2.0-SNAPSHOT/org.gvsig.coreplugin-2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.coreplugin/2.0-SNAPSHOT/org.gvsig.coreplugin-2.0-SNAPSHOT-sources.jar"/>
80
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.dxf/2.0-SNAPSHOT/org.gvsig.dxf-2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.dxf/2.0-SNAPSHOT/org.gvsig.dxf-2.0-SNAPSHOT-sources.jar"/>
81
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.control/2.0-SNAPSHOT/org.gvsig.fmap.control-2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.fmap.control/2.0-SNAPSHOT/org.gvsig.fmap.control-2.0-SNAPSHOT-sources.jar"/>
82
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.dal/2.0-SNAPSHOT/org.gvsig.fmap.dal-2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.fmap.dal/2.0-SNAPSHOT/org.gvsig.fmap.dal-2.0-SNAPSHOT-sources.jar"/>
83
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.dal/2.0-SNAPSHOT/org.gvsig.fmap.dal-2.0-SNAPSHOT-impl.jar"/>
84
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.dal/2.0-SNAPSHOT/org.gvsig.fmap.dal-2.0-SNAPSHOT-spi.jar"/>
85
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.dal.file/2.0-SNAPSHOT/org.gvsig.fmap.dal.file-2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.fmap.dal.file/2.0-SNAPSHOT/org.gvsig.fmap.dal.file-2.0-SNAPSHOT-sources.jar"/>
86
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.dal.file/2.0-SNAPSHOT/org.gvsig.fmap.dal.file-2.0-SNAPSHOT-store.dbf.jar"/>
87
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.dal.file/2.0-SNAPSHOT/org.gvsig.fmap.dal.file-2.0-SNAPSHOT-store.dgn.jar"/>
88
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.dal.file/2.0-SNAPSHOT/org.gvsig.fmap.dal.file-2.0-SNAPSHOT-store.dgn.legend.jar"/>
89
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.dal.file/2.0-SNAPSHOT/org.gvsig.fmap.dal.file-2.0-SNAPSHOT-store.dxf.jar"/>
90
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.dal.file/2.0-SNAPSHOT/org.gvsig.fmap.dal.file-2.0-SNAPSHOT-store.dxf.legend.jar"/>
91
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.dal.file/2.0-SNAPSHOT/org.gvsig.fmap.dal.file-2.0-SNAPSHOT-store.shp.jar"/>
92
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.dal.index.spatial/2.0-SNAPSHOT/org.gvsig.fmap.dal.index.spatial-2.0-SNAPSHOT-gt2.jar"/>
93
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.dal.index.spatial/2.0-SNAPSHOT/org.gvsig.fmap.dal.index.spatial-2.0-SNAPSHOT-jsi.jar"/>
94
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.dal.index.spatial/2.0-SNAPSHOT/org.gvsig.fmap.dal.index.spatial-2.0-SNAPSHOT-jts.jar"/>
95
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.geometry/2.0-SNAPSHOT/org.gvsig.fmap.geometry-2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.fmap.geometry/2.0-SNAPSHOT/org.gvsig.fmap.geometry-2.0-SNAPSHOT-sources.jar"/>
96
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.geometry/2.0-SNAPSHOT/org.gvsig.fmap.geometry-2.0-SNAPSHOT-impl.jar"/>
97
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.geometry/2.0-SNAPSHOT/org.gvsig.fmap.geometry-2.0-SNAPSHOT-operation.jar"/>
98
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.mapcontext/2.0-SNAPSHOT/org.gvsig.fmap.mapcontext-2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.fmap.mapcontext/2.0-SNAPSHOT/org.gvsig.fmap.mapcontext-2.0-SNAPSHOT-sources.jar"/>
99
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.mapcontext/2.0-SNAPSHOT/org.gvsig.fmap.mapcontext-2.0-SNAPSHOT-impl.jar"/>
100
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.fmap.mapcontext/2.0-SNAPSHOT/org.gvsig.fmap.mapcontext-2.0-SNAPSHOT-operation.jar"/>
101
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.i18n/2.0.1-SNAPSHOT/org.gvsig.i18n-2.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.i18n/2.0.1-SNAPSHOT/org.gvsig.i18n-2.0.1-SNAPSHOT-sources.jar"/>
102
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.installer.lib.api/1.0.1-SNAPSHOT/org.gvsig.installer.lib.api-1.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.installer.lib.api/1.0.1-SNAPSHOT/org.gvsig.installer.lib.api-1.0.1-SNAPSHOT-sources.jar"/>
103
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.installer.lib.impl/1.0.1-SNAPSHOT/org.gvsig.installer.lib.impl-1.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.installer.lib.impl/1.0.1-SNAPSHOT/org.gvsig.installer.lib.impl-1.0.1-SNAPSHOT-sources.jar"/>
104
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.installer.lib.spi/1.0.1-SNAPSHOT/org.gvsig.installer.lib.spi-1.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.installer.lib.spi/1.0.1-SNAPSHOT/org.gvsig.installer.lib.spi-1.0.1-SNAPSHOT-sources.jar"/>
105
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.installer.prov.plugin/1.0.1-SNAPSHOT/org.gvsig.installer.prov.plugin-1.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.installer.prov.plugin/1.0.1-SNAPSHOT/org.gvsig.installer.prov.plugin-1.0.1-SNAPSHOT-sources.jar"/>
106
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.installer.swing.api/1.0.1-SNAPSHOT/org.gvsig.installer.swing.api-1.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.installer.swing.api/1.0.1-SNAPSHOT/org.gvsig.installer.swing.api-1.0.1-SNAPSHOT-sources.jar"/>
107
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.installer.swing.impl/1.0.1-SNAPSHOT/org.gvsig.installer.swing.impl-1.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.installer.swing.impl/1.0.1-SNAPSHOT/org.gvsig.installer.swing.impl-1.0.1-SNAPSHOT-sources.jar"/>
108
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.jdk.v1_6/1.0.0-SNAPSHOT/org.gvsig.jdk.v1_6-1.0.0-SNAPSHOT.jar"/>
109
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.jecw/2.0.0-SNAPSHOT/org.gvsig.jecw-2.0.0-SNAPSHOT.jar"/>
110
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.jgdal/2.0.1-SNAPSHOT/org.gvsig.jgdal-2.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.jgdal/2.0.1-SNAPSHOT/org.gvsig.jgdal-2.0.1-SNAPSHOT-sources.jar"/>
111
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.jmrsid/2.0.0-SNAPSHOT/org.gvsig.jmrsid-2.0.0-SNAPSHOT.jar"/>
112
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.jpotrace/2.0.0-SNAPSHOT/org.gvsig.jpotrace-2.0.0-SNAPSHOT.jar"/>
113
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.maven.base.tools/1.0.7-SNAPSHOT/org.gvsig.maven.base.tools-1.0.7-SNAPSHOT.jar"/>
114
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.metadata.lib.basic.api/1.0.0-SNAPSHOT/org.gvsig.metadata.lib.basic.api-1.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.metadata.lib.basic.api/1.0.0-SNAPSHOT/org.gvsig.metadata.lib.basic.api-1.0.0-SNAPSHOT-sources.jar"/>
115
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.metadata.lib.basic.impl/1.0.0-SNAPSHOT/org.gvsig.metadata.lib.basic.impl-1.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.metadata.lib.basic.impl/1.0.0-SNAPSHOT/org.gvsig.metadata.lib.basic.impl-1.0.0-SNAPSHOT-sources.jar"/>
116
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.metadata.swing.basic.api/1.0.0-SNAPSHOT/org.gvsig.metadata.swing.basic.api-1.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.metadata.swing.basic.api/1.0.0-SNAPSHOT/org.gvsig.metadata.swing.basic.api-1.0.0-SNAPSHOT-sources.jar"/>
117
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.metadata.swing.basic.impl/1.0.0-SNAPSHOT/org.gvsig.metadata.swing.basic.impl-1.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.metadata.swing.basic.impl/1.0.0-SNAPSHOT/org.gvsig.metadata.swing.basic.impl-1.0.0-SNAPSHOT-sources.jar"/>
118
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.projection/2.0-SNAPSHOT/org.gvsig.projection-2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.projection/2.0-SNAPSHOT/org.gvsig.projection-2.0-SNAPSHOT-sources.jar"/>
119
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.projection/2.0-SNAPSHOT/org.gvsig.projection-2.0-SNAPSHOT-cresques-impl.jar"/>
120
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.projection/2.0-SNAPSHOT/org.gvsig.projection-2.0-SNAPSHOT-cresques-ui.jar"/>
121
  <classpathentry kind="src" path="/org.gvsig.raster.cache.io"/>
122
  <classpathentry kind="src" path="/org.gvsig.raster.cache.lib.api"/>
123
  <classpathentry kind="src" path="/org.gvsig.raster.cache.lib.impl"/>
124
  <classpathentry kind="src" path="/org.gvsig.raster.fmap"/>
125
  <classpathentry kind="src" path="/org.gvsig.raster.io.base"/>
126
  <classpathentry kind="src" path="/org.gvsig.raster.lib.api"/>
127
  <classpathentry kind="src" path="/org.gvsig.raster.lib.impl"/>
128
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.raster.wmts.io/2.0.1-SNAPSHOT/org.gvsig.raster.wmts.io-2.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.raster.wmts.io/2.0.1-SNAPSHOT/org.gvsig.raster.wmts.io-2.0.1-SNAPSHOT-sources.jar"/>
129
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.remoteclient/2.0-SNAPSHOT/org.gvsig.remoteclient-2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.remoteclient/2.0-SNAPSHOT/org.gvsig.remoteclient-2.0-SNAPSHOT-sources.jar"/>
130
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.symbology.lib.api/2.0.0-SNAPSHOT/org.gvsig.symbology.lib.api-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.symbology.lib.api/2.0.0-SNAPSHOT/org.gvsig.symbology.lib.api-2.0.0-SNAPSHOT-sources.jar"/>
131
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.symbology.lib.impl/2.0.0-SNAPSHOT/org.gvsig.symbology.lib.impl-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.symbology.lib.impl/2.0.0-SNAPSHOT/org.gvsig.symbology.lib.impl-2.0.0-SNAPSHOT-sources.jar"/>
132
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.symbology.swing.api/2.0.0-SNAPSHOT/org.gvsig.symbology.swing.api-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.symbology.swing.api/2.0.0-SNAPSHOT/org.gvsig.symbology.swing.api-2.0.0-SNAPSHOT-sources.jar"/>
133
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.symbology.swing.impl/2.0.0-SNAPSHOT/org.gvsig.symbology.swing.impl-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.symbology.swing.impl/2.0.0-SNAPSHOT/org.gvsig.symbology.swing.impl-2.0.0-SNAPSHOT-sources.jar"/>
134
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.tools.evaluator.sqljep/2.0-SNAPSHOT/org.gvsig.tools.evaluator.sqljep-2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.tools.evaluator.sqljep/2.0-SNAPSHOT/org.gvsig.tools.evaluator.sqljep-2.0-SNAPSHOT-sources.jar"/>
135
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.tools.lib/3.0.0-SNAPSHOT/org.gvsig.tools.lib-3.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.tools.lib/3.0.0-SNAPSHOT/org.gvsig.tools.lib-3.0.0-SNAPSHOT-sources.jar"/>
136
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.tools.swing.api/3.0.0-SNAPSHOT/org.gvsig.tools.swing.api-3.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.tools.swing.api/3.0.0-SNAPSHOT/org.gvsig.tools.swing.api-3.0.0-SNAPSHOT-sources.jar"/>
137
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.tools.swing.impl/3.0.0-SNAPSHOT/org.gvsig.tools.swing.impl-3.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.tools.swing.impl/3.0.0-SNAPSHOT/org.gvsig.tools.swing.impl-3.0.0-SNAPSHOT-sources.jar"/>
138
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.tools.swing.serv.field/3.0.0-SNAPSHOT/org.gvsig.tools.swing.serv.field-3.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.tools.swing.serv.field/3.0.0-SNAPSHOT/org.gvsig.tools.swing.serv.field-3.0.0-SNAPSHOT-sources.jar"/>
139
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.tools.swing.serv.jform/3.0.0-SNAPSHOT/org.gvsig.tools.swing.serv.jform-3.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.tools.swing.serv.jform/3.0.0-SNAPSHOT/org.gvsig.tools.swing.serv.jform-3.0.0-SNAPSHOT-sources.jar"/>
140
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.tools.swing.serv.jlist/3.0.0-SNAPSHOT/org.gvsig.tools.swing.serv.jlist-3.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.tools.swing.serv.jlist/3.0.0-SNAPSHOT/org.gvsig.tools.swing.serv.jlist-3.0.0-SNAPSHOT-sources.jar"/>
141
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.tools.swing.spi/3.0.0-SNAPSHOT/org.gvsig.tools.swing.spi-3.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.tools.swing.spi/3.0.0-SNAPSHOT/org.gvsig.tools.swing.spi-3.0.0-SNAPSHOT-sources.jar"/>
142
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.ui/2.0.1-SNAPSHOT/org.gvsig.ui-2.0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.ui/2.0.1-SNAPSHOT/org.gvsig.ui-2.0.1-SNAPSHOT-sources.jar"/>
143
  <classpathentry kind="var" path="M2_REPO/org/gvsig/org.gvsig.utils/2.0-SNAPSHOT/org.gvsig.utils-2.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/gvsig/org.gvsig.utils/2.0-SNAPSHOT/org.gvsig.utils-2.0-SNAPSHOT-sources.jar"/>
144
  <classpathentry kind="var" path="M2_REPO/sil/sil/0.43b-am1/sil-0.43b-am1.jar"/>
145
  <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.5.5/slf4j-api-1.5.5.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.5.5/slf4j-api-1.5.5-sources.jar"/>
146
  <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.5.5/slf4j-log4j12-1.5.5.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.5.5/slf4j-log4j12-1.5.5-sources.jar"/>
147
  <classpathentry kind="var" path="M2_REPO/spatialindex/spatialindex/unknown/spatialindex-unknown.jar"/>
148
  <classpathentry kind="var" path="M2_REPO/net/sf/sqljep/0.2/sqljep-0.2.jar"/>
149
  <classpathentry kind="var" path="M2_REPO/gnu/trove/trove/0.1.8/trove-0.1.8.jar"/>
150
  <classpathentry kind="var" path="M2_REPO/xalan/xalan/2.6.0/xalan-2.6.0.jar"/>
151
  <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.5.0/xercesImpl-2.5.0.jar"/>
152
  <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04-sources.jar"/>
153
  <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04.jar"/>
154
  <classpathentry kind="var" path="M2_REPO/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar"/>
155
  <classpathentry kind="var" path="M2_REPO/zql/zql/unknown/zql-unknown.jar"/>
156
  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
157
</classpath>
0 158

  
org.gvsig.raster.tilecache/trunk/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.app/buildNumber.properties
1
#maven.buildNumber.plugin properties file
2
#Mon Feb 14 17:36:56 CET 2011
3
buildNumber=0
0 4

  
org.gvsig.raster.tilecache/trunk/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.app/.project
1
<projectDescription>
2
  <name>org.gvsig.raster.cache.app</name>
3
  <comment>Base POM for all GvSIG extension projects. This pom knows
4
		how to build and made an extension for GvSIG. The property
5
		&quot;build-dir&quot; must be set up correctly.</comment>
6
  <projects>
7
    <project>org.gvsig.raster.cache.io</project>
8
    <project>org.gvsig.raster.cache.lib.api</project>
9
    <project>org.gvsig.raster.cache.lib.impl</project>
10
    <project>org.gvsig.raster.fmap</project>
11
    <project>org.gvsig.raster.io.base</project>
12
    <project>org.gvsig.raster.lib.api</project>
13
    <project>org.gvsig.raster.lib.impl</project>
14
  </projects>
15
  <buildSpec>
16
    <buildCommand>
17
      <name>org.eclipse.jdt.core.javabuilder</name>
18
    </buildCommand>
19
  </buildSpec>
20
  <natures>
21
    <nature>org.eclipse.jdt.core.javanature</nature>
22
  </natures>
23
</projectDescription>
0 24

  
org.gvsig.raster.tilecache/trunk/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/cache/app/Configuration.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22
package org.gvsig.raster.cache.app;
23

  
24
import java.util.ArrayList;
25
import java.util.HashMap;
26
import java.util.Iterator;
27

  
28
import org.gvsig.andami.PluginServices;
29
import org.gvsig.raster.fmap.layers.IConfiguration;
30
import org.gvsig.utils.XMLEntity;
31

  
32
/**
33
 * La clase <code>Configuration</code> sirve para poder leer y escribir valores en el entorno
34
 * de raster a nivel de configuraci?n. Para leer o escribir hay que usar los
35
 * metodos getValue y setValue, estos metodos lanzan eventos en el caso de
36
 * cambiar el valor que habia establecido. Forma de uso:<p>
37
 *
38
 * En la lectura es recomendable pasar un valor por defecto en el get, para que
39
 * si no existe o si existe pero no corresponde el tipo de datos devolvera el
40
 * valor por defecto<p>
41
 *
42
 * <code>Boolean valor = Configuration.getValue("valorBooleano", Boolean.valueOf(true));</code><p>
43
 *
44
 * <code>Configuration.setValue("valorBooleano", Boolean.valueOf(false));</code><p>
45
 *
46
 * Solo se pueden usar los siguientes tipos de datos:<br>
47
 *  - <b>Boolean</b>, <b>Double</b>, <b>Float</b>, <b>Integer</b>, <b>Long</b>
48
 *  y <b>String</b>.<p>
49
 *
50
 * Otra funcionalidad que tiene, es que puedes agregar un manejador de eventos
51
 * para controlar los cambios de las variables y actuar en consecuencia si cambia
52
 * la que deseas.
53
 *
54
 * @version 07/12/2007
55
 * @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es)
56
 */
57
public class Configuration implements IConfiguration {
58
	static private Configuration singleton              = new Configuration();
59
	private ArrayList<ConfigurationListener>            
60
	                             actionCommandListeners = new ArrayList<ConfigurationListener>();
61
	private XMLEntity            xml                    = null;
62
	private HashMap<String, Object>
63
	                             hashMap                = new HashMap<String, Object>();
64

  
65
	/**
66
	 * Constructor privado. Nos aseguramos de que nadie pueda crear una instancia
67
	 * desde fuera, la configuraci?n es ?nica para todos.
68
	 */
69
	private Configuration() {
70
		try {
71
			PluginServices ps = PluginServices.getPluginServices("org.gvsig.rastertools");
72
			xml = ps.getPersistentXML();
73
		} catch (NullPointerException e) {
74
			//No est? inicializado Configuration
75
			xml = new XMLEntity();
76
		}
77
	}
78

  
79
	/**
80
	 * Devuelve un valor Boolean para el key especificado
81
	 * @param key
82
	 * @param defaultValue
83
	 * @return
84
	 */
85
	static public Boolean getValue(String key, Boolean defaultValue) {
86
		singleton.saveDefaultValue(key, defaultValue);
87
		try {
88
			return Boolean.valueOf(getXMLEntity().getStringProperty(key));
89
		} catch (Exception e) {
90
		}
91
		try {
92
			getXMLEntity().putProperty(key, defaultValue.booleanValue());
93
		} catch(NullPointerException e) {
94
			//No est? inicializada la configuraci?n. Devuelve el default
95
		}
96
		return defaultValue;
97
	}
98

  
99
	/**
100
	 * Devuelve un valor Double para el key especificado
101
	 * @param key
102
	 * @param defaultValue
103
	 * @return
104
	 */
105
	static public Double getValue(String key, Double defaultValue) {
106
		singleton.saveDefaultValue(key, defaultValue);
107
		try {
108
			return Double.valueOf(getXMLEntity().getStringProperty(key));
109
		} catch (Exception e) {
110
		}
111
		getXMLEntity().putProperty(key, defaultValue.doubleValue());
112
		return defaultValue;
113
	}
114

  
115
	/**
116
	 * Devuelve un valor Float para el key especificado
117
	 * @param key
118
	 * @param defaultValue
119
	 * @return
120
	 */
121
	static public Float getValue(String key, Float defaultValue) {
122
		singleton.saveDefaultValue(key, defaultValue);
123
		try {
124
			return Float.valueOf(getXMLEntity().getStringProperty(key));
125
		} catch (Exception e) {
126
		}
127
		getXMLEntity().putProperty(key, defaultValue.floatValue());
128
		return defaultValue;
129
	}
130

  
131
	/**
132
	 * Devuelve un valor Integer para el key especificado
133
	 * @param key
134
	 * @param defaultValue
135
	 * @return
136
	 */
137
	static public Integer getValue(String key, Integer defaultValue) {
138
		singleton.saveDefaultValue(key, defaultValue);
139
		try {
140
			return Integer.valueOf(getXMLEntity().getStringProperty(key));
141
		} catch (Exception e) {
142
		}
143
		getXMLEntity().putProperty(key, defaultValue.intValue());
144
		return defaultValue;
145
	}
146

  
147
	/**
148
	 * Devuelve un valor Long para el key especificado
149
	 * @param key
150
	 * @param defaultValue
151
	 * @return
152
	 */
153
	static public Long getValue(String key, Long defaultValue) {
154
		singleton.saveDefaultValue(key, defaultValue);
155
		try {
156
			return Long.valueOf(getXMLEntity().getStringProperty(key));
157
		} catch (Exception e) {
158
		}
159
		getXMLEntity().putProperty(key, defaultValue.longValue());
160
		return defaultValue;
161
	}
162

  
163
	/**
164
	 * Devuelve un valor String para el key especificado
165
	 * @param key
166
	 * @param defaultValue
167
	 * @return
168
	 */
169
	static public String getValue(String key, String defaultValue) {
170
		singleton.saveDefaultValue(key, defaultValue);
171
		try {
172
			return getXMLEntity().getStringProperty(key);
173
		} catch (Exception e) {
174
		}
175
		getXMLEntity().putProperty(key, defaultValue);
176
		return defaultValue;
177
	}
178

  
179
	/**
180
	 * Guarda el valor por defecto en caso de que no exista
181
	 * @param key
182
	 * @param defaultValue
183
	 */
184
	private void saveDefaultValue(String key, Object defaultValue) {
185
		if (hashMap.get(key) == null)
186
			hashMap.put(key, defaultValue);
187
	}
188

  
189
	/**
190
	 * Devuelve el valor por defecto de un key
191
	 * @param key
192
	 * @return
193
	 */
194
	static public Object getDefaultValue(String key) {
195
		return singleton.hashMap.get(key);
196
	}
197

  
198
	/**
199
	 * Guarda en la configuracion el Objeto pasado por parametro asociado a dicho
200
	 * key
201
	 * @param key
202
	 * @param value
203
	 */
204
	private void putProperty(String key, Object value) {
205
		if (Integer.class.isInstance(value)) {
206
			getXMLEntity().putProperty(key, ((Integer) value).intValue());
207
			return;
208
		}
209
		if (Double.class.isInstance(value)) {
210
			getXMLEntity().putProperty(key, ((Double) value).doubleValue());
211
			return;
212
		}
213
		if (Float.class.isInstance(value)) {
214
			getXMLEntity().putProperty(key, ((Float) value).floatValue());
215
			return;
216
		}
217
		if (Boolean.class.isInstance(value)) {
218
			getXMLEntity().putProperty(key, ((Boolean) value).booleanValue());
219
			return;
220
		}
221
		if (Long.class.isInstance(value)) {
222
			getXMLEntity().putProperty(key, ((Long) value).longValue());
223
			return;
224
		}
225
		if (String.class.isInstance(value)) {
226
			getXMLEntity().putProperty(key, (String) value);
227
			return;
228
		}
229
		getXMLEntity().putProperty(key, value);
230
	}
231

  
232
	/**
233
	 * Establece un valor en la configuracion
234
	 * @param name
235
	 * @param value
236
	 */
237
	static public void setValue(String key, Object value) {
238
		if (value == null) {
239
			getXMLEntity().remove(key);
240
			singleton.callConfigurationChanged(key, value);
241
			return;
242
		}
243

  
244
		String oldValue = getValue(key, value.toString());
245

  
246
		singleton.putProperty(key, value);
247

  
248
		if (!oldValue.equals(value.toString()))
249
			singleton.callConfigurationChanged(key, value);
250
	}
251

  
252
	/**
253
	 * A?adir un listener a la lista de eventos
254
	 * @param listener
255
	 */
256
	static public void addValueChangedListener(ConfigurationListener listener) {
257
		if (!singleton.actionCommandListeners.contains(listener))
258
			singleton.actionCommandListeners.add(listener);
259
	}
260

  
261
	/**
262
	 * Borrar un listener de la lista de eventos
263
	 * @param listener
264
	 */
265
	static public void removeValueChangedListener(ConfigurationListener listener) {
266
		singleton.actionCommandListeners.remove(listener);
267
	}
268

  
269
	/**
270
	 * Invocar a los eventos asociados al componente
271
	 */
272
	private void callConfigurationChanged(String key, Object value) {
273
		Iterator<ConfigurationListener> iterator = actionCommandListeners.iterator();
274
		while (iterator.hasNext()) {
275
			ConfigurationListener listener = iterator.next();
276
			listener.actionConfigurationChanged(new ConfigurationEvent(this, key, value));
277
		}
278
	}
279

  
280
	/**
281
	 * Devuelve una instancia unica al XMLEntity de Configuration
282
	 * @return
283
	 */
284
	static private XMLEntity getXMLEntity() {
285
		return singleton.xml;
286
	}
287
	
288
	/**
289
	 * Devuelve una instancia al unico objeto de configuraci?n que puede existir.
290
	 * @return
291
	 */
292
	static public Configuration getSingleton() {
293
		return singleton;
294
	}
295

  
296
	/*
297
	 * (non-Javadoc)
298
	 * @see org.gvsig.fmap.raster.conf.IConfiguration#getValueBoolean(java.lang.String, java.lang.Boolean)
299
	 */
300
	public Boolean getValueBoolean(String name, Boolean defaultValue) {
301
		return Configuration.getValue(name, defaultValue);
302
	}
303

  
304
	/*
305
	 * (non-Javadoc)
306
	 * @see org.gvsig.fmap.raster.conf.IConfiguration#getValueString(java.lang.String, java.lang.String)
307
	 */
308
	public String getValueString(String name, String defaultValue) {
309
		return Configuration.getValue(name, defaultValue);
310
	}
311

  
312
	/*
313
	 * (non-Javadoc)
314
	 * @see org.gvsig.fmap.raster.conf.IConfiguration#getValueDouble(java.lang.String, java.lang.Double)
315
	 */
316
	public Double getValueDouble(String name, Double defaultValue) {
317
		return Configuration.getValue(name, defaultValue);
318
	}
319

  
320
	/*
321
	 * (non-Javadoc)
322
	 * @see org.gvsig.fmap.raster.conf.IConfiguration#getValueFloat(java.lang.String, java.lang.Float)
323
	 */
324
	public Float getValueFloat(String name, Float defaultValue) {
325
		return Configuration.getValue(name, defaultValue);
326
	}
327

  
328
	/*
329
	 * (non-Javadoc)
330
	 * @see org.gvsig.fmap.raster.conf.IConfiguration#getValueInteger(java.lang.String, java.lang.Integer)
331
	 */
332
	public Integer getValueInteger(String name, Integer defaultValue) {
333
		return Configuration.getValue(name, defaultValue);
334
	}
335

  
336
	/*
337
	 * (non-Javadoc)
338
	 * @see org.gvsig.fmap.raster.conf.IConfiguration#getValueLong(java.lang.String, java.lang.Long)
339
	 */
340
	public Long getValueLong(String name, Long defaultValue) {
341
		return Configuration.getValue(name, defaultValue);
342
	}
343
}
0 344

  
org.gvsig.raster.tilecache/trunk/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/cache/app/ConfigurationEvent.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22
package org.gvsig.raster.cache.app;
23

  
24
import java.util.EventObject;
25
/**
26
 * Estado del evento de configuraci?n para las preferencias de Raster.
27
 * 
28
 * @version 26/02/2008
29
 * @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es)
30
 */
31
public class ConfigurationEvent extends EventObject {
32
	private static final long serialVersionUID = 7016236098872059L;
33
	private String key;
34
	private Object value;
35

  
36
	/**
37
	 * Constructor de un ConfigurationEvent
38
	 * @param source
39
	 * @param key
40
	 * @param value
41
	 */
42
	public ConfigurationEvent(Object source, String key, Object value) {
43
		super(source);
44
		this.key = key;
45
		this.value = value;
46
	}
47

  
48
	/**
49
	 * @return the key
50
	 */
51
	public String getKey() {
52
		return key;
53
	}
54

  
55
	/**
56
	 * @return the value
57
	 */
58
	public Object getValue() {
59
		return value;
60
	}
61
}
0 62

  
org.gvsig.raster.tilecache/trunk/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/cache/app/ConfigurationListener.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22
package org.gvsig.raster.cache.app;
23

  
24
import java.util.EventListener;
25

  
26
public interface ConfigurationListener extends EventListener {
27
	/**
28
	 * Evento que se dispara cuando cambia un valor de configuracion.
29
	 * @param e
30
	 */
31
	public void actionConfigurationChanged(ConfigurationEvent e);
32
}
0 33

  
org.gvsig.raster.tilecache/trunk/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/cache/app/CacheExtension.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22
package org.gvsig.raster.cache.app;
23

  
24
import java.awt.Component;
25
import java.util.prefs.Preferences;
26

  
27
import javax.swing.JOptionPane;
28

  
29
import org.gvsig.andami.PluginServices;
30
import org.gvsig.andami.plugins.Extension;
31
import org.gvsig.app.project.documents.view.toc.ITocItem;
32
import org.gvsig.fmap.dal.coverage.RasterLibrary;
33
import org.gvsig.fmap.mapcontext.layers.FLayer;
34
import org.gvsig.raster.cache.tile.TileCache;
35
import org.gvsig.raster.cache.tile.TileCacheLibrary;
36
import org.gvsig.raster.cache.tile.TileCacheLocator;
37
import org.gvsig.tools.ToolsLocator;
38
import org.gvsig.tools.extensionpoint.ExtensionPoint;
39
import org.gvsig.tools.extensionpoint.ExtensionPointManager;
40

  
41

  
42
/**
43
 * Tile cache extension for gvSIG
44
 * 
45
 * @author Nacho Brodin (nachobrodin@gmail.com)
46
 */
47
public class CacheExtension extends Extension implements ConfigurationListener {
48

  
49
	/*
50
	 * (non-Javadoc)
51
	 * @see com.iver.andami.plugins.IExtension#execute(java.lang.String)
52
	 */
53
	public void execute(String actionCommand) {
54
		
55
	}
56

  
57
	/*
58
	 * (non-Javadoc)
59
	 * @see com.iver.andami.plugins.IExtension#initialize()
60
	 */
61
	public void initialize() {
62
		PluginServices.getIconTheme().registerDefault(
63
				"pref-tilecache-icon",
64
				this.getClass().getClassLoader().getResource("images/tilecache-pref.jpeg")
65
			);
66
		
67
		Configuration.addValueChangedListener(this);
68
		Preferences prefs = Preferences.userRoot().node("gvsig.foldering");
69
		prefs.put("DataFolder", System.getProperty("user.home"));
70
		
71
		ExtensionPointManager extensionPoints = ToolsLocator.getExtensionPointManager();
72
		ExtensionPoint point = extensionPoints.add("AplicationPreferences");
73
		point.append("TileCachePreferences", "", TileCachePreferences.class);
74
	}
75
	
76
	/*
77
	 * (non-Javadoc)
78
	 * @see com.iver.andami.plugins.IExtension#isEnabled()
79
	 */
80
	public boolean isEnabled() {
81
		return false;
82
	}
83

  
84
	public boolean isVisible() {
85
		return false;
86
	}
87

  
88
	/*
89
	 * (non-Javadoc)
90
	 * @see org.gvsig.raster.util.ConfigurationListener#actionConfigurationChanged(org.gvsig.raster.util.ConfigurationEvent)
91
	 */
92
	public void actionConfigurationChanged(ConfigurationEvent e) {
93

  
94
		if (e.getKey().equals("path_tilecache")) {
95
			if(e.getValue() instanceof String) {
96
				String value = (String)e.getValue();
97
				if(value != null && value.compareTo("") != 0) {
98
					RasterLibrary.pathTileCache =  (String)e.getValue();
99
					TileCache tc = TileCacheLocator.getManager().getTileCache(RasterLibrary.pathTileCache);
100
					tc.updateBaseDirectory(RasterLibrary.pathTileCache);
101
				}
102
			}
103
			return;
104
		}
105
		
106
		if (e.getKey().equals("tile_levels")) {
107
			if(e.getValue() instanceof String)
108
				try {
109
					TileCacheLibrary.DEFAULT_LEVELS = new Integer((String) e
110
							.getValue()).intValue();
111
				} catch (NumberFormatException exc) {
112
					//Valor por defecto en la cache
113
				}
114
			if(e.getValue() instanceof Integer)
115
				TileCacheLibrary.DEFAULT_LEVELS = ((Integer) e.getValue()).intValue();
116
			return;
117
		}
118
		
119
		if (e.getKey().equals("tilesize")) {
120
			if(e.getValue() instanceof String)
121
				try {
122
					TileCacheLibrary.DEFAULT_TILESIZE = new Integer((String) e
123
							.getValue()).intValue();
124
				} catch (NumberFormatException exc) {
125
					//Valor por defecto en la cache
126
				}
127
			if(e.getValue() instanceof Integer)
128
				TileCacheLibrary.DEFAULT_TILESIZE = ((Integer) e.getValue()).intValue();
129
			return;
130
		}
131
		
132
		if (e.getKey().equals("tilecache_size")) {
133
			if(e.getValue() instanceof String)
134
				try {
135
					TileCacheLibrary.MAX_CACHE_SIZE = new Integer((String) e
136
							.getValue()).intValue();
137
				} catch (NumberFormatException exc) {
138
					//Valor por defecto en la cache
139
				}
140
			if(e.getValue() instanceof Integer)
141
				TileCacheLibrary.MAX_CACHE_SIZE = ((Integer) e.getValue()).intValue();
142
			return;
143
		}
144
		
145
		if (e.getKey().equals("cache_struct")) {
146
			if(e.getValue() instanceof String)
147
				TileCacheLibrary.DEFAULT_STRUCTURE = (String)e.getValue();
148
			return;
149
		}
150
	}
151

  
152
	/*
153
	 * (non-Javadoc)
154
	 * @see org.gvsig.raster.gui.IGenericToolBarMenuItem#execute(com.iver.cit.gvsig.project.documents.view.toc.ITocItem, com.iver.cit.gvsig.fmap.layers.FLayer[])
155
	 */
156
	public void execute(ITocItem item, FLayer[] selectedItems) {
157

  
158
	}
159

  
160
	public void postInitialize() {
161
		super.postInitialize();
162
//		storeLibrary.postInitialize();
163
	}
164
	
165
	/**
166
	 * Shows an error dialog with a text and a accept button 
167
	 * @param msg Message to show in the dialog
168
	 * @param parentWindow Parent window
169
	 */
170
	public static void messageBoxError(String msg, Object parentWindow){
171
		String string = PluginServices.getText(parentWindow, "accept");
172
		Object[] options = {string};
173
		JOptionPane.showOptionDialog((Component)PluginServices.getMainFrame(),
174
					"<html>" + PluginServices.getText(parentWindow, msg).replaceAll("\n", "<br>") + "</html>",
175
					PluginServices.getText(parentWindow, "confirmacion"),
176
					JOptionPane.OK_OPTION,
177
					JOptionPane.ERROR_MESSAGE,
178
					null,
179
					options,
180
					string);
181
	}
182
	
183
	/**
184
	 * Shows an error dialog with a text and a YesOrNot button 
185
	 * @param msg Message to show in the dialog.
186
	 * @param parentWindow Parent window
187
	 * @return Selected button by the button. Returns true if the user has selected Yes
188
	 * and false if he has selected No. 
189
	 */
190
	public static boolean messageBoxYesOrNot(String msg, Object parentWindow){
191
		String string1 = PluginServices.getText(parentWindow, "yes");
192
		String string2 = PluginServices.getText(parentWindow, "no");
193
		Object[] options = {string1, string2};
194
		int n = JOptionPane.showOptionDialog((Component)PluginServices.getMainFrame(),
195
					"<html>" + PluginServices.getText(parentWindow, msg).replaceAll("\n", "<br>") + "</html>",
196
					PluginServices.getText(parentWindow, "confirmacion"),
197
					JOptionPane.YES_NO_OPTION,
198
					JOptionPane.QUESTION_MESSAGE,
199
					null,
200
					options,
201
					string1);
202
		if (n == JOptionPane.YES_OPTION)
203
			return true;
204
		else
205
			return false;
206
	}
207
}
0 208

  
org.gvsig.raster.tilecache/trunk/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/cache/app/TileCachePreferences.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22
package org.gvsig.raster.cache.app;
23

  
24
import java.awt.BorderLayout;
25
import java.awt.GridBagConstraints;
26
import java.awt.GridBagLayout;
27

  
28
import javax.swing.ImageIcon;
29
import javax.swing.JPanel;
30
import javax.swing.JScrollPane;
31
import javax.swing.border.EmptyBorder;
32

  
33
import org.gvsig.andami.PluginServices;
34
import org.gvsig.andami.preferences.AbstractPreferencePage;
35
import org.gvsig.andami.preferences.StoreException;
36

  
37
/**
38
 * Preferences for tile cache
39
 * @author Nacho Brodin (nachobrodin@gmail.com
40
 */
41
public class TileCachePreferences extends AbstractPreferencePage {
42
	private static final long         serialVersionUID = -1689657253810393874L;
43

  
44
	protected static String           id        = TileCachePreferences.class.getName();
45
	private ImageIcon                 icon;
46

  
47
	private TileCachePreferencesPanel tilecache = null;
48

  
49
	/**
50
	 * Constructor de la clase RasterPreferences
51
	 */
52
	public TileCachePreferences() {
53
		super();
54
		icon = PluginServices.getIconTheme().get("pref-tilecache-icon");
55
		initialize();
56
	}
57

  
58
	/**
59
	 * Inicializacion del panel de preferencias.
60
	 */
61
	private void initialize() {
62
		setTitle("Frame");
63

  
64
		GridBagConstraints gridBagConstraints;
65

  
66
		JScrollPane scrollPane = new JScrollPane();
67

  
68
		scrollPane.getVerticalScrollBar().setUnitIncrement(20);
69

  
70
		JPanel panel = new JPanel();
71

  
72
		panel.setLayout(new GridBagLayout());
73

  
74
		gridBagConstraints = new GridBagConstraints();
75
		gridBagConstraints.gridx = 0;
76
		gridBagConstraints.gridy = 0;
77
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
78
		panel.add(getPreferenceTileCache(), gridBagConstraints);
79

  
80
		gridBagConstraints = new GridBagConstraints();
81
		gridBagConstraints.gridx = 0;
82
		gridBagConstraints.gridy = 7;
83
		gridBagConstraints.weightx = 1.0;
84
		gridBagConstraints.weighty = 1.0;
85
		panel.add(new JPanel(), gridBagConstraints);
86

  
87
		panel.setBorder(new EmptyBorder(5, 5, 5, 5));
88

  
89
		scrollPane.setViewportView(panel);
90

  
91
		setLayout(new BorderLayout());
92
		add(scrollPane, BorderLayout.CENTER);
93
	}
94

  
95
	/**
96
	 * Gets a tile cache configuration panel
97
	 * @return
98
	 */
99
	private TileCachePreferencesPanel getPreferenceTileCache() {
100
		if (tilecache == null) {
101
			tilecache = new TileCachePreferencesPanel();
102
		}
103
		return tilecache;
104
	}
105

  
106
	/*
107
	 * (non-Javadoc)
108
	 * @see com.iver.andami.preferences.IPreference#initializeValues()
109
	 */
110
	public void initializeValues() {
111
		getPreferenceTileCache().initializeValues();
112
	}
113

  
114
	/*
115
	 * (non-Javadoc)
116
	 * @see com.iver.andami.preferences.AbstractPreferencePage#storeValues()
117
	 */
118
	public void storeValues() throws StoreException {
119
		getPreferenceTileCache().storeValues();
120
	}
121

  
122
	/*
123
	 * (non-Javadoc)
124
	 * @see com.iver.andami.preferences.IPreference#initializeDefaults()
125
	 */
126
	public void initializeDefaults() {
127
		getPreferenceTileCache().initializeDefaults();
128
	}
129

  
130
	/*
131
	 * (non-Javadoc)
132
	 * @see com.iver.andami.preferences.AbstractPreferencePage#isResizeable()
133
	 */
134
	public boolean isResizeable() {
135
		return true;
136
	}
137

  
138
	/*
139
	 * (non-Javadoc)
140
	 * @see com.iver.andami.preferences.IPreference#getID()
141
	 */
142
	public String getID() {
143
		return id;
144
	}
145

  
146
	/*
147
	 * (non-Javadoc)
148
	 * @see com.iver.andami.preferences.IPreference#getIcon()
149
	 */
150
	public ImageIcon getIcon() {
151
		return icon;
152
	}
153

  
154
	/*
155
	 * (non-Javadoc)
156
	 * @see com.iver.andami.preferences.IPreference#getPanel()
157
	 */
158
	public JPanel getPanel() {
159
		return this;
160
	}
161

  
162
	/*
163
	 * (non-Javadoc)
164
	 * @see com.iver.andami.preferences.IPreference#getTitle()
165
	 */
166
	public String getTitle() {
167
		return "Tile Cache";
168
	}
169

  
170
	/*
171
	 * (non-Javadoc)
172
	 * @see com.iver.andami.preferences.IPreference#isValueChanged()
173
	 */
174
	public boolean isValueChanged() {
175
		return true;
176
	}
177

  
178
	public void setChangesApplied() {}
179
}
0 180

  
org.gvsig.raster.tilecache/trunk/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/cache/app/TileCachePreferencesPanel.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22
package org.gvsig.raster.cache.app;
23

  
24
import java.awt.Color;
25
import java.awt.Dimension;
26
import java.awt.GridBagConstraints;
27
import java.awt.GridBagLayout;
28
import java.awt.Insets;
29
import java.awt.event.ActionEvent;
30
import java.awt.event.ActionListener;
31
import java.io.File;
32
import java.text.NumberFormat;
33

  
34
import javax.swing.BorderFactory;
35
import javax.swing.DefaultComboBoxModel;
36
import javax.swing.JButton;
37
import javax.swing.JComboBox;
38
import javax.swing.JFormattedTextField;
39
import javax.swing.JLabel;
40
import javax.swing.JTextField;
41
import javax.swing.SwingConstants;
42
import javax.swing.text.DefaultFormatterFactory;
43
import javax.swing.text.NumberFormatter;
44

  
45
import org.gvsig.andami.PluginServices;
46
import org.gvsig.andami.preferences.DlgPreferences;
47
import org.gvsig.andami.ui.mdiManager.IWindow;
48
import org.gvsig.fmap.dal.coverage.RasterLibrary;
49
import org.gvsig.raster.cache.tile.TileCacheLibrary;
50
import org.gvsig.raster.util.BasePanel;
51
/**
52
 * This class provides a panel for tile cache configuration
53
 * 
54
 * @author Nacho Brodin (nachobrodin@gmail.com)
55
 */
56
public class TileCachePreferencesPanel extends BasePanel implements ActionListener {
57
	protected static final long serialVersionUID      = 1L;
58
	private JLabel              labelWarning          = null;
59
	private JLabel              labelCacheSize        = null;
60
	private JLabel              labelLevels           = null;
61
	private JLabel              labelStruct           = null;
62
	private JLabel              labelTileSize         = null;
63
	private JLabel              labelPath             = null;
64
	private JFormattedTextField textFieldCacheSize    = null;
65
	private JFormattedTextField textFieldLevels       = null;
66
	private JFormattedTextField textFieldTileSize     = null;
67
	private JTextField          textFieldPath         = null;
68
	private JComboBox           comboBoxStruct        = null;
69
	private JButton             buttonRemove          = null;
70

  
71
	/**
72
	 *Inicializa componentes gr?ficos y traduce
73
	 */
74
	public TileCachePreferencesPanel() {
75
		init();
76
		translate();
77
	}
78

  
79
	/**
80
	 * Define todas las traducciones de PreferenceCache
81
	 */
82
	protected void translate() {
83
		setBorder(BorderFactory.createTitledBorder(getText(this, "tilecache")));
84
		getLabelWarning().setText(getText(this, "preference_cache_warning"));
85
		getLabelCacheSize().setText(getText(this, "tamanyo_max_tilecache") + ":");
86
		getLabelLevels().setText(getText(this, "res_levels") + ":");
87
		getLabelTileSize().setText(getText(this, "tilesize") + ":");
88
		getLabelStruct().setText(getText(this, "tilecache_struct") + ":");
89
		getButtonRemove().setText(getText(this, "remove_cache"));
90
		getLabelPath().setText(getText(this, "path_tilecache"));
91
	}
92

  
93
	protected void init() {
94
		GridBagConstraints gridBagConstraints;
95

  
96
		setLayout(new GridBagLayout());
97

  
98
		gridBagConstraints = new GridBagConstraints();
99
		gridBagConstraints.gridwidth = 2;
100
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
101
		gridBagConstraints.weightx = 1.0;
102
		gridBagConstraints.insets = new Insets(5, 5, 2, 5);
103
		add(getLabelWarning(), gridBagConstraints);
104

  
105
		gridBagConstraints = new GridBagConstraints();
106
		gridBagConstraints.gridx = 0;
107
		gridBagConstraints.gridy = 1;
108
		gridBagConstraints.anchor = GridBagConstraints.EAST;
109
		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
110
		add(getLabelCacheSize(), gridBagConstraints);
111
		
112
		gridBagConstraints = new GridBagConstraints();
113
		gridBagConstraints.gridx = 0;
114
		gridBagConstraints.gridy = 2;
115
		gridBagConstraints.anchor = GridBagConstraints.EAST;
116
		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
117
		add(getLabelLevels(), gridBagConstraints);
118
		
119
		gridBagConstraints = new GridBagConstraints();
120
		gridBagConstraints.gridx = 0;
121
		gridBagConstraints.gridy = 3;
122
		gridBagConstraints.anchor = GridBagConstraints.EAST;
123
		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
124
		add(getLabelTileSize(), gridBagConstraints);
125
		
126
		gridBagConstraints = new GridBagConstraints();
127
		gridBagConstraints.gridx = 0;
128
		gridBagConstraints.gridy = 4;
129
		gridBagConstraints.anchor = GridBagConstraints.EAST;
130
		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
131
		add(getLabelStruct(), gridBagConstraints);
132
		
133
		gridBagConstraints = new GridBagConstraints();
134
		gridBagConstraints.gridx = 0;
135
		gridBagConstraints.gridy = 5;
136
		gridBagConstraints.gridwidth = 2;
137
		gridBagConstraints.anchor = GridBagConstraints.WEST;
138
		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
139
		add(getButtonRemove(), gridBagConstraints);
140
		
141
		gridBagConstraints = new GridBagConstraints();
142
		gridBagConstraints.gridx = 0;
143
		gridBagConstraints.gridy = 6;
144
		gridBagConstraints.anchor = GridBagConstraints.EAST;
145
		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
146
		add(getLabelPath(), gridBagConstraints);
147

  
148
		gridBagConstraints = new GridBagConstraints();
149
		gridBagConstraints.gridx = 1;
150
		gridBagConstraints.gridy = 1;
151
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
152
		gridBagConstraints.anchor = GridBagConstraints.WEST;
153
		gridBagConstraints.insets = new Insets(2, 2, 2, 5);
154
		add(getTextFieldCacheSize(), gridBagConstraints);
155
		
156
		gridBagConstraints = new GridBagConstraints();
157
		gridBagConstraints.gridx = 1;
158
		gridBagConstraints.gridy = 2;
159
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
160
		gridBagConstraints.anchor = GridBagConstraints.WEST;
161
		gridBagConstraints.insets = new Insets(2, 2, 2, 5);
162
		add(getTextFieldLevels(), gridBagConstraints);
163
		
164
		gridBagConstraints = new GridBagConstraints();
165
		gridBagConstraints.gridx = 1;
166
		gridBagConstraints.gridy = 3;
167
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
168
		gridBagConstraints.anchor = GridBagConstraints.WEST;
169
		gridBagConstraints.insets = new Insets(2, 2, 2, 5);
170
		add(getTextFieldTileSize(), gridBagConstraints);
171
		
172
		gridBagConstraints = new GridBagConstraints();
173
		gridBagConstraints.gridx = 1;
174
		gridBagConstraints.gridy = 4;
175
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
176
		gridBagConstraints.anchor = GridBagConstraints.WEST;
177
		gridBagConstraints.insets = new Insets(2, 2, 2, 5);
178
		add(getComboBoxStruct(), gridBagConstraints);
179
		
180
		gridBagConstraints = new GridBagConstraints();
181
		gridBagConstraints.gridx = 1;
182
		gridBagConstraints.gridy = 6;
183
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
184
		gridBagConstraints.anchor = GridBagConstraints.WEST;
185
		gridBagConstraints.insets = new Insets(2, 2, 2, 5);
186
		add(getTextFieldPath(), gridBagConstraints);
187
		
188
	}
189

  
190
	private JLabel getLabelWarning() {
191
		if (labelWarning == null) {
192
			labelWarning = new JLabel();
193
			labelWarning.setForeground(new Color(255, 0, 0));
194
			labelWarning.setHorizontalAlignment(SwingConstants.CENTER);
195
			labelWarning.setPreferredSize(new Dimension(0, 32));
196
		}
197
		return labelWarning;
198
	}
199

  
200
	private JButton getButtonRemove() {
201
		if(buttonRemove == null) {
202
			buttonRemove = new JButton();
203
			buttonRemove.addActionListener(this);
204
		}
205
		return buttonRemove;
206
	}
207
	
208
	private JComboBox getComboBoxStruct() {
209
		if (comboBoxStruct == null) {
210
			comboBoxStruct = new JComboBox();
211
			comboBoxStruct.setModel(new DefaultComboBoxModel(new String[] { "FLATX" }));
212
		}
213
		return comboBoxStruct;
214
	}
215
	
216
	private JTextField getTextFieldPath() {
217
		if (textFieldPath == null) {
218
			textFieldPath = new JTextField();
219
		}
220
		return textFieldPath;
221
	}
222
	
223
	private JFormattedTextField getTextFieldCacheSize() {
224
		if (textFieldCacheSize == null) {
225
			NumberFormat integerFormat = NumberFormat.getNumberInstance();
226
			integerFormat.setParseIntegerOnly(true);
227
			textFieldCacheSize = new JFormattedTextField(new DefaultFormatterFactory(
228
					new NumberFormatter(integerFormat),
229
					new NumberFormatter(integerFormat),
230
					new NumberFormatter(integerFormat)));
231
		}
232
		return textFieldCacheSize;
233
	}
234
	
235
	private JFormattedTextField getTextFieldTileSize() {
236
		if (textFieldTileSize == null) {
237
			NumberFormat integerFormat = NumberFormat.getNumberInstance();
238
			integerFormat.setParseIntegerOnly(true);
239
			textFieldTileSize = new JFormattedTextField(new DefaultFormatterFactory(
240
					new NumberFormatter(integerFormat),
241
					new NumberFormatter(integerFormat),
242
					new NumberFormatter(integerFormat)));
243
		}
244
		return textFieldTileSize;
245
	}
246
	
247
	private JFormattedTextField getTextFieldLevels() {
248
		if (textFieldLevels == null) {
249
			NumberFormat integerFormat = NumberFormat.getNumberInstance();
250
			integerFormat.setParseIntegerOnly(true);
251
			textFieldLevels = new JFormattedTextField(new DefaultFormatterFactory(
252
					new NumberFormatter(integerFormat),
253
					new NumberFormatter(integerFormat),
254
					new NumberFormatter(integerFormat)));
255
		}
256
		return textFieldLevels;
257
	}
258

  
259
	private JLabel getLabelPath() {
260
		if (labelPath == null)
261
			labelPath = new JLabel();
262
		return labelPath;
263
	}
264
	
265
	private JLabel getLabelCacheSize() {
266
		if (labelCacheSize == null)
267
			labelCacheSize = new JLabel();
268
		return labelCacheSize;
269
	}
270
	
271
	private JLabel getLabelLevels() {
272
		if (labelLevels == null)
273
			labelLevels = new JLabel();
274
		return labelLevels;
275
	}
276
	
277
	private JLabel getLabelStruct() {
278
		if (labelStruct == null)
279
			labelStruct = new JLabel();
280
		return labelStruct;
281
	}
282
	
283
	private JLabel getLabelTileSize() {
284
		if (labelTileSize == null)
285
			labelTileSize = new JLabel();
286
		return labelTileSize;
287
	}
288

  
289
	/**
290
	 * Establece los valores por defecto de la Cache
291
	 */
292
	public void initializeDefaults() {
293
		getTextFieldCacheSize().setValue(Configuration.getDefaultValue("tilecache_size"));
294
		getTextFieldTileSize().setValue(Configuration.getDefaultValue("tilesize"));
295
		getTextFieldLevels().setValue(Configuration.getDefaultValue("tile_levels"));
296
		getTextFieldPath().setText(Configuration.getDefaultValue("path_tilecache").toString());
297
		String struct = (String) Configuration.getDefaultValue("cache_struct");
298
		if(struct != null) {
299
			for (int i = 0; i < getComboBoxStruct().getItemCount(); i++)
300
				if (getComboBoxStruct().getItemAt(i).toString().equals(struct.toString())) {
301
					getComboBoxStruct().setSelectedIndex(i);
302
					break;
303
				}
304
		}
305
	}
306

  
307
	/**
308
	 * Establece los valores que ha definido el usuario de la Cache
309
	 */
310
	public void initializeValues() {
311
		getTextFieldCacheSize().setValue(Configuration.getValue("tilecache_size", Integer.valueOf(TileCacheLibrary.MAX_CACHE_SIZE)));
312
		getTextFieldTileSize().setValue(Configuration.getValue("tilesize", Integer.valueOf(TileCacheLibrary.DEFAULT_TILESIZE)));
313
		getTextFieldLevels().setValue(Configuration.getValue("tile_levels", Integer.valueOf(TileCacheLibrary.DEFAULT_LEVELS)));
314
		getTextFieldPath().setText(Configuration.getValue("path_tilecache", RasterLibrary.pathTileCache));
315
		String struct = Configuration.getValue("cache_struct", TileCacheLibrary.DEFAULT_STRUCTURE);
316
		if(struct != null) {
317
			for (int i = 0; i < getComboBoxStruct().getItemCount(); i++)
318
				if (getComboBoxStruct().getItemAt(i).toString().equals(struct.toString())) {
319
					getComboBoxStruct().setSelectedIndex(i);
320
					break;
321
				}
322
		}
323
	}
324

  
325
	/**
326
	 * Guarda los valores de la cache establecidos por el usuario
327
	 */
328
	public void storeValues() {
329
		Configuration.setValue("tilecache_size", getTextFieldCacheSize().getText());
330
		Configuration.setValue("tilesize", getTextFieldTileSize().getText());
331
		Configuration.setValue("tile_levels", getTextFieldLevels().getText());
332
		Configuration.setValue("cache_struct", getComboBoxStruct().getSelectedItem() != null ? getComboBoxStruct().getSelectedItem().toString() : TileCacheLibrary.DEFAULT_STRUCTURE);
333
		Configuration.setValue("path_tilecache", getTextFieldPath().getText());
334
	}
335

  
336
	public void actionPerformed(ActionEvent e) {
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff