Revision 16987

View differences:

tags/tmp_build/examples/exaExampleCenterViewToPoint/.settings/org.eclipse.jdt.ui.prefs
1
#Mon May 14 16:21:02 CEST 2007
2
eclipse.preferences.version=1
3
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
0 4

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/build.xml
1
<project name="extCenterViewToPoint" default="generate-without-source" basedir=".">
2
    <description>
3
        Instala el plugin de Centrar la Vista sobre un punto en Andami.
4
    </description>
5
  <!-- set global properties for this build -->
6
  	<property name="extensions-dir" location="${GVSIG_HOME}/bin/gvSIG/extensiones"/>
7
  	<property name="src" location="src"/>
8
 	<property name="build" location="bin"/>
9
  	<property name="doc"  location="doc"/>
10
  	<property name="dist"  location="dist"/>
11
  	<property name="without_src"  location="without_src"/>
12
  	<property name="plugin" value="com.iver.gvsig.centerviewpoint"/>
13
	<property name="jarName" value="com.iver.gvsig.centerviewpoint.jar"/>
14
	<property name="andami" location="${GVSIG_HOME}/bin"/>
15
	<property name="andamiLibs" location="${GVSIG_HOME}/bin/libs" />
16
	<property name="mainPlugin" location="${extensions-dir}/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar"/>
17
	<property name="compile-classpath" value="${andami}/andami.jar:${andamiLibs}/beans.jar:${fmapLibs}/cms.jar:${fmapLibs}/fmap.jar:${mainPlugin}"/>
18
	<property name="installBaseDir" location="${andami}"/>
19
	<property name="installDir" location="${installBaseDir}/gvSIG/extensiones/${plugin}"/>
20
	<property name="JavaSourceVersion" value="1.4"/>
21
	<property name="JavaTargetVersion" value="1.4"/>
22

  
23
  <target name="init">
24
    <!-- Create the time stamp -->
25
    <tstamp/>
26
	<echo>
27
		Compiling ${ant.project.name}...</echo>
28
  </target>
29

  
30
  <target name="dist" depends="init"
31
	description="generate the distribution" >
32
    <!-- Remove previous distribution directory -->
33
    <delete dir="${dist}"/>
34
    <!-- Create the distribution directory structure -->
35
    <mkdir dir="${dist}"/>
36
    <mkdir dir="${dist}/src"/>
37
    <mkdir dir="${dist}/doc"/>
38
    <mkdir dir="${dist}/bin"/>
39
    <mkdir dir="${dist}/bin/com"/>
40
    <mkdir dir="${dist}/bin/com/iver"/>
41
    <mkdir dir="${dist}/bin/com/iver/gvsig"/>
42
    <mkdir dir="${dist}/bin/com/iver/gvsig/centerviewpoint"/>
43
    <mkdir dir="${dist}/bin/com/iver/gvsig/centerviewpoint/images"/>
44
    <mkdir dir="${dist}/images"/>
45
    <mkdir dir="${dist}/config"/>
46
    <!-- Copy necessary distribution files to dist dir -->
47
    <copy todir="${dist}/src">
48
      <fileset dir="${src}"/>
49
    </copy>
50
    <!--copy todir="${dist}/doc">
51
      <fileset dir="${doc}"/>
52
    </copy-->
53
    <copy todir="${dist}/images">
54
      <fileset dir="images"/>
55
    </copy>
56
    <copy file="config/config.xml" todir="${dist}/config"/>
57
  	<copy file="build.number" todir="${dist}"/>
58
    <copy file="build.xml" todir="${dist}"/>
59
    <copy todir="${dist}">
60
    	<fileset dir="config" includes="text*.properties"/>
61
    </copy>
62
    <copy todir="${dist}/bin/com/iver/gvsig/centerviewpoint">
63
    	<fileset dir="config" includes="text*.properties"/>
64
    </copy>
65
    <jar jarfile="${dist}/bin/com/iver/gvsig/centerviewpoint/${plugin}.jar" basedir="${build}"/>
66
    <copy file="config/config.xml" todir="${dist}/bin/com/iver/gvsig/centerviewtopoint"/>
67
  	<copy file="build.number" todir="${dist}/bin/com/iver/gvsig/centerviewtopoint"/>
68
    <copy todir="${dist}/bin/com/iver/gvsig/centerviewpoint/images">
69
      <fileset dir="images"/>
70
    </copy>
71
    <!-- Zip distribution -->
72
    <zip destfile="${dist}/gvSIGCenterViewToPointPlugin.zip"
73
         basedir="${dist}"
74
         update="true"
75
    />
76
  </target>
77

  
78
	  <target name="import-build-number">
79
	  	<copy todir=".">
80
	  		<fileset file="${buildNumberFile}"/>
81
	  	</copy>
82
	  </target>
83

  
84

  
85
  <target name="clean"
86
		description="clean dist directory" >
87
    <!-- Clean the distribution directory -->
88
    <delete dir="${dist}/src" failonerror="false"/>
89
    <delete dir="${dist}/doc" failonerror="false"/>
90
    <delete dir="${dist}/bin" failonerror="false"/>
91
    <delete dir="${dist}/images" failonerror="false"/>
92
    <delete dir="${dist}/config" failonerror="false"/>
93
  	<delete file="${dist}/build.xml" failonerror="false"/>
94
  	<delete failonerror="false">
95
        <fileset dir="${dist}" includes="**/*.properties"/>
96
    </delete>
97
  </target>
98

  
99
  <target name="generate-without-source" depends="clean" description="generate the distribution without the source file" >
100
    <!-- Create the distribution directory -->
101
    <mkdir dir="${without_src}"/>
102
  	<mkdir dir="${without_src}/lib"/>
103
  	<mkdir dir="${without_src}/theme"/>
104
    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
105
    <jar jarfile="${without_src}/lib/${plugin}.jar" basedir="${build}"/>
106
    <copy file="config/config.xml" todir="${without_src}"/>
107
  	<copy file="config/about.htm" todir="${without_src}"/>
108
  	<copy file="build.number" todir="${without_src}"/>
109
    <copy todir="${without_src}">
110
    	<fileset dir="config" includes="text*.properties"/>
111
    </copy>
112
  	<copy todir="${without_src}/theme">
113
  	   <fileset dir="theme/" includes="*"/>
114
  	</copy>
115
    <copy todir="${without_src}/images">
116
    	<fileset dir="images/" includes="*"/>
117
    </copy>
118
    <move todir="${extensions-dir}/${plugin}/">
119
    	<fileset dir="${without_src}" includes="**/**"/>
120
    </move>
121
  </target>
122

  
123

  
124
	<target name="batch-build"
125
			description="compile the sources, create the jar file"
126
			depends="init,compile,create-jar,copy-data-files,move-to-installDir">
127
	</target>
128

  
129
	<target name="compile" description="compile the source" >
130
		<!-- Compile the Java code from ${src} to ${build} -->
131
		<mkdir dir="${build}" />
132
		<javac  srcdir="${src}"
133
			destdir="${build}"
134
    		source="${JavaSourceVersion}"
135
			target="${JavaTargetVersion}"
136
			debug="${debug}"
137
			debuglevel="${debuglevel}"
138
			classpath="${compile-classpath}"/>
139
	</target>
140

  
141
	<target name="create-jar"
142
			description="Creates the plugin jar">
143
		<mkdir dir="${dist}"/>
144
	    <jar jarfile="${dist}/${jarName}" basedir="${build}" />
145
	</target>
146

  
147
	<target name="copy-data-files">
148
	    <copy file="config/config.xml" todir="${dist}"/>
149
		<copy file="build.number" todir="${dist}"/>
150
		<copy todir="${dist}">
151
			<fileset dir="config" includes="text*.properties"/>
152
		</copy>
153
		<copy todir="${dist}/images">
154
			<fileset dir="images/" includes="*"/>
155
		</copy>
156
	</target>
157

  
158
	<target name="move-to-installDir">
159
		<move todir="${installDir}">
160
			<fileset dir="${dist}" includes="**/**"/>
161
		</move>
162
	</target>
163

  
164
</project>
165

  
0 166

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/.classpath
1
<?xml version="1.0" encoding="UTF-8"?>
2
<classpath>
3
	<classpathentry kind="src" path="src"/>
4
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jSDK1.4.12"/>
5
	<classpathentry sourcepath="C:/workspaceVersion1/_fwAndami/src" kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/andami.jar"/>
6
	<classpathentry sourcepath="C:/workspaceVersion1/appgvSIG/src" kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar"/>
7
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/iver-utiles.jar"/>
8
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/castor-0.9.5.3-xml.jar"/>
9
	<classpathentry sourcepath="C:/workspaceVersion1/libFMap/src" kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib/fmap.jar"/>
10
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/beans.jar"/>
11
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/javaws.jar"/>
12
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/commons-codec-1.3.jar"/>
13
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/crimson.jar"/>
14
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/gvsig-i18n.jar"/>
15
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/jcalendar.jar"/>
16
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/JUF-1.0.jar"/>
17
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/JWizardComponent.jar"/>
18
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/kxml2.jar"/>
19
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/log4j-1.2.8.jar"/>
20
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/looks-2.0.2.jar"/>
21
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/tempFileManager.jar"/>
22
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/xerces_2_5_0.jar"/>
23
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/xml-apis.jar"/>
24
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/lib/xmlrpc-2.0.1.jar"/>
25
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib/cms.jar"/>
26
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib/driver-manager-1.1.jar"/>
27
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib/gdbms-0.8-SNAPSHOT.jar"/>
28
	<classpathentry kind="lib" path="C:/Archivos de programa/gvSIG_1.0.2/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib/com.iver.gvsig.addeventtheme.jar"/>
29
	<classpathentry kind="output" path="bin"/>
30
</classpath>
0 31

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/theme/andami-theme.xml
1
<AndamiProperties>
2
	<ApplicationImages>
3
		<SplashImages>
4
			<Splash path="gvSIG/extensiones/com.iver.gvsig.centerviewpoint/theme/logo_es.png" timer="1000"/>
5
			<Splash path="gvSIG/extensiones/com.iver.gvsig.centerviewpoint/theme/logo_personalizado.png" timer="100000"/>
6
		</SplashImages>
7
		<BackgroundImage path="gvSIG/extensiones/com.iver.gvsig.centerviewpoint/theme/logo_fondo_personalizado.png"/>
8
		<WallpaperType value="CENTERED"/>
9
		<Icon path="gvSIG/extensiones/com.iver.gvsig.centerviewpoint/theme/logoGVA.gif"/>
10
	</ApplicationImages>
11
	<ApplicationName value="gvSIG 1.0.2. Example center View to point"/>
12
</AndamiProperties>
0 13

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/.project
1
<?xml version="1.0" encoding="UTF-8"?>
2
<projectDescription>
3
	<name>exaExampleCenterViewToPoint</name>
4
	<comment></comment>
5
	<projects>
6
	</projects>
7
	<buildSpec>
8
		<buildCommand>
9
			<name>org.eclipse.jdt.core.javabuilder</name>
10
			<arguments>
11
			</arguments>
12
		</buildCommand>
13
		<buildCommand>
14
			<name>de.loskutov.FileSync.FSBuilder</name>
15
			<arguments>
16
			</arguments>
17
		</buildCommand>
18
	</buildSpec>
19
	<natures>
20
		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
21
		<nature>org.eclipse.jdt.core.javanature</nature>
22
		<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
23
	</natures>
24
</projectDescription>
0 25

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/text_eu.properties
1
#Translations for language [eu]
2
#Mon Feb 26 16:06:24 CET 2007
3
Centrar_la_Vista_sobre_un_punto=Zentratu bista puntu batekiko
4
debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Geruzak hautatu behar dituzu horien gaineko informazioa jasotzeko.
5
formato_de_numero_incorrecto=Zenbakiaren formatua okerra da
6
no_hay_ninguna_capa_seleccionada=
7
Vista=Bista
0 8

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/text_nl.properties
1
#Translations for language [nl]
2
#Mon Feb 26 16:06:24 CET 2007
3
Centrar_la_Vista_sobre_un_punto=
4
debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=
5
formato_de_numero_incorrecto=
6
no_hay_ninguna_capa_seleccionada=
7
Vista=Kaartbeeld
0 8

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/text_pl.properties
1
#Translations for language [po]
2
#Mon Mar 12 10:04:20 CET 2007
3
Centrar_la_Vista_sobre_un_punto=Wycentruj w punkcie
4
debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Wybierz warstwy, z kt\u00f3rych chcesz pobra\u0107 informacje
5
formato_de_numero_incorrecto=Niew\u0142a\u015bciwy format liczbowy
6
no_hay_ninguna_capa_seleccionada=Nie wybrano warstwy
7
Vista=Widok
0 8

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/text_it.properties
1
#Translations for language [it]
2
#Mon Feb 26 16:06:24 CET 2007
3
Centrar_la_Vista_sobre_un_punto=Centra la visuale su un punto
4
debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Selezionare i layers di cui si desiderano informazioni.
5
formato_de_numero_incorrecto=Formato del numero errato.
6
no_hay_ninguna_capa_seleccionada=Nessun layer selezionato
7
Vista=Vista
0 8

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/text.properties
1
#Translations for language [es]
2
#Mon Feb 26 16:06:24 CET 2007
3
Centrar_la_Vista_sobre_un_punto=Centrar la vista sobre un punto
4
color_point=Color del punto
5
debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Debe seleccionar las capas de las que quiera obtener informaci\u00f3n.
6
example_extension=Extensi?n ejemplo
7
formato_de_numero_incorrecto=Formato de n\u00famero incorrecto.
8
no_hay_ninguna_capa_seleccionada=No hay ninguna capa seleccionada
9
this_is_a_window_example=Esto es una ventana de ejemplo
10
Vista=Vista
0 11

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/text_ro.properties
1
#Translations for language [ro]
2
#Thu Mar 01 10:01:15 CET 2007
3
Centrar_la_Vista_sobre_un_punto=Centrar atentia a un punct
4
debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Trebuie selectionate crpetele de la care dorim obtine informati
5
formato_de_numero_incorrecto=
6
no_hay_ninguna_capa_seleccionada=nu ai ninguna capeta selectionata
7
Vista=Vedere
0 8

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/text_zh.properties
1
#Translations for language [zh]
2
#Mon Feb 26 16:06:24 CET 2007
3
Centrar_la_Vista_sobre_un_punto=\u5411\u4e00\u70b9\u96c6\u4e2d
4
debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=\u60a8\u5fc5\u987b\u9009\u5b9a\u60a8\u8981\u8bfb\u53d6\u4fe1\u606f\u7684\u56fe\u5c42
5
formato_de_numero_incorrecto=\u6570\u5b57\u683c\u5f0f\u65e0\u6548
6
no_hay_ninguna_capa_seleccionada=\u672a\u9009\u5b9a\u56fe\u5c42
7
Vista=\u89c6\u56fe
0 8

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/text_ca.properties
1
#Translations for language [ca]
2
#Mon Feb 26 16:06:24 CET 2007
3
Centrar_la_Vista_sobre_un_punto=Centrar la Vista sobre un punt
4
debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Ha de seleccionar les capes de les quals vol obtindre informaci\u00f3
5
formato_de_numero_incorrecto=Format de n\u00famero incorrecte
6
no_hay_ninguna_capa_seleccionada=No hi ha cap capa seleccionada
7
Vista=Vista
0 8

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/text_pt.properties
1
#Translations for language [pt]
2
#Mon Feb 26 16:06:24 CET 2007
3
Centrar_la_Vista_sobre_un_punto=
4
debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=
5
formato_de_numero_incorrecto=
6
no_hay_ninguna_capa_seleccionada=
7
Vista=Vista
0 8

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/text_de.properties
1
#Translations for language [de]
2
#Mon Feb 26 16:06:24 CET 2007
3
Centrar_la_Vista_sobre_un_punto=
4
debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=
5
formato_de_numero_incorrecto=
6
no_hay_ninguna_capa_seleccionada=
7
Vista=Ansicht
0 8

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/about.htm
1
<html>
2
  <head>
3
    <title>Extesi&oacute;n de ejemplo.</title>
4
    <meta content="">
5
    <style></style>
6
  </head>
7
  <body>
8
<table width="60%" border="0">
9
  <tr>
10
    <td width="64%"><img src="images/logo_horiz_bicolor_gva.png" width="329" height="50"></td>
11
    <td width="36%"><div align="right"><img src="images/logoIver.png" width="87" height="50"></div></td>
12
  </tr>
13
  <tr>
14
    <td colspan="2"><font face="Arial, Helvetica, sans-serif">&copy; Copyright
15
      Generalitat Valenciana, IVER T.I. 2007.</font></td>
16
  </tr>
17
</table>
18
  <h3>Extensi&oacute;n de ejemplo:</h3>
19
   <p> - Opciones men&uacute;</p>
20
   <p> - Informaci&oacute;n ToolBar</p>
21
   <p> - Modificar preferencias</p>
22
   <p> - Opci&oacute;n en el men&uacute; contextual</p>
23
   <p> - Posibilidad de visualizar las extensiones elegidas</p>
24
   <p> - Personalizaci&oacute;n del Splash</p>
25
   <p> - InfoTool personalizado para nuestra capa</p>
26
   <p> - Ventana de About</p>
27
   <p> - Crear extensi&oacute;n sin los fuentes de gvSIG</p>
28

  
29
  <p><br><br><b> Build Number: #build.number#</b></p>
30
  </body>
31
</html>
0 32

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/text_en.properties
1
#Translations for language [en]
2
#Mon Feb 26 16:06:24 CET 2007
3
Centrar_la_Vista_sobre_un_punto=Center view to point
4
color_point=Color point
5
debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Select the layers you want to get information from
6
example_extension=Example extension
7
formato_de_numero_incorrecto=Incorrect number format
8
no_hay_ninguna_capa_seleccionada=No layer has been selected
9
this_is_a_window_example=This is a window example
10
Vista=View
0 11

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/text_gl.properties
1
#Translations for language [gl]
2
#Mon Feb 26 16:06:24 CET 2007
3
Centrar_la_Vista_sobre_un_punto=Centrar a vista sobre un punto
4
debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Debe seleccionar as capas das que desexe obter informaci\u00f3n
5
formato_de_numero_incorrecto=Formato de n\u00famero incorrecto.
6
no_hay_ninguna_capa_seleccionada=Non hai ningunha capa seleccionada
7
Vista=Vista
0 8

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/config.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<plugin-config>
3
	<depends plugin-name="com.iver.cit.gvsig" />
4
	<libraries library-dir="lib"/>
5
    <resourceBundle name="text"/>
6
	<extensions>
7
		<extension class-name="org.gvsig.examples.example1.ExampleExtension"
8
			description="Extensi?n de ejemplo."
9
			active="true"
10
			priority="1">
11
		</extension>
12
		<extension class-name="org.gvsig.examples.example1.extension.CenterViewToPointExtension"
13
			description="Extensi?n que permite hacer zooms en funci?n de un par de coordenadas introducidas por el usuario."
14
			active="true"
15
			priority="2">
16
			<menu text="Vista/Centrar_la_Vista_sobre_un_punto" tooltip="Centrar_la_Vista_sobre_un_punto"
17
				action-command="CENTERVIEWTOPOINT"
18
				icon="images/centerviewtopoint.png" />
19
			<tool-bar name="com.iver.cit.gvsig.Herramientas">
20
				<action-tool icon="images/centerviewtopoint.png"
21
					action-command="CENTERVIEWTOPOINT" tooltip="Centrar_la_Vista_sobre_un_punto"
22
					enable-text="deber?a de estar activada" last="true"/>
23
			</tool-bar>
24
		</extension>
25
		<extension class-name="org.gvsig.examples.example1.extension.InfoToolExampleExtension"
26
			description="Extensi?n encargada de gestionar la herramienta de info y centrar el extent al punto."
27
			active="true"
28
			priority="29">
29
			<menu text="Vista/consulta/informacion" action-command="INFO" icon="images/Identify.png"/>
30
			<tool-bar name="View_Tools_Query" position="5">
31
				<selectable-tool icon="images/Identify.png" action-command="INFO"  tooltip="informacion" position="1"/>
32
			</tool-bar>
33
		</extension>
34
		<extension class-name="org.gvsig.examples.example1.extension.OpenCSVToPointsExtension"
35
			description="Extensi?n encargada de abrir una vista con una cpa de puntos de una fichero CSV."
36
			active="true"
37
			priority="30">
38
		</extension>
39
	</extensions>
40
</plugin-config>
0 41

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/text_cs.properties
1
#Translations for language [cs]
2
#Mon Feb 26 16:06:24 CET 2007
3
Centrar_la_Vista_sobre_un_punto=Centruj pohled na st\u0159ed
4
debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Ozna\u010dte vrstvy, ze kter\u00fdch chcete z\u00edskat informace
5
formato_de_numero_incorrecto=Neplatn\u00e9 \u010d\u00edslo form\u00e1tu
6
no_hay_ninguna_capa_seleccionada=Nebyla vybr\u00e1na \u017e\u00e1dn\u00e1 vrstva
7
Vista=Pohled
0 8

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/config/text_fr.properties
1
#Translations for language [fr]
2
#Mon Feb 26 16:06:24 CET 2007
3
Centrar_la_Vista_sobre_un_punto=Centrer la vue sur un point
4
debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Vous devez s\u00e9lectionner les couches pour lesquelles vous souhaitez obtenir des informations.
5
formato_de_numero_incorrecto=Format incorrect
6
no_hay_ninguna_capa_seleccionada=
7
Vista=Vue
0 8

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/build.number
1
#Build Number for ANT. Do not edit!
2
#Thu Apr 19 17:16:38 CEST 2007
3
build.number=910
0 4

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/src/org/gvsig/examples/example1/preferences/CenterViewToPointPage.java
1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41

  
42
package org.gvsig.examples.example1.preferences;
43

  
44
import com.iver.andami.PluginServices;
45
import com.iver.andami.preferences.AbstractPreferencePage;
46
import com.iver.andami.preferences.StoreException;
47

  
48
import com.iver.cit.gvsig.gui.panels.ColorChooserPanel;
49

  
50
import com.iver.utiles.StringUtilities;
51

  
52
import org.gvsig.examples.example1.extension.CenterViewToPointExtension;
53

  
54
import java.awt.Color;
55

  
56
import java.util.prefs.Preferences;
57

  
58
import javax.swing.ImageIcon;
59
import javax.swing.JPanel;
60

  
61

  
62
/**
63
 * References page of center view to point options.
64
 *
65
 * @author Vicente Caballero Navarro
66
 */
67
public class CenterViewToPointPage extends AbstractPreferencePage {
68
    private static Preferences prefs = Preferences.userRoot().node("centerviewtopoint");
69
    private ColorChooserPanel colorPoint;
70
    private ImageIcon icon;
71

  
72
    public CenterViewToPointPage() {
73
        super();
74
        icon = new ImageIcon(this.getClass().getClassLoader().getResource("images/CenterView.png"));
75
        addComponent(PluginServices.getText(this, "color_point") + ":",
76
            colorPoint = new ColorChooserPanel());
77
    }
78

  
79
    /* (non-Javadoc)
80
     * @see com.iver.andami.preferences.IPreference#initializeValues()
81
     */
82
    public void initializeValues() {
83
        String colorString = prefs.get("colorcenterviewtopoint",
84
                StringUtilities.color2String(CenterViewToPointExtension.COLOR));
85
        Color color = StringUtilities.string2Color(colorString);
86
        CenterViewToPointExtension.COLOR = color;
87
        colorPoint.setColor(color);
88
        colorPoint.setAlpha(255);
89
    }
90

  
91
    /* (non-Javadoc)
92
     * @see com.iver.andami.preferences.IPreference#getID()
93
     */
94
    public String getID() {
95
        return this.getClass().getName();
96
    }
97

  
98
    /* (non-Javadoc)
99
     * @see com.iver.andami.preferences.IPreference#getTitle()
100
     */
101
    public String getTitle() {
102
        return PluginServices.getText(this, "Centrar_la_Vista_sobre_un_punto");
103
    }
104

  
105
    /* (non-Javadoc)
106
     * @see com.iver.andami.preferences.IPreference#getPanel()
107
     */
108
    public JPanel getPanel() {
109
        return this;
110
    }
111

  
112
    /* (non-Javadoc)
113
     * @see com.iver.andami.preferences.AbstractPreferencePage#storeValues()
114
     */
115
    public void storeValues() throws StoreException {
116
        String colorString;
117
        colorString = StringUtilities.color2String(colorPoint.getColor());
118
        prefs.put("colorcenterviewtopoint", colorString);
119
        CenterViewToPointExtension.COLOR = colorPoint.getColor();
120
    }
121

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

  
129
    /* (non-Javadoc)
130
     * @see com.iver.andami.preferences.IPreference#getIcon()
131
     */
132
    public ImageIcon getIcon() {
133
        return icon;
134
    }
135

  
136
    /* (non-Javadoc)
137
     * @see com.iver.andami.preferences.IPreference#isValueChanged()
138
     */
139
    public boolean isValueChanged() {
140
        return super.hasChanged();
141
    }
142

  
143
    /* (non-Javadoc)
144
     * @see com.iver.andami.preferences.AbstractPreferencePage#setChangesApplied()
145
     */
146
    public void setChangesApplied() {
147
        setChanged(false);
148
    }
149
}
0 150

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/src/org/gvsig/examples/example1/gui/InputCoordinatesPanel.java
1
/*
2
 * Created on 08-nov-2005
3
 *
4
 * gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
5
 *
6
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
7
 *
8
 * This program is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU General Public License
10
 * as published by the Free Software Foundation; either version 2
11
 * of the License, or (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
21
 *
22
 * For more information, contact:
23
 *
24
 *  Generalitat Valenciana
25
 *   Conselleria d'Infraestructures i Transport
26
 *   Av. Blasco Ib??ez, 50
27
 *   46010 VALENCIA
28
 *   SPAIN
29
 *
30
 *      +34 963862235
31
 *   gvsig@gva.es
32
 *      www.gvsig.gva.es
33
 *
34
 *    or
35
 *
36
 *   IVER T.I. S.A
37
 *   Salamanca 50
38
 *   46005 Valencia
39
 *   Spain
40
 *
41
 *   +34 963163400
42
 *   dac@iver.es
43
 */
44
package org.gvsig.examples.example1.gui;
45

  
46
import java.awt.Color;
47
import java.awt.Component;
48
import java.awt.event.ActionEvent;
49
import java.awt.event.ActionListener;
50
import java.awt.event.MouseEvent;
51
import java.awt.geom.Point2D;
52
import java.awt.geom.Rectangle2D;
53

  
54
import javax.swing.JDialog;
55
import javax.swing.JLabel;
56
import javax.swing.JOptionPane;
57
import javax.swing.JPanel;
58
import javax.swing.JTextField;
59

  
60
import org.cresques.cts.IProjection;
61
import org.gvsig.examples.example1.extension.CenterViewToPointExtension;
62
import org.gvsig.gui.beans.AcceptCancelPanel;
63

  
64
import com.iver.andami.PluginServices;
65
import com.iver.andami.ui.mdiManager.IWindow;
66
import com.iver.andami.ui.mdiManager.WindowInfo;
67
import com.iver.cit.gvsig.fmap.MapContext;
68
import com.iver.cit.gvsig.fmap.MapControl;
69
import com.iver.cit.gvsig.fmap.core.IGeometry;
70
import com.iver.cit.gvsig.fmap.core.ShapeFactory;
71
import com.iver.cit.gvsig.fmap.core.v02.FConstant;
72
import com.iver.cit.gvsig.fmap.core.v02.FSymbol;
73
import com.iver.cit.gvsig.fmap.layers.GraphicLayer;
74
import com.iver.cit.gvsig.fmap.rendering.FGraphic;
75
import com.iver.cit.gvsig.fmap.tools.BehaviorException;
76
import com.iver.cit.gvsig.fmap.tools.Events.PointEvent;
77
import com.iver.cit.gvsig.gui.panels.ColorChooserPanel;
78
import com.iver.cit.gvsig.project.documents.view.gui.View;
79
import com.iver.cit.gvsig.project.documents.view.toolListeners.InfoListener;
80
import javax.swing.JButton;
81

  
82

  
83
/**
84
 * The InputCoordinatesPanel class creates a JPanel where the
85
 * user can input the coordinates of the point of reference
86
 * for center the View.
87
 *
88
 * @author jmorell
89
 */
90
public class InputCoordinatesPanel extends JPanel implements IWindow {
91
    private static final long serialVersionUID = 1L;
92
    private JLabel labelX = null;
93
    private JTextField textX = null;
94
    private JLabel labelY = null;
95
    private JTextField textY = null;
96
    private MapControl mapControl;
97
    private WindowInfo viewInfo = null;
98
    private String firstCoordinate;
99
    private String secondCoordinate;
100
    private Point2D center;
101
    private GraphicLayer lyr;
102
    private ColorChooserPanel colorPanel;
103
	private AcceptCancelPanel okCancelPanel = null;
104
	private JButton bRemovePoint = null;
105
	private View view=null;
106
	/**
107
     * This is the default constructor
108
     */
109
    public InputCoordinatesPanel(View view) {
110
        super();
111
        this.view=view;
112
        this.mapControl = view.getMapControl();
113
        lyr=mapControl.getMapContext().getGraphicsLayer();
114
        initializeCoordinates();
115
        initialize();
116
    }
117

  
118
    private void initializeCoordinates() {
119
        IProjection proj = mapControl.getProjection();
120
        String projName = proj.getAbrev();
121
        if (projName.equals("EPSG:23030") || projName.equals("EPSG:27492") || projName.equals("EPSG:42101") || projName.equals("EPSG:42304")) {
122
            firstCoordinate = "X";
123
            secondCoordinate = "Y";
124
        } else if (projName.equals("EPSG:4230") || projName.equals("EPSG:4326")) {
125
            firstCoordinate = "Lon";
126
            secondCoordinate = "Lat";
127
        } else {
128
            System.out.println("Proyecci?n: " + projName);
129
            System.out.println("Proyecci?n no soportada.");
130
        }
131
    }
132

  
133
    private void zoomToCoordinates() throws Exception {
134
       try{
135
    	Rectangle2D oldExtent = mapControl.getViewPort().getAdjustedExtent();
136
        double oldCenterX = oldExtent.getCenterX();
137
        double oldCenterY = oldExtent.getCenterY();
138
        double centerX = (new Double((String)textX.getText())).doubleValue();
139
        double centerY = (new Double((String)textY.getText())).doubleValue();
140
        center=new Point2D.Double(centerX,centerY);
141
        double movX = centerX-oldCenterX;
142
        double movY = centerY-oldCenterY;
143
        double upperLeftCornerX = oldExtent.getMinX()+movX;
144
        double upperLeftCornerY = oldExtent.getMinY()+movY;
145
        double width = oldExtent.getWidth();
146
        double height = oldExtent.getHeight();
147
        Rectangle2D extent = new Rectangle2D.Double(upperLeftCornerX, upperLeftCornerY, width, height);
148
        mapControl.getViewPort().setExtent(extent);
149
       }catch (NumberFormatException e) {
150
    	   throw new Exception();
151
       }
152

  
153
    }
154

  
155
    /**
156
     * This method initializes this
157
     *
158
     * @return void
159
     */
160
    private void initialize() {
161
        labelY = new JLabel();
162
        labelY.setBounds(10, 35, 28, 20);
163
        labelY.setText(secondCoordinate + ":");
164
        labelX = new JLabel();
165
        labelX.setBounds(10, 10, 28, 20);
166
        labelX.setText(firstCoordinate + ":");
167
        this.setLayout(null);
168
        this.setSize(307, 111);
169
        this.add(labelX, null);
170
        this.add(getTextX(), null);
171
        this.add(labelY, null);
172
        this.add(getTextY(), null);
173
        this.add(getColorPanel());
174
        this.add(getOkCancelPanel(), null);
175
        this.add(getBRemovePoint(), null);
176
    }
177

  
178
    /**
179
     * This method initializes textX
180
     *
181
     * @return javax.swing.JTextField
182
     */
183
    private JTextField getTextX() {
184
    	if (textX == null) {
185
    		textX = new JTextField();
186
    		textX.setBounds(40, 10, 260, 20);
187
    		textX.addActionListener(new java.awt.event.ActionListener() {
188
    			public void actionPerformed(java.awt.event.ActionEvent e) {
189
    				textX.transferFocus();
190
    			}
191
    		});
192
    	}
193
    	return textX;
194
    }
195

  
196
    /**
197
     * This method initializes textY
198
     *
199
     * @return javax.swing.JTextField
200
     */
201
    private JTextField getTextY() {
202
    	if (textY == null) {
203
    		textY = new JTextField();
204
    		textY.setBounds(40, 35, 260, 20);
205
    		textY.addActionListener(new java.awt.event.ActionListener() {
206
    			public void actionPerformed(java.awt.event.ActionEvent e) {
207
    				textY.transferFocus();
208
    			}
209
    		});
210
    	}
211
    	return textY;
212
    }
213

  
214
    /* (non-Javadoc)
215
     * @see com.iver.andami.ui.mdiManager.View#getViewInfo()
216
     */
217
    public WindowInfo getWindowInfo() {
218
        if (viewInfo == null) {
219
            viewInfo=new WindowInfo(WindowInfo.MODALDIALOG);
220
            viewInfo.setTitle(PluginServices.getText(this,"Centrar_la_Vista_sobre_un_punto"));
221
            viewInfo.setWidth(this.getWidth()+8);
222
            viewInfo.setHeight(this.getHeight());
223
        }
224
        return viewInfo;
225
    }
226
    private void openInfo(){
227
    	InfoListener infoListener=new InfoListener(mapControl);
228
    	MouseEvent e=new MouseEvent((Component)view,MouseEvent.BUTTON1,MouseEvent.ACTION_EVENT_MASK,MouseEvent.MOUSE_CLICKED,500,400,1,true);
229
    	Point2D centerPixels=mapControl.getViewPort().fromMapPoint(center.getX(),center.getY());
230
    	PointEvent pe=new PointEvent(centerPixels,e);
231
    	try {
232
			infoListener.point(pe);
233
		} catch (BehaviorException e1) {
234
			e1.printStackTrace();
235
		}
236
		if (mapControl.getMapContext().getLayers().getActives().length==0){
237
			JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(),PluginServices.getText(this,"no_hay_ninguna_capa_seleccionada")+" \n"+
238
					PluginServices.getText(this,"debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion"));
239
		}
240
    }
241
    private void drawPoint(Color color){
242
    	CenterViewToPointExtension.COLOR=color;
243
    	lyr.clearAllGraphics();
244
    	FSymbol theSymbol = new FSymbol(FConstant.SYMBOL_TYPE_POINT,color);
245
        int idSymbol = lyr.addSymbol(theSymbol);
246
        IGeometry geom = ShapeFactory.createPoint2D(center.getX(),center.getY());
247
        FGraphic theGraphic = new FGraphic(geom, idSymbol);
248
        lyr.addGraphic(theGraphic);
249
        mapControl.drawGraphics();
250
	    mapControl.drawMap(false);
251

  
252
    }
253

  
254

  
255
	/**
256
	 * This method initializes jPanel
257
	 *
258
	 * @return javax.swing.JPanel
259
	 */
260
	private JPanel getColorPanel() {
261
		if (colorPanel==null){
262
		 	colorPanel=new ColorChooserPanel();
263
		 	colorPanel.setAlpha(250);
264
		 	colorPanel.setColor(CenterViewToPointExtension.COLOR);
265
		 	colorPanel.setBounds(new java.awt.Rectangle(40,59,123,24));
266
		}
267
		 	return colorPanel;
268
	}
269

  
270
	/**
271
	 * This method initializes okCancelPanel
272
	 *
273
	 * @return javax.swing.JPanel
274
	 */
275
	private AcceptCancelPanel getOkCancelPanel() {
276
		if (okCancelPanel == null) {
277
			ActionListener okAction, cancelAction;
278
			okAction = new java.awt.event.ActionListener() {
279
    			public void actionPerformed(java.awt.event.ActionEvent e) {
280
    				try{
281
    				zoomToCoordinates();
282
    				}catch (Exception e1) {
283
    					JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(),PluginServices.getText(this,"formato_de_numero_incorrecto"));
284
    					return;
285
    				}
286
    				// y sale.
287
                    if (PluginServices.getMainFrame() == null)
288
                        ((JDialog) (getParent().getParent().getParent().getParent())).dispose();
289
                    else
290
                        PluginServices.getMDIManager().closeWindow(InputCoordinatesPanel.this);
291

  
292
                    openInfo();
293
                    drawPoint(((ColorChooserPanel)getColorPanel()).getColor());
294
    			}
295
    		};
296
    		cancelAction = new ActionListener() {
297
				public void actionPerformed(ActionEvent e) {
298
					closeThis();
299
				}
300
    		};
301
			okCancelPanel = new AcceptCancelPanel(okAction, cancelAction);
302
			okCancelPanel.setBounds(new java.awt.Rectangle(40, 88, 260, 30));
303
		}
304
		return okCancelPanel;
305
	}
306

  
307
	private void closeThis() {
308
		PluginServices.getMDIManager().closeWindow(this);
309

  
310
	}
311

  
312
	/**
313
	 * This method initializes bRemovePoint
314
	 *
315
	 * @return javax.swing.JButton
316
	 */
317
	private JButton getBRemovePoint() {
318
		if (bRemovePoint == null) {
319
			bRemovePoint = new JButton();
320
			bRemovePoint.setBounds(new java.awt.Rectangle(181,59,101,25));
321
			bRemovePoint.setText(PluginServices.getText(this,"remove"));
322
			bRemovePoint.addActionListener(new java.awt.event.ActionListener() {
323
				public void actionPerformed(java.awt.event.ActionEvent e) {
324
					lyr.clearAllGraphics();
325
					mapControl.drawMap(false);
326
				}
327
			});
328
		}
329
		return bRemovePoint;
330
	}
331

  
332

  
333
}  //  @jve:decl-index=0:visual-constraint="103,18"
0 334

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/src/org/gvsig/examples/example1/toc/PropertiesTocMenuEntry.java
1

  
2
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
3
 *
4
 * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 *
20
 * For more information, contact:
21
 *
22
 *  Generalitat Valenciana
23
 *   Conselleria d'Infraestructures i Transport
24
 *   Av. Blasco Ib??ez, 50
25
 *   46010 VALENCIA
26
 *   SPAIN
27
 *
28
 *      +34 963862235
29
 *   gvsig@gva.es
30
 *      www.gvsig.gva.es
31
 *
32
 *    or
33
 *
34
 *   IVER T.I. S.A
35
 *   Salamanca 50
36
 *   46005 Valencia
37
 *   Spain
38
 *
39
 *   +34 963163400
40
 *   dac@iver.es
41
 */
42

  
43
package org.gvsig.examples.example1.toc;
44

  
45
import com.iver.andami.PluginServices;
46

  
47
import com.iver.cit.gvsig.fmap.layers.FLayer;
48
import com.iver.cit.gvsig.project.documents.view.gui.View;
49
import com.iver.cit.gvsig.project.documents.view.toc.AbstractTocContextMenuAction;
50
import com.iver.cit.gvsig.project.documents.view.toc.ITocItem;
51

  
52
import org.gvsig.examples.example1.gui.InputCoordinatesPanel;
53

  
54

  
55
/**
56
 * Properties toc menu entry center view to point.
57
 *
58
 * @author Vicente Caballero Navarro
59
 */
60
public class PropertiesTocMenuEntry extends AbstractTocContextMenuAction {
61
    /* (non-Javadoc)
62
     * @see com.iver.cit.gvsig.project.documents.IContextMenuAction#getGroup()
63
     */
64
    public String getGroup() {
65
        return "examplegroup";
66
    }
67

  
68
    /* (non-Javadoc)
69
     * @see com.iver.cit.gvsig.project.documents.IContextMenuAction#getGroupOrder()
70
     */
71
    public int getGroupOrder() {
72
        return 1;
73
    }
74

  
75
    /* (non-Javadoc)
76
     * @see com.iver.cit.gvsig.project.documents.IContextMenuAction#getOrder()
77
     */
78
    public int getOrder() {
79
        return 1;
80
    }
81

  
82
    /* (non-Javadoc)
83
     * @see com.iver.cit.gvsig.project.documents.IContextMenuAction#getText()
84
     */
85
    public String getText() {
86
        return PluginServices.getText(this, "Centrar_la_Vista_sobre_un_punto");
87
    }
88

  
89
    /* (non-Javadoc)
90
     * @see com.iver.cit.gvsig.project.documents.view.toc.AbstractTocContextMenuAction#isEnabled(com.iver.cit.gvsig.project.documents.view.toc.ITocItem, com.iver.cit.gvsig.fmap.layers.FLayer[])
91
     */
92
    public boolean isEnabled(ITocItem item, FLayer[] selectedItems) {
93
        return true;
94
    }
95

  
96
    /* (non-Javadoc)
97
     * @see com.iver.cit.gvsig.project.documents.view.toc.AbstractTocContextMenuAction#isVisible(com.iver.cit.gvsig.project.documents.view.toc.ITocItem, com.iver.cit.gvsig.fmap.layers.FLayer[])
98
     */
99
    public boolean isVisible(ITocItem item, FLayer[] selectedItems) {
100
        return (isTocItemBranch(item));
101
    }
102

  
103
    /* (non-Javadoc)
104
     * @see com.iver.cit.gvsig.project.documents.view.toc.AbstractTocContextMenuAction#execute(com.iver.cit.gvsig.project.documents.view.toc.ITocItem, com.iver.cit.gvsig.fmap.layers.FLayer[])
105
     */
106
    public void execute(ITocItem item, FLayer[] selectedItems) {
107
        View vista = (View) PluginServices.getMDIManager().getActiveWindow();
108
        InputCoordinatesPanel dataSelectionPanel = new InputCoordinatesPanel(vista);
109
        PluginServices.getMDIManager().addWindow(dataSelectionPanel);
110
    }
111
}
0 112

  
tags/tmp_build/examples/exaExampleCenterViewToPoint/src/org/gvsig/examples/example1/ExampleExtension.java
1

  
2
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
3
 *
4
 * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 *
20
 * For more information, contact:
21
 *
22
 *  Generalitat Valenciana
23
 *   Conselleria d'Infraestructures i Transport
24
 *   Av. Blasco Ib??ez, 50
25
 *   46010 VALENCIA
26
 *   SPAIN
27
 *
28
 *      +34 963862235
29
 *   gvsig@gva.es
30
 *      www.gvsig.gva.es
31
 *
32
 *    or
33
 *
34
 *   IVER T.I. S.A
35
 *   Salamanca 50
36
 *   46005 Valencia
37
 *   Spain
38
 *
39
 *   +34 963163400
40
 *   dac@iver.es
41
 */
42

  
43
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
44
 *
45
 * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
46
 *
47
 * This program is free software; you can redistribute it and/or
48
 * modify it under the terms of the GNU General Public License
49
 * as published by the Free Software Foundation; either version 2
50
 * of the License, or (at your option) any later version.
51
 *
52
 * This program is distributed in the hope that it will be useful,
53
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff