Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/.cvsignore
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/.cvsignore	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/.cvsignore	(revision 38319)
@@ -0,0 +1 @@
+bin-test
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/distribution/distribution.xml
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/distribution/distribution.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/distribution/distribution.xml	(revision 38319)
@@ -0,0 +1,42 @@
+<assembly>
+	<id>distribution</id>
+	<formats>
+		<format>dir</format>
+	</formats>
+	<fileSets>
+	<!-- Extructure for the extension -->
+		<fileSet>
+			<directory>config</directory>
+			<outputDirectory>${extension.install.dir.name}
+			</outputDirectory>
+		</fileSet>
+		<fileSet>
+			<directory>images</directory>
+			<outputDirectory>/${extension.install.dir.name}/images
+			</outputDirectory>
+		</fileSet>
+	</fileSets>
+    <files>
+        <file>
+            <source>package.info</source>
+            <outputDirectory>${extension.install.dir.name}
+            </outputDirectory>
+        </file>
+    </files>
+	<!--
+		***********************************************************************
+	-->
+  <!-- *													   *-->
+	<!--
+		***********************************************************************
+	-->
+	<dependencySets>
+		<dependencySet>
+			<outputDirectory>${extension.install.dir.name}/${library-dir}
+			</outputDirectory>
+			<includes>
+				<include>org.gvsig:org.gvsig.centerviewpoint</include>
+			</includes>
+		</dependencySet>
+	</dependencySets>
+</assembly>
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/buildNumber.properties
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/buildNumber.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/buildNumber.properties	(revision 38319)
@@ -0,0 +1,3 @@
+#maven.buildNumber.plugin properties file
+#Tue May 29 16:41:12 CEST 2012
+buildNumber=2047
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/src-test/org/gvsig/centerviewpoint/AllTests.java
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/src-test/org/gvsig/centerviewpoint/AllTests.java	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/src-test/org/gvsig/centerviewpoint/AllTests.java	(revision 38319)
@@ -0,0 +1,17 @@
+package org.gvsig.centerviewpoint;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests {
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(
+				"Test for com.iver.gvsig.centerviewpoint");
+		//$JUnit-BEGIN$
+
+		//$JUnit-END$
+		return suite;
+	}
+
+}
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text.properties
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text.properties	(revision 38319)
@@ -0,0 +1,7 @@
+#Translations for language [es]
+#Mon Oct 30 09:38:21 CET 2006
+Centrar_la_Vista_sobre_un_punto=Centrar la vista sobre un punto
+debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Debe seleccionar las capas de las que quiera obtener informaci\u00f3n.
+formato_de_numero_incorrecto=Formato de n\u00famero incorrecto.
+no_hay_ninguna_capa_seleccionada=No hay ninguna capa seleccionada
+Vista=Vista
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_zh.properties
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_zh.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_zh.properties	(revision 38319)
@@ -0,0 +1,7 @@
+#Translations for language [en]
+#Fri Nov 03 13:14:56 CET 2006
+Centrar_la_Vista_sobre_un_punto=\u5411\u4e00\u70b9\u96c6\u4e2d
+debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=\u60a8\u5fc5\u987b\u9009\u5b9a\u60a8\u8981\u8bfb\u53d6\u4fe1\u606f\u7684\u56fe\u5c42
+formato_de_numero_incorrecto=\u6570\u5b57\u683c\u5f0f\u65e0\u6548
+no_hay_ninguna_capa_seleccionada=\u672a\u9009\u5b9a\u56fe\u5c42
+Vista=\u89c6\u56fe
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_en.properties
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_en.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_en.properties	(revision 38319)
@@ -0,0 +1,7 @@
+#Translations for language [en]
+#Mon Oct 30 09:38:21 CET 2006
+Centrar_la_Vista_sobre_un_punto=Center view to point
+debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Select the layers you want to get information from
+formato_de_numero_incorrecto=Incorrect number format
+no_hay_ninguna_capa_seleccionada=No layer has been selected
+Vista=View
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_gl.properties
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_gl.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_gl.properties	(revision 38319)
@@ -0,0 +1,7 @@
+#Translations for language [gl]
+#Mon Oct 30 09:38:21 CET 2006
+Centrar_la_Vista_sobre_un_punto=Centrar a vista sobre un punto
+debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Debe seleccionar as capas das que desexe obter informaci\u00f3n
+formato_de_numero_incorrecto=
+no_hay_ninguna_capa_seleccionada=
+Vista=Vista
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_ca.properties
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_ca.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_ca.properties	(revision 38319)
@@ -0,0 +1,7 @@
+#Translations for language [ca]
+#Mon Oct 30 09:38:21 CET 2006
+Centrar_la_Vista_sobre_un_punto=Centrar la Vista sobre un punt
+debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Ha de seleccionar les capes de les quals vol obtindre informaci\u00f3
+formato_de_numero_incorrecto=Format de n\u00famero incorrecte
+no_hay_ninguna_capa_seleccionada=
+Vista=Vista
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_pt.properties
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_pt.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_pt.properties	(revision 38319)
@@ -0,0 +1,7 @@
+#Translations for language [pt]
+#Mon Oct 30 09:38:21 CET 2006
+Centrar_la_Vista_sobre_un_punto=
+debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=
+formato_de_numero_incorrecto=
+no_hay_ninguna_capa_seleccionada=
+Vista=Vista
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/config.xml
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/config.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/config.xml	(revision 38319)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<plugin-config>
+	<libraries library-dir="lib"/>
+	<depends plugin-name="org.gvsig.app"/>
+		<resourceBundle name="text"/>
+	<extensions>
+		<extension class-name="org.gvsig.centerviewpoint.CenterViewToPointExtension"
+			description="CenterViewToPoint 0.1RC1  Extensión que permite hacer zooms en función de un par de coordenadas introducidas por el usuario."
+			active="true">
+			<menu text="Vista/Centrar_la_Vista_sobre_un_punto" tooltip="Centrar_la_Vista_sobre_un_punto" 
+				action-command="CENTERVIEWTOPOINT" 
+				icon="view-center-to-point" />
+			<tool-bar name="Herramientas">
+				<action-tool icon="view-center-to-point"
+					action-command="CENTERVIEWTOPOINT" tooltip="Centrar_la_Vista_sobre_un_punto"
+					enable-text="debería de estar activada" last="true"/>
+			</tool-bar>
+		</extension>
+	</extensions>
+</plugin-config>
\ No newline at end of file
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_cs.properties
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_cs.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_cs.properties	(revision 38319)
@@ -0,0 +1,7 @@
+#Translations for language [cs]
+#Mon Nov 06 09:04:31 CET 2006
+Centrar_la_Vista_sobre_un_punto=Centruj pohled na st\u0159ed
+debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Ozna\u010dte vrstvy, ze kter\u00fdch chcete z\u00edskat informace
+formato_de_numero_incorrecto=Neplatn\u00e9 \u010d\u00edslo form\u00e1tu
+no_hay_ninguna_capa_seleccionada=Nebyla vybr\u00e1na \u017e\u00e1dn\u00e1 vrstva
+Vista=Pohled
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_fr.properties
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_fr.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_fr.properties	(revision 38319)
@@ -0,0 +1,7 @@
+#Translations for language [fr]
+#Mon Oct 30 09:38:21 CET 2006
+Centrar_la_Vista_sobre_un_punto=Centrer la vue sur un point
+debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Vous devez s\u00e9lectionner les couches pour lesquelles vous souhaitez obtenir des informations.
+formato_de_numero_incorrecto=Format incorrect
+no_hay_ninguna_capa_seleccionada=
+Vista=Vue
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_de.properties
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_de.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_de.properties	(revision 38319)
@@ -0,0 +1,8 @@
+#Translations for language [de]
+#Wed Oct 08 17:44:19 CEST 2008
+Centrar_la_Vista_sobre_un_punto=View auf Koordinate zentrieren
+com.iver.cit.gvsig.Herramientas=
+debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=W\u00e4hlen Sie die Ebenen aus, von denen Sie Informationen bekommen wollen
+formato_de_numero_incorrecto=Ung\u00fcltiges Zahlenformat
+no_hay_ninguna_capa_seleccionada=Es wurde kein Layer ausgew\u00e4hlt
+Vista=Ansicht
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_eu.properties
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_eu.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_eu.properties	(revision 38319)
@@ -0,0 +1,7 @@
+#Translations for language [eu]
+#Mon Oct 30 09:38:21 CET 2006
+Centrar_la_Vista_sobre_un_punto=Zentratu bista puntu batekiko
+debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Geruzak hautatu behar dituzu horien gaineko informazioa jasotzeko.
+formato_de_numero_incorrecto=Zenbakiaren formatua okerra da
+no_hay_ninguna_capa_seleccionada=
+Vista=Bista
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_it.properties
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_it.properties	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/config/text_it.properties	(revision 38319)
@@ -0,0 +1,7 @@
+#Translations for language [it]
+#Tue Nov 07 12:30:01 CET 2006
+Centrar_la_Vista_sobre_un_punto=Centra la visuale su un punto
+debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion=Selezionare i layers di cui si desiderano informazioni.
+formato_de_numero_incorrecto=Formato del numero errato.
+no_hay_ninguna_capa_seleccionada=Nessun layer selezionato
+Vista=Vista
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/doc/gpl.txt
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/doc/gpl.txt	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/doc/gpl.txt	(revision 38319)
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/doc/install.txt
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/doc/install.txt	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/doc/install.txt	(revision 38319)
@@ -0,0 +1,5 @@
+Plugin de Centrado de la Vista sobre un punto para gvSIG. Instrucciones de instalación
+
+- Copiar el contenido de la carpeta bin/ en:
+  gvSIG/extensiones/
+
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/doc/version_history.txt
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/doc/version_history.txt	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/doc/version_history.txt	(revision 38319)
@@ -0,0 +1,11 @@
+Center View to point Plugin for gvSIG. Version history
+
+This document lists the Change History of release versions of the Center View to point
+Plugin for gvSIG
+
+
+Version 0.1
+Release Date: 16-11-2005
+
+- Baseline version
+
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/images/centerviewtopoint.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/images/centerviewtopoint.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/src/org/gvsig/centerviewpoint/gui/InputCoordinatesPanel.java
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/src/org/gvsig/centerviewpoint/gui/InputCoordinatesPanel.java	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/src/org/gvsig/centerviewpoint/gui/InputCoordinatesPanel.java	(revision 38319)
@@ -0,0 +1,361 @@
+/*
+ * Created on 08-nov-2005
+ *
+ * gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.centerviewpoint.gui;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
+import java.awt.geom.Point2D;
+import java.util.prefs.Preferences;
+
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import org.cresques.cts.IProjection;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.app.gui.panels.ColorChooserPanel;
+import org.gvsig.app.project.documents.view.toolListeners.InfoListener;
+import org.gvsig.centerviewpoint.CenterViewToPointExtension;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.SUBTYPES;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
+import org.gvsig.fmap.geom.primitive.Envelope;
+import org.gvsig.fmap.geom.primitive.Point;
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontext.MapContextLocator;
+import org.gvsig.fmap.mapcontext.MapContextManager;
+import org.gvsig.fmap.mapcontext.layers.vectorial.GraphicLayer;
+import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
+import org.gvsig.fmap.mapcontrol.MapControl;
+import org.gvsig.fmap.mapcontrol.tools.Events.PointEvent;
+import org.gvsig.gui.beans.AcceptCancelPanel;
+
+
+/**
+ * The InputCoordinatesPanel class creates a JPanel where the
+ * user can input the coordinates of the point of reference
+ * for center the View.
+ *
+ * @author jmorell
+ */
+public class InputCoordinatesPanel extends JPanel implements IWindow {
+    private static final long serialVersionUID = 1L;
+    private JLabel labelX = null;
+    private JTextField textX = null;
+    private JLabel labelY = null;
+    private JTextField textY = null;
+    private MapControl mapControl;
+    private WindowInfo viewInfo = null;
+    private String firstCoordinate;
+    private String secondCoordinate;
+    private Point2D center;
+    private GraphicLayer lyr;
+    private ColorChooserPanel colorPanel;
+	private AcceptCancelPanel okCancelPanel = null;
+	
+	MapContextManager mapContextManager = MapContextLocator
+			.getMapContextManager();
+	
+    private static final Logger LOG = LoggerFactory
+        .getLogger(InputCoordinatesPanel.class);
+
+	/**
+     * This is the default constructor
+     */
+    public InputCoordinatesPanel(MapContext mapContext) {
+        super();
+        this.mapControl = new MapControl();
+        mapControl.setMapContext(mapContext);
+        lyr=mapControl.getMapContext().getGraphicsLayer();
+        initializeCoordinates();
+        initialize();
+    }
+
+    /**
+     * Sets the proper text for the first and second coordinate labels,
+     * depending on the kind of selected projection.
+     *
+     */
+    private void initializeCoordinates() {
+        IProjection proj = mapControl.getProjection();
+        if (proj.isProjected()) {
+            firstCoordinate = "X";
+            secondCoordinate = "Y";
+        } else {
+            firstCoordinate = "Lon";
+            secondCoordinate = "Lat";
+        }
+    }
+
+    /**
+     * Move the view's extent so that the specified point gets
+     * centered.
+     *
+     * @throws Exception
+     */
+    private void zoomToCoordinates() throws Exception {
+       try{
+    	Envelope oldExtent = mapControl.getViewPort().getAdjustedExtent();
+        double oldCenterX = oldExtent.getCenter(0);
+        double oldCenterY = oldExtent.getCenter(1);
+        double centerX = (new Double((String)textX.getText())).doubleValue();
+        double centerY = (new Double((String)textY.getText())).doubleValue();
+        center=new Point2D.Double(centerX,centerY);
+        double movX = centerX-oldCenterX;
+        double movY = centerY-oldCenterY;
+        double upperLeftCornerX = oldExtent.getMinimum(0)+movX;
+        double upperLeftCornerY = oldExtent.getMinimum(1)+movY;
+        double maxX = oldExtent.getMaximum(0);
+        double maxY = oldExtent.getMaximum(1);
+        Envelope extent = GeometryLocator.getGeometryManager().createEnvelope(upperLeftCornerX, upperLeftCornerY, maxX, maxY, SUBTYPES.GEOM2D);
+        mapControl.getViewPort().setEnvelope(extent);
+       }catch (NumberFormatException e) {
+    	   throw new Exception();
+       }
+
+    }
+
+    /**
+     * This method initializes this
+     *
+     * @return void
+     */
+    private void initialize() {
+        labelY = new JLabel();
+        labelY.setBounds(10, 35, 28, 20);
+        labelY.setText(secondCoordinate + ":");
+        labelX = new JLabel();
+        labelX.setBounds(10, 10, 28, 20);
+        labelX.setText(firstCoordinate + ":");
+        this.setLayout(null);
+        this.setSize(307, 100);
+        this.add(labelX, null);
+        this.add(getTextX(), null);
+        this.add(labelY, null);
+        this.add(getTextY(), null);
+        this.add(getColorPanel());
+        this.add(getOkCancelPanel(), null);
+    }
+
+    /**
+     * This method initializes textX
+     *
+     * @return javax.swing.JTextField
+     */
+    private JTextField getTextX() {
+    	if (textX == null) {
+    		textX = new JTextField();
+    		textX.setBounds(40, 10, 260, 20);
+    		textX.addActionListener(new java.awt.event.ActionListener() {
+    			public void actionPerformed(java.awt.event.ActionEvent e) {
+    				textX.transferFocus();
+    			}
+    		});
+    	}
+    	return textX;
+    }
+
+    /**
+     * This method initializes textY
+     *
+     * @return javax.swing.JTextField
+     */
+    private JTextField getTextY() {
+    	if (textY == null) {
+    		textY = new JTextField();
+    		textY.setBounds(40, 35, 260, 20);
+    		textY.addActionListener(new java.awt.event.ActionListener() {
+    			public void actionPerformed(java.awt.event.ActionEvent e) {
+    				textY.transferFocus();
+    			}
+    		});
+    	}
+    	return textY;
+    }
+
+    /* (non-Javadoc)
+     * @see com.iver.andami.ui.mdiManager.View#getViewInfo()
+     */
+    public WindowInfo getWindowInfo() {
+        // TODO Auto-generated method stub
+        if (viewInfo == null) {
+            viewInfo=new WindowInfo(WindowInfo.MODALDIALOG);
+            viewInfo.setTitle(PluginServices.getText(this,"Centrar_la_Vista_sobre_un_punto"));
+            viewInfo.setWidth(this.getWidth()+8);
+            viewInfo.setHeight(this.getHeight());
+        }
+        return viewInfo;
+    }
+    /**
+     * Opens the infoByPoint dialog for the selected point.
+     *
+     */
+    private void openInfo(){
+    	InfoListener infoListener=new InfoListener(mapControl);
+    	MouseEvent e=new MouseEvent((Component)(((CenterViewToPointExtension)PluginServices.getExtension(CenterViewToPointExtension.class)).getView()),MouseEvent.BUTTON1,MouseEvent.ACTION_EVENT_MASK,MouseEvent.MOUSE_CLICKED,500,400,1,true);
+    	Point2D centerPixels=mapControl.getViewPort().fromMapPoint(center.getX(),center.getY());
+    	PointEvent pe=new PointEvent(centerPixels,e,mapControl);
+    	try {
+			infoListener.point(pe);
+		} catch (org.gvsig.fmap.mapcontrol.tools.BehaviorException e1) {
+			// TODO Auto-generated catch block
+			e1.printStackTrace();
+		}
+		if (mapControl.getMapContext().getLayers().getActives().length==0){
+			JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(),PluginServices.getText(this,"no_hay_ninguna_capa_seleccionada")+" \n"+
+					PluginServices.getText(this,"debe_seleccionar_las_capas_de_las_que_quiera_obtener_informacion"));
+		}
+    }
+
+    /**
+     * Draws the selected point on the view.
+     *
+     * @param color
+     */
+    private void drawPoint(Color color){
+    	CenterViewToPointExtension.COLOR=color;
+    	lyr.clearAllGraphics();
+		ISymbol theSymbol =
+				mapContextManager.getSymbolManager().createSymbol(
+				Geometry.TYPES.POINT, color);
+        int idSymbol = lyr.addSymbol(theSymbol);
+        GeometryManager geomManager = GeometryLocator.getGeometryManager();
+//        org.gvsig.fmap.geom.Geometry geom = geomManager.create(center.getX(),center.getY());
+        Point geom = null;
+		try {
+			geom = (Point)geomManager.create(TYPES.POINT, SUBTYPES.GEOM2D);
+			geom.setX(center.getX());
+			geom.setY(center.getY());
+		} catch (org.gvsig.fmap.geom.exception.CreateGeometryException e) {
+            LOG.error("Error creating a point geometry", e);
+		}
+//        FGraphic theGraphic = new FGraphic(geom, idSymbol);
+//        lyr.addGraphic(theGraphic);
+        lyr.addGraphic(geom, idSymbol);
+        mapControl.drawGraphics();
+
+    }
+
+
+	/**
+	 * This method initializes jPanel
+	 *
+	 * @return javax.swing.JPanel
+	 */
+	private JPanel getColorPanel() {
+		if (colorPanel==null){
+		 	colorPanel=new ColorChooserPanel();
+		 	colorPanel.setAlpha(250);
+		 	colorPanel.setColor(CenterViewToPointExtension.COLOR);
+		 	colorPanel.setBounds(new java.awt.Rectangle(40,59,123,24));
+		}
+		 	return colorPanel;
+	}
+
+	/**
+	 * This method initializes okCancelPanel
+	 *
+	 * @return javax.swing.JPanel
+	 */
+	private AcceptCancelPanel getOkCancelPanel() {
+		if (okCancelPanel == null) {
+			ActionListener okAction, cancelAction;
+			okAction = new java.awt.event.ActionListener() {
+    			public void actionPerformed(java.awt.event.ActionEvent e) {
+    				try{
+    				zoomToCoordinates();
+    				}catch (Exception e1) {
+    					JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(),PluginServices.getText(this,"formato_de_numero_incorrecto"));
+    					return;
+    				}
+    				// y sale.
+                    if (PluginServices.getMainFrame() == null)
+                        ((JDialog) (getParent().getParent().getParent().getParent())).dispose();
+                    else
+                        PluginServices.getMDIManager().closeWindow(InputCoordinatesPanel.this);
+                    Preferences prefs = Preferences.userRoot().node( "gvsig.centerViewToPoint" );
+                    if( prefs.get("showInfo", "True").equalsIgnoreCase("True")){
+                    	openInfo();
+                    }
+                    drawPoint(((ColorChooserPanel)getColorPanel()).getColor());
+    			}
+    		};
+    		cancelAction = new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					closeThis();
+				}
+    		};
+			okCancelPanel = new AcceptCancelPanel(okAction, cancelAction);
+			okCancelPanel.setBounds(new java.awt.Rectangle(40, 88, 260, 30));
+		}
+		return okCancelPanel;
+	}
+
+	/**
+	 * Close the window.
+	 *
+	 */
+	private void closeThis() {
+		PluginServices.getMDIManager().closeWindow(this);
+
+	}
+
+	public Object getWindowProfile() {
+		return WindowInfo.DIALOG_PROFILE;
+	}
+
+
+}  //  @jve:decl-index=0:visual-constraint="103,18"
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/src/org/gvsig/centerviewpoint/CenterViewToPointExtension.java
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/src/org/gvsig/centerviewpoint/CenterViewToPointExtension.java	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/src/org/gvsig/centerviewpoint/CenterViewToPointExtension.java	(revision 38319)
@@ -0,0 +1,134 @@
+/*
+ * Created on 22-jun-2005
+ *
+ * gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ibáñez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.centerviewpoint;
+
+import java.awt.Color;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.app.project.documents.view.ViewDocument;
+import org.gvsig.app.project.documents.view.gui.DefaultViewPanel;
+import org.gvsig.centerviewpoint.gui.InputCoordinatesPanel;
+import org.gvsig.fmap.mapcontext.MapContext;
+import org.gvsig.fmap.mapcontext.layers.FLayers;
+
+
+/**
+ * The CenterViewToPointExtension class allows to center the View over a
+ * concrete point given by its coordinates.
+ *
+ * @author jmorell
+ */
+public class CenterViewToPointExtension extends Extension {
+	private DefaultViewPanel vista;
+	public static Color COLOR=Color.red;
+    /* (non-Javadoc)
+     * @see com.iver.andami.plugins.Extension#inicializar()
+     */
+    public void initialize() {
+        // TODO Auto-generated method stub
+    	PluginServices.getIconTheme().registerDefault(
+				"view-center-to-point",
+				this.getClass().getClassLoader().getResource("images/centerviewtopoint.png")
+			);
+    }
+
+    /* (non-Javadoc)
+     * @see com.iver.andami.plugins.Extension#execute(java.lang.String)
+     */
+    public void execute(String actionCommand) {
+		vista = (DefaultViewPanel)PluginServices.getMDIManager().getActiveWindow();
+        MapContext mapContext = vista.getModel().getMapContext();
+        InputCoordinatesPanel dataSelectionPanel = new InputCoordinatesPanel(mapContext);
+        //dataSelectionPanel.setColor(color);
+		PluginServices.getMDIManager().addWindow(dataSelectionPanel);
+    }
+
+    public DefaultViewPanel getView(){
+    	return vista;
+    }
+    /* (non-Javadoc)
+     * @see com.iver.andami.plugins.Extension#isEnabled()
+     */
+    public boolean isEnabled() {
+		org.gvsig.andami.ui.mdiManager.IWindow f = PluginServices.getMDIManager()
+		 .getActiveWindow();
+		if (f == null) {
+		    return false;
+		}
+		if (f.getClass() == DefaultViewPanel.class) {
+		    DefaultViewPanel vista = (DefaultViewPanel) f;
+		    ViewDocument model = vista.getModel();
+		    MapContext mapa = model.getMapContext();
+		    FLayers layers = mapa.getLayers();
+		    for (int i=0;i < layers.getLayersCount();i++) {
+               if (layers.getLayer(i).isAvailable()) return true;
+		    }
+		}
+		return false;
+
+    }
+
+    /* (non-Javadoc)
+     * @see com.iver.andami.plugins.Extension#isVisible()
+     */
+    public boolean isVisible() {
+		org.gvsig.andami.ui.mdiManager.IWindow f = PluginServices.getMDIManager()
+		 .getActiveWindow();
+		if (f == null) {
+		    return false;
+		}
+		if (f.getClass() == DefaultViewPanel.class) {
+		    DefaultViewPanel vista = (DefaultViewPanel) f;
+		    ViewDocument model = vista.getModel();
+		    MapContext mapa = model.getMapContext();
+            if (mapa.getLayers().getLayersCount() > 0) {
+                return true;
+            }
+            return false;
+        }
+		return false;
+	}
+
+}
Index: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/pom.xml
===================================================================
--- tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/pom.xml	(revision 0)
+++ tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint/pom.xml	(revision 38319)
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.centerviewpoint</artifactId>
+	<name>Tools: Center view to point</name>
+	<version>2.0-SNAPSHOT</version>
+	<parent>
+		<artifactId>gvsig-base-extension-pom</artifactId>
+		<groupId>org.gvsig</groupId>
+		<version>2.0-SNAPSHOT</version>
+	</parent>	
+	<description>Tool to center view to point</description>
+	<build>
+		<sourceDirectory>src</sourceDirectory>
+		<testSourceDirectory>src-test</testSourceDirectory>
+        <plugins>
+            <!-- TODO: MAKE TESTS WORK AND REMOVE THIS OPTION -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skipTests>true</skipTests>
+                </configuration>
+            </plugin>       
+        </plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.app</artifactId>
+			<version>2.0-SNAPSHOT</version>
+            <scope>compile</scope>
+		</dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.andami</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.control</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.ui</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+            <scope>compile</scope>
+        </dependency>        
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+	</dependencies>
+
+	<properties>
+		<build-dir>${basedir}/../build</build-dir>
+        <eclipse.project.name>extCenterViewToPoint</eclipse.project.name>
+    	<package.info.dependencies>required: org.gvsig.app -ge 2</package.info.dependencies>
+    	<package.info.state>alpha5</package.info.state>
+        <package.info.categories>Vector, View</package.info.categories>
+	</properties>
+</project>
\ No newline at end of file

Property changes on: tags/v2_0_0_Build_2047/extensions/extCenterViewToPoint/extCenterViewToPoint
___________________________________________________________________
Added: svn:ignore
   + .classpath 
.project 
.settings 
maven-eclipse.xml
target
bin
hs_err_pid*
.externalToolBuilders
.settings
.classpath
.project
package.info


