Revision 32692

View differences:

trunk/extensions/org.gvsig.chartlegend/.project
1
<?xml version="1.0" encoding="UTF-8"?>
2
<projectDescription>
3
	<name>org.gvsig.chartlegend</name>
4
	<comment>This is the plugin that contains the chart symbols and legends</comment>
5
	<projects>
6
		<project>_fwAndami</project>
7
		<project>appgvSIG</project>
8
		<project>org.gvsig.chartlegend.api</project>
9
		<project>org.gvsig.chartlegend.impl</project>
10
		<project>libCompat</project>
11
		<project>libCorePlugin</project>
12
		<project>libDXF</project>
13
		<project>libFMap_controls</project>
14
		<project>libFMap_dal</project>
15
		<project>libFMap_dalfile</project>
16
		<project>libFMap_dalindex</project>
17
		<project>libFMap_geometries</project>
18
		<project>libFMap_mapcontext</project>
19
		<project>libInternationalization</project>
20
		<project>libMetadata</project>
21
		<project>libProjection</project>
22
		<project>libRaster</project>
23
		<project>org.gvsig.symbology</project>
24
		<project>libTools</project>
25
		<project>libEvaluator_SQLJEP</project>
26
		<project>libUIComponent</project>
27
		<project>libIverUtiles</project>
28
	</projects>
29
	<buildSpec>
30
		<buildCommand>
31
			<name>org.eclipse.jdt.core.javabuilder</name>
32
			<arguments>
33
			</arguments>
34
		</buildCommand>
35
	</buildSpec>
36
	<natures>
37
		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
38
		<nature>org.eclipse.jdt.core.javanature</nature>
39
		<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
40
	</natures>
41
</projectDescription>
trunk/extensions/org.gvsig.chartlegend/config/text_en.properties
1
# Resource bundle texts for the English language locale (en)
2
active_limits=Active limits
3
pie_legend=Pie Legend
4
draw_pie_chart_for_each_feature=Draw pie chart for each feature
5
color=Color
6
field=Field
7
fields=fields
8
color_schema=Color schema
9
background_symbol=Background symbol
10
size=Size
11
preview_chart=Preview chart
12
outline=Outline
13
dimension=Dimension
14
show=Show
15
width=Width
16
display_3d=Display 3D
17
generating_pie_legend=Generating pie legend
18
recovering_fields=Recovering fields
19
normalize=Normalize
20
limits=Limits
21
units=Units
22
fixed_size=Fixed size
23
sum_field_values_size=Sum of field values
24
field_size=Field size
25
from=From
26
to=To
27
configure_size=Configure size
28
only_selection=Draw only selection
29
label=Label
30

  
31
draw_bar_chart_for_each_feature=Draw bar chart for each feature
32
bar_legend=Bar legend
33
chart_legend=Chart Legend
34
error_in_save_image=Error in save image.
35
exportar_a_imagen=Export to image
trunk/extensions/org.gvsig.chartlegend/config/config.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<plugin-config>
3
	<libraries library-dir="."/>
4
	<depends plugin-name="com.iver.cit.gvsig"/>
5
	<resourceBundle name="text"/>
6
	<extensions>
7
		<extension class-name="org.gvsig.chartlegend.ChartExtension"
8
			description="Extensi?n que a?ade los simbolos y leyendas de diagramas."
9
			active="true">
10
		</extension>
11
		<extension class-name="org.gvsig.table.TableToImageExtension"
12
			description="Convertir una tabla en imagen."
13
			active="true">
14
			<menu text="Tabla/exportar_a_imagen"
15
				tooltip="exportar_a_imagen"
16
				action-command="TABLE_TO_IMAGE" icon="images/table_go.png"/>
17
			<tool-bar name="Herramientas">
18
				<action-tool icon="images/table_go.png" tooltip="exportar_a_imagen"
19
					action-command="TABLE_TO_IMAGE" />									
20
			</tool-bar>
21
		</extension>
22
	</extensions>
23
</plugin-config>
trunk/extensions/org.gvsig.chartlegend/config/text_de.properties
1
#text_de.properties
2
active_limits=Grenze definieren
3
background_symbol=Hintergrund-Symbol
4
color=Farbe
5
color_schema=Farbschema
6
configure_size=Gr\u00F6\u00DFe anpassen
7
dimension=Darstellung
8
display_3d=3D- Anzeige
9
draw_pie_chart_for_each_feature=Kreisdiagramm f\u00FCr jedes Feature wird generiert
10
field=Feld
11
field_size=Feldgr\u00F6\u00DFe
12
fields=Felder
13
fixed_size=Feste Gr\u00F6\u00DFe
14
from=von
15
generating_pie_legend=Kreisdiagramm wird generiert
16
limits=Grenzen
17
normalize=Normalisierung
18
outline=Aussenlinie
19
pie_legend=Kreisdiagramm
20
preview_chart=Vorschau Diagramm
21
recovering_fields=Felder wiederherstellen
22
show=anzeigen
23
size=Gr\u00F6\u00DFe
24
sum_field_values_size=Summe der Feldwerte
25
to=bis
26
units=Einheiten
27
width=Breite
28
only_selection=Auswahl wird gezeichnet
29
label=Label
30

  
31
draw_bar_chart_for_each_feature=Balkendiagramm f?r jedes Feature generieren
32
bar_legend=Balkendiagramm
33
chart_legend=Diagramme
34
error_in_save_image=
35
exportar_a_imagen=
trunk/extensions/org.gvsig.chartlegend/config/text.properties
1
# Resource bundle texts for the Spanish language locale (es)
2
active_limits=Activar l?mites
3
pie_legend=Leyenda de tartas
4
draw_pie_chart_for_each_feature=Dibuja una tarta por cada registro
5
color=Color
6
field=Campo
7
fields=Campos
8
color_schema=Esquema de color
9
background_symbol=S?mbolo de fondo
10
size=Tama?o
11
preview_chart=Vista diagrama
12
outline=L?nea del borde
13
dimension=Dimensi?n
14
show=Mostrar
15
width=Ancho
16
display_3d=Mostrar 3D
17
generating_pie_legend=Generando leyenda de tartas
18
recovering_fields=Recuperando campos
19
normalize=Normalizaci?n
20
limits=L?mites
21
units=Unidades
22
fixed_size=Tama?o fijo
23
sum_field_values_size=Sumatorio de los campos
24
field_size=Por campo
25
from=Desde
26
to=Hasta
27
configure_size=Configuraci?n del tama?o
28
only_selection=Dibujar solo la selecci?n
29
label=Etiqueta
30

  
31
draw_bar_chart_for_each_feature=Dibuja un diagrama de barras por cada registro
32
bar_legend=Leyenda de barras
33
chart_legend=Leyenda de diagramas
34
error_in_save_image=Error al guardar la imagen.
35
exportar_a_imagen=Exportar a imagen
trunk/extensions/org.gvsig.chartlegend/build.number
1
#Build Number for ANT. Do not edit!
2
#Wed Mar 17 12:06:38 CET 2010
3
build.number=8
trunk/extensions/org.gvsig.chartlegend/install/build.properties
1
#SUSTITUIR POR EL DIRECTORIO DE EXTENSION, ej: com.iver.aytovalencia.visor1
2
MAIN_INSTALL_PLUGIN=org.gvsig.chartlegend
3

  
4
#VERIFICAR LOS NUMEROS DE VERSION
5
EXTENSIONS=com.iver.cit.gvsig,${MAIN_INSTALL_PLUGIN}
6
version=1.9
7
bversion=1_9
8
gvSIG.version=1_9_0
9

  
10
#SUSTITUIR POR EL NOMBRE DE PLUGIN, ej: visorRuido
11
APPNAME=ChartLegend
12

  
13

  
14
#SUSTITUIR POR EL DIRECTORIO DE SALIDA, ej: /tmp/myExtension
15
OUTPUT_DIR= /tmp/extChartLegend
trunk/extensions/org.gvsig.chartlegend/install/resources/userInputLang.xml_por
1
<langpack>
2
  <str id="text.label" txt="Path to gvSIG:"/>
3
</langpack>
trunk/extensions/org.gvsig.chartlegend/install/resources/gpl.txt
1
	GNU GENERAL PUBLIC LICENSE
2
	Version 2, June 1991
3

  
4
	 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.
5

  
6
		Preamble
7

  
8
	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.
9

  
10
	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.
11

  
12
	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.
13

  
14
	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
15
rights.
16

  
17
	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.
18

  
19
	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.
20

  
21
	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.
22

  
23
	The precise terms and conditions for copying, distribution and modification follow.
24

  
25
				GNU GENERAL PUBLIC LICENSE
26
	TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
27

  
28
	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".
29

  
30
	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.
31

  
32
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.
33

  
34
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.
35

  
36
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:
37

  
38
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
39

  
40
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.
41

  
42
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.)
43

  
44
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.
45

  
46
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.
47

  
48
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.
49

  
50
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:
51

  
52
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,
53

  
54
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,
55

  
56
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.)
57

  
58
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.
59

  
60
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.
61

  
62
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.
63
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.
64

  
65
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.
66

  
67
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.
68
You are not responsible for enforcing compliance by third parties to this License.
69

  
70
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.
71

  
72
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.
73

  
74
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.
75

  
76
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
77

  
78
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.
79

  
80
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.
81

  
82
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.
83

  
84
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.
85

  
86
NO WARRANTY
87

  
88
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.
89

  
90
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.
91

  
92
END OF TERMS AND CONDITIONS
93

  
94
How to Apply These Terms to Your New Programs
95

  
96
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.
97

  
98
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.
99

  
100
<one line to give the program's name and a brief idea of what it does.> Copyright (C) <year>  <name of author>
101

  
102
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.
103

  
104
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.
105

  
106
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
107

  
108

  
109
Also add information on how to contact you by electronic and paper mail.
110

  
111
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
112

  
113
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
114
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
115

  
116
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.
117

  
118
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:
119

  
120
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
121

  
122
<signature of Ty Coon>, 1 April 1989
123
Ty Coon, President of Vice
124

  
125
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.
trunk/extensions/org.gvsig.chartlegend/install/resources/userInputLang.xml_cze
1
<langpack>
2
  <str id="text.label" txt="Path to gvSIG:"/>
3
</langpack>
trunk/extensions/org.gvsig.chartlegend/install/resources/userInputLang.xml_val
1
<langpack>
2
  <str id="text.label" txt="Ruta a gvSIG:"/>
3
</langpack>
trunk/extensions/org.gvsig.chartlegend/install/resources/userInputLang.xml_spa
1
<langpack>
2
  <str id="text.label" txt="Ruta a gvSIG:"/>
3
</langpack>
trunk/extensions/org.gvsig.chartlegend/install/resources/userInputLang.xml_cat
1
<langpack>
2
  <str id="text.label" txt="Ruta a gvSIG:"/>
3
</langpack>
trunk/extensions/org.gvsig.chartlegend/install/resources/userInputLang.xml_fra
1
<langpack>
2
  <str id="text.label" txt="Path to gvSIG:"/>
3
</langpack>
trunk/extensions/org.gvsig.chartlegend/install/resources/userInputLang.xml_eng
1
<langpack>
2
  <str id="text.label" txt="Path to gvSIG:"/>
3
</langpack>
trunk/extensions/org.gvsig.chartlegend/install/resources/userInputSpec.xml
1
<userInput>
2
	<panel order="0">
3
		<field 	type="search" 
4
				variable="INSTALL_PATH"
5
				size="45">
6
  			<description align="left" />
7
  			<spec 	txt="Path to gvSIG:" 
8
		  			id="text.label"
9
  					checkfilename="bin/andami.jar"
10
        			type="directory" 
11
        			result="directory">
12
  			<choice value="/usr/local/gvSIG_1.0" os="unix" />
13
  			<choice value="/opt/gvSIG_1.0" os="unix" />
14
  			<choice value="$USER_HOME/gvSIG_1.0" os="unix" />
15
  			<choice value="C:\Archivos de Programa\gvSIG_1.0" os="windows" />
16
  			<choice value="C:\Program Files\gvSIG_1.0" os="windows" />
17
  			</spec>
18
		</field>
19
	</panel>
20
</userInput>
21

  
trunk/extensions/org.gvsig.chartlegend/install/resources/LEEME.html
1
<html>
2
<head>
3
<style type="text/css">
4
html, body, h1, h2, h3, h4, div, p, ul, li, input {
5
   font-family: Arial, Helvetica, sans-serif;
6
}
7

  
8
h1 {
9
   font-size: large;
10
}
11

  
12
h2 {
13
   font-size: large;
14
}
15

  
16
h3 {
17
   font-size: medium;
18
}
19
</style>
20
</head>
21
<body>
22
<h1>Chart legend extension</h1>
23

  
24
<h2>Autores:</h2>
25
<ul>
26
<li>IVER T.I. S.A.</li>
27
<li>Iver Tecnolog&iacute;as de la Informaci&oacute;n S.A.</li>
28
</ul>
29

  
30
<p>Software con licencia GNU/GPL
31
(http://www.fsf.org/licensing/licenses/gpl.html)</p>
32

  
33
<p>Informaci?n y soporte:
34
	http://www.iver.es/<p>
35

  
36
<h2>Requisitos de la aplicaci&oacute;n:</h2>
37
<h3>Sistema</h3>
38
<ul>
39
<li>M&iacute;nimos: Pentium III / 256 MB RAM.</li>
40
<li>Recomendables: Pentium IV / 512 MB RAM.</li>
41
<li>Sistemas operativos: plataformas Windows, Linux y Mac.</li>
42
</ul>
43

  
44
<h3>Software instalado</h3> (disponible en http://www.gvsig.gva.es o en http://java.sun.com)
45
<ul>
46
<li>gvSIG-1.9 - build 1253</li>
47
</ul>
48

  
49
<h2>M&aacute;s informaci&oacute;n y soporte sobre gvSIG en:</h2>
50
<h3> Web oficial del proyecto:</h3>
51
	http://www.gvsig.gva.es
52

  
53
</body>
54
</html>
trunk/extensions/org.gvsig.chartlegend/install/resources/userInputLang.xml_deu
1
<langpack>
2
  <str id="text.label" txt="Path to gvSIG:"/>
3
</langpack>
trunk/extensions/org.gvsig.chartlegend/install/resources/userInputLang.xml_ita
1
<langpack>
2
  <str id="text.label" txt="Path to gvSIG:"/>
3
</langpack>
trunk/extensions/org.gvsig.chartlegend/install/buildExt.xml
1
<project name="instalador-gvSIG" default="init" basedir=".">
2

  
3
	<dirname file="${ant.file.instalador-gvSIG}" property="base_dir"/>
4
	<dirname file="${base_dir}" property="project_dir"/>
5
	<dirname file="${project_dir}" property="workspace_dir"/>
6

  
7
	<import file="${workspace_dir}/binaries/ant/utilities.xml"/>
8

  
9
	<property file="build.properties"/>
10
	<property file="${workspace_dir}/_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/build.number" prefix="gvSIG."/>
11
	<property file="${project_dir}/build.number"/>
12

  
13
	<property name="dir_inst" location="/usr/local"/>
14
	<!--<property name="base_dir" location="./"/>		-->
15
	<property name="izpack_dir" location="${workspace_dir}/install/IzPack"/>
16
	<property name="dir_libs" location="${izpack_dir}/lib"/>
17

  
18

  
19
	<property name="GVSIG_INSTALLDIR" location="${workspace_dir}/install"/>
20
	<property name="ANDAMI_DIR" location="${workspace_dir}/_fwAndami"/>
21
	<property name="INSTALLER_DIR" value="${APPNAME}-${version}_installer"/>
22
	<property name="JARNAME" value="${APPNAME}-${version}.jar"/>
23
	<property name="DIR_LIN_GVSIG" location="${GVSIG_INSTALLDIR}/instalador-gvSIG-lin"/>
24
	<property name="DIR_WIN_GVSIG" location="${GVSIG_INSTALLDIR}/instalador-gvSIG-win"/>
25
	<property name="baseFileName" value="${APPNAME}-${gvSIG.version}-${gvSIG.build.number}_${build.number}"/>
26
	<property name="WINDOWSZIP" value="${baseFileName}-windows-i586.7z" />
27
	<property name="LINUXBIN" value="${baseFileName}-linux-i586.bin"/>
28
	<property name="WINDOWSEXE" value="${baseFileName}-windows-i586.exe"/>
29
	<property name="MAC_10_ZIP" value="${baseFileName}-mac-10_4.zip"/>
30
	<property name="autoinstalador" value="${APPNAME}_Installer" />
31
	<property name="OUTPUT_DIR" location="./tmp/versiones/v${version}/${build.number}"/> <!--CAMBIAR ESTO SEGUN DIRECTORIO OUTPUT -->
32

  
33
	<condition property="LAUNCHER7Z" value="${GVSIG_INSTALLDIR}/launcher/7z/7za" else="${GVSIG_INSTALLDIR}/launcher/7z/7z.exe">
34
		<os family="unix" />
35
	</condition>
36

  
37
	<taskdef name="izpack" classpath="${dir_libs}/compiler.jar" classname="com.izforge.izpack.ant.IzPackTask"/>
38

  
39

  
40
	<condition property="Lang.Is.Spanish">
41
		<contains string="${env.LANG}" substring="es"/>
42
	</condition>
43
	<condition property="directorio.base">
44
		<available file="${base_dir}/install.xml" type="file" />
45
	</condition>
46

  
47
	<target name="E_Spanish" if="Lang.Is.Spanish">
48
		<property name="ERROR_BASEDIR" value="En el directorio ${base_dir} no se encuentra el fichero install.xml" />
49
	</target>
50

  
51
	<target name="E_notSpanish" unless="Lang.Is.Spanish">
52
		<property name="ERROR_BASEDIR" value="Cannot find install.xml in ${base_dir} folder " />
53
	</target>
54

  
55
	<target name="check" depends="E_Spanish,E_notSpanish">
56
		<fail message="${ERROR_BASEDIR}" unless="directorio.base"/>
57
	</target>
58

  
59

  
60

  
61
	<target name="init" depends="check,CopyFiles,CreateJar,Installation,InstallMac,CleanDir" >
62

  
63
	</target>
64
	<target name="CopyFiles" description="Copia de ficheros de librerias y de las extensiones necesarias">
65
		<delete dir="${base_dir}/bin"/>
66
		<copy file="${base_dir}/resources/gpl.txt" todir="./bin"/>
67
		<mkdir dir="${base_dir}/bin/lib"/>
68
		<!-- 		copiamos los jar y zip que tenemos en _fwAndami/lib		 -->
69
		<copy todir="${base_dir}/bin/lib">
70
			<fileset dir="${ANDAMI_DIR}/lib">
71
				<include name="*.jar"/>
72
				<include name="*.zip"/>
73
			</fileset>
74
		</copy>
75

  
76
		<copy todir="${base_dir}/bin" file="${ANDAMI_DIR}/andami.jar"/>
77
		<copy todir="${base_dir}/bin" file="${ANDAMI_DIR}/castor.properties"/>
78

  
79
		<!-- 		PARA WINDOWS -->
80

  
81

  
82
		<delete dir="${base_dir}/tmpResources"/>
83
		<mkdir dir="${base_dir}/tmpResources" />
84

  
85
		<!-- 	Copiamos el lanzador y sus traduciones al tmpResources,sin copiar el ini, manifest y los CVS (ANT excluye carpetas CVS por defecto -->
86
		<copy todir="${base_dir}/tmpResources">
87
			<fileset dir="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3/dist/">
88
				<include name="**/"/>
89
				<exclude name="**/*.ini"/>
90
				<exclude name="**/*.manifest"/>
91
			</fileset>
92
		</copy>
93
		<move file="${base_dir}/tmpResources/launcher-Win32.exe" tofile="./tmpResources/gvSIG.exe"/>
94

  
95

  
96

  
97

  
98
		<for list="${EXTENSIONS}" param="extensions">
99
			<sequential>
100
				<copy todir="${base_dir}/extensiones/@{extensions}">
101
					<fileset dir="${ANDAMI_DIR}/gvSIG/extensiones/@{extensions}"/>
102
				</copy>
103
				<echo>extension ----> @{extensions} </echo>
104
			</sequential>
105
		</for>
106
	</target>
107
	<target name="CreateJar" description="Generacion del instalador Jar">
108
		<izpack input="${base_dir}/install.xml"
109
			output="${base_dir}/${JARNAME}"
110
			installerType="standard"
111
			basedir="${base_dir}"
112
			izPackDir="${izpack_dir}/"/>
113
	</target>
114
	<!-- 		generar el tar.gz para linux -->
115
	<target name="Installation" description="Generacion de la distribucion">
116

  
117
		<mkdir dir="${OUTPUT_DIR}" />
118
		<delete dir="${base_dir}/${INSTALLER_DIR}"/>
119
		<mkdir dir="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall"/>
120
		<copy file="${base_dir}/${JARNAME}" todir="./${INSTALLER_DIR}/tmp_gvSIGInstall"/>
121

  
122
		<!-- 		carpetas CVS no se copiaran, ANT las excluye por defecto -->
123
		<copy todir="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall">
124
			<fileset dir="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3_linux/dist/"/>
125
		</copy>
126

  
127
		<chmod file="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher-Linux" perm="ugo+rx"/>
128
		<delete file="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher.ini"/>
129
		<copy file="${DIR_LIN_GVSIG}/resources/launcher.ini.j15" tofile="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher.ini"/>
130
		<replace file="${base_dir}/${INSTALLER_DIR}/tmp_gvSIGInstall/launcher.ini" token="%JARNAME%" value="${JARNAME}"/>
131

  
132
		<!-- 		comprimimos la carpeta tmp_gvSIGInstall en tmp.tgz  -->
133
		<tar destfile="${base_dir}/${INSTALLER_DIR}/tmp.tgz"  compression="gzip">
134
			<tarfileset dir="${base_dir}/${INSTALLER_DIR}" mode="755" >
135
				<include name="tmp_gvSIGInstall/launcher-Linux"/>
136
			</tarfileset>
137
			<tarfileset dir="${base_dir}/${INSTALLER_DIR}">
138
				<include name="tmp_gvSIGInstall/*"/>
139
				<exclude name="tmp_gvSIGInstall/launcher-Linux"/>
140
			</tarfileset>
141
		</tar>
142
		<echo message="#!/bin/sh${line.separator}" file="./${INSTALLER_DIR}/xx.tmp" />
143
		<echo message="lcount=59${line.separator}" file="./${INSTALLER_DIR}/xx.tmp" append="true" /> <!-- OJO SI SE TOCA EL FICHERO h_gvSIG-install.sh - 59 -> num de lineas del fichero + 2 -->
144
		<copy todir="${base_dir}/${INSTALLER_DIR}" file="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3_linux/h_gvSIG-install.sh"/>
145
		<fixcrlf srcDir="${base_dir}/${INSTALLER_DIR}" includes="h_gvSIG-install.sh,xx.tmp"  eol="unix"/>
146
		<concat destfile="${base_dir}/${INSTALLER_DIR}/${LINUXBIN}" binary="true" >
147
			<fileset file="${base_dir}/${INSTALLER_DIR}/xx.tmp"/>
148
			<fileset file="${base_dir}/${INSTALLER_DIR}/h_gvSIG-install.sh"/>
149
			<fileset file="${base_dir}/${INSTALLER_DIR}/tmp.tgz"/>
150
		</concat>
151
		<chmod file="${base_dir}/${INSTALLER_DIR}/${LINUXBIN}" perm="ugo+rx"/>
152
		<delete file="${base_dir}/${INSTALLER_DIR}/xx.tmp"/>
153
		<move file="${base_dir}/${INSTALLER_DIR}/${LINUXBIN}" todir="${OUTPUT_DIR}" />
154
		<delete dir="${base_dir}/${INSTALLER_DIR}"/>
155

  
156

  
157

  
158
		<!-- 		PARA WINDOWS  -->
159
		<delete dir="${base_dir}/${INSTALLER_DIR}"/>
160
		<mkdir dir="${base_dir}/${INSTALLER_DIR}"/>
161
		<copy todir="${base_dir}/${INSTALLER_DIR}">
162
			<fileset dir="${GVSIG_INSTALLDIR}/launcher/izpack-launcher-1.3/dist"/>
163
		</copy>
164
		<delete file="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini"/>
165
		<copy todir="${base_dir}/${INSTALLER_DIR}/" file="${DIR_WIN_GVSIG}/resources/launcher-Win32.ini.j15"/>
166
		<move file="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini.j15" tofile="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini"/>
167
		<replace file="${base_dir}/${INSTALLER_DIR}/launcher-Win32.ini" token="%JARNAME%" value="${JARNAME}"/>
168
		<move file="${base_dir}/${JARNAME}" todir="./${INSTALLER_DIR}"/>
169
		<delete file="${base_dir}/${WINDOWSZIP}"/>
170
		<exec executable="${LAUNCHER7Z}">
171
			<arg line="a -r ${WINDOWSZIP} ./${INSTALLER_DIR}/*"/>
172
		</exec>
173
		<copy file="${GVSIG_INSTALLDIR}/launcher/7z/dist_config.txt" tofile="./dist_config.txt"/>
174
		<replace file="${base_dir}/dist_config.txt" token="%TITLE%" value="${APPNAME}-${bversion}_${build.number}" />
175
		<concat destfile="${base_dir}/${WINDOWSEXE}" binary="true">
176
			<fileset file="${GVSIG_INSTALLDIR}/launcher/7z/7zS.sfx"/>
177
			<fileset file="${base_dir}/dist_config.txt"/>
178
			<fileset file="${base_dir}/${WINDOWSZIP}"/>
179
		</concat>
180
		<move file="${WINDOWSEXE}" todir="${OUTPUT_DIR}"/>
181
	</target>
182

  
183
	<target name="InstallMac" description="Actualizador para MAC">
184
		<property name="tmp_mac" location="${base_dir}/tmpResources_mac"/>
185

  
186
		<delete dir="${tmp_mac}" failonerror="no"/>
187

  
188
		<mkdir dir="${tmp_mac}"/>
189

  
190

  
191
		<ant antfile="build-updater.xml" dir="${GVSIG_INSTALLDIR}/instalador-gvSIG-mac">
192
			<property name="NOMBRE_BUNDLE" value="${autoinstalador}"/>
193
			<property name="DIR_DESTINO" value="${tmp_mac}"/>
194
		</ant>
195
<!--
196
		<copy todir="${tmp_mac}/${autoinstalador}.app/Contents/Resources" file="./resources/configfile" overwrite="yes"/>
197
-->
198
		<replace file="${tmp_mac}/${autoinstalador}.app/Contents/Resources/configfile"
199
			 token="%BUILD.NUMBER%"
200
			 value="${build.number}"/>
201

  
202

  
203
		<property name="mac_install_path_bin" value="${tmp_mac}/${autoinstalador}.app/Contents/Resources/updates/gvSIGbin"/>
204
		<property name="mac_install_path_gvsig" value="${mac_install_path_bin}/gvSIG"/>
205
		<property name="mac_install_path_ext" value="${mac_install_path_gvsig}/extensiones"/>
206

  
207
		<!-- Copiar en los directorios los ficheros a instalar:
208
		     ${mac_install_path_bin} ==> directorio 'bin' de la instalacion (donde esta andami.jar)
209
		     ${mac_install_path_gvsig} ==> directorio 'bin/gvSIG' de la instalacion
210
		     ${mac_install_path_ext} ==> directorio 'bin/gvSIG/extensiones'
211

  
212

  
213

  
214
		Ejemplos:
215

  
216
		* Actualizar andami.jar:
217

  
218
		<copy todir="${mac_install_path_bin}" file="bin/andami.jar"/>
219

  
220

  
221
		* Copiar una libreria al directorio de lib del plugin de gvSIG:
222

  
223
		<copy todir="${mac_install_path_gvsig}">
224
			<fileset dir=".">
225
				<include name="extensiones/com.iver.cit.gvsig/lib/myLib.jar"/>
226
			</fileset>
227
		</copy>
228

  
229
		* Copiar el directorio entero del plugin 'myPlugin':
230

  
231
		<copy todir="${mac_install_path_ext}">
232
			<fileset dir="extensiones">
233
				<include name="myPlugin/**/**"/>
234
			</fileset>
235
		</copy>
236

  
237
		* Copiar todos los ficheros 'about.htm'
238
		<copy todir="${mac_install_path_ext}">
239
			<fileset dir="extensiones">
240
				<include name="**/about.htm"/>
241
			</fileset>
242
		</copy>
243

  
244

  
245
		     -->
246

  
247

  
248

  
249
		<zip destfile="${OUTPUT_DIR}/${MAC_10_ZIP}">
250
			<zipfileset dir="${tmp_mac}"
251
				    includes="${autoinstalador}.app/**"
252
				    excludes="${autoinstalador}.app/Contents/MacOS/*"
253
				    />
254
			<zipfileset dir="${tmp_mac}"
255
				    includes="${autoinstalador}.app/Contents/MacOS/*"
256
				    filemode="755"
257
				    />
258

  
259
		</zip>
260

  
261
		<delete dir="${tmp_mac}"/>
262
	</target>
263

  
264
	<target name="CleanDir" description="Limpiamos los directorios creados">
265

  
266
		<delete file="${base_dir}/${WINDOWSZIP}" />
267
		<delete file="${base_dir}/dist_config.txt" />
268
		<delete dir="${base_dir}/${INSTALLER_DIR}" />
269
		<delete dir="${base_dir}/tmpResources" />
270
		<delete dir="extensiones"/>
271
		<delete dir="bin"/>
272
	</target>
273

  
274
</project>
trunk/extensions/org.gvsig.chartlegend/install/install.xml
1
<installation version="1.0">
2
	<info>
3
		<appname>ChartLegend</appname> <!-- A SUSTITUR POR EL NOMBRE DE EXTENSION, POR EJEMPLO: "VISOR_RUIDO" -->
4
		<appversion>0.0.1</appversion>
5
		<authors>
6
			<author name="Generalitat Valenciana. Conselleria d'Infraestructures i Transport" email="" />
7
			<author name="Iver Tecnologías de la Información S.A." email="" />
8
     	</authors>
9
		
10
		<url>http://www.gvsig.gva.es/</url>
11
		<javaversion>1.5</javaversion>
12
	</info>
13

  
14
	<guiprefs height="600" resizable="yes" width="800">
15
		<laf name="liquid">
16
			<os family="unix" />
17
		</laf>
18
		<laf name="liquid">
19
			<os family="windows" />
20
		</laf>
21
	</guiprefs>
22

  
23
	<locale>
24
		<langpack iso3="spa"/>
25
		<langpack iso3="val"/>
26
		<langpack iso3="eng"/>
27
		<langpack iso3="cat"/>
28
		<langpack iso3="chn"/>
29
		<langpack iso3="cze"/>
30
		<langpack iso3="dan"/>
31
		<langpack iso3="deu"/>
32
		<langpack iso3="fin"/>
33
		<langpack iso3="fra"/>
34
		<langpack iso3="glg"/>
35
		<langpack iso3="hun"/>
36
		<langpack iso3="ita"/>
37
		<langpack iso3="jpn"/>
38
		<langpack iso3="mys"/>
39
		<langpack iso3="ned"/>
40
		<langpack iso3="nor"/>
41
		<langpack iso3="pol"/>
42
		<langpack iso3="por"/>
43
		<langpack iso3="rom"/>
44
		<langpack iso3="rus"/>
45
		<langpack iso3="scg"/>
46
		<langpack iso3="svk"/>
47
		<langpack iso3="swe"/>
48
		<langpack iso3="ukr"/>
49
	</locale>
50

  
51
	<resources>
52
		<res src="resources/gpl.txt" id="LicencePanel.licence"/>
53
		<res src="resources/LEEME.html" id="HTMLInfoPanel.info"/>
54
		<res src="resources/images/Logo_gvsig_gva.jpg" id="Installer.image"/>
55
		<res src="resources/userInputSpec.xml" id="userInputSpec.xml"/>
56
		<parsable targetfile="resources/userInputSpec.xml"/>
57
		<res src="resources/userInputLang.xml_val" id="userInputLang.xml_val" />
58
		<res src="resources/userInputLang.xml_spa" id="userInputLang.xml_spa" />
59
	</resources>
60

  
61
	<panels>
62
		<panel classname="HTMLInfoPanel"/>
63
		<panel classname="LicencePanel"/>
64
		<panel classname="PacksPanel"/>
65
		<panel classname="UserInputPanel"/>
66
		<panel classname="InstallPanel"/>
67
		<panel classname="SimpleFinishPanel"/>
68
	</panels>
69

  
70
	<packs>
71

  
72
		<pack name="ChartLegend" required="no">  <!--A SUSTITUIR POR LA EXTENSION, EJ: Extension VISOR_RUIDO-->
73
			<description>"Chart legend extension."</description> <!--A SUSTITUIR POR LA DESCRIPCION, EJ: Extension para manejo de... -->
74

  
75
			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/" src="extensiones/org.gvsig.chartlegend" override="true"/>
76

  
77
			<!--SUSTITUR POR LA EXTENSION, ej: com.iver.ayto.visorRuido-->
78
			<!--además, si hay que copiar algo fuera del directorio de la extension, hay que añadirlo-->
79
			<file targetdir="$INSTALL_PATH/bin/gvSIG/extensiones/com.iver.cit.gvsig/lib" src="extensiones/com.iver.cit.gvsig/lib/org.gvsig.chartlegend-ext.jar" override="true"/>
80
		</pack>
81
	</packs>
82

  
83
</installation>
84
<!--
85
<processing>
86
  		<job name="do xyz">
87
    			<os family="windows" />
88
    		<executefile name="$INSTALL_PATH/scripts/xyz.bat">
89
      			<arg>doit</arg><arg>$variable</arg>
90
    		</executefile>
91
 		</job>
92

  
93
  		<job name="updateInfoTool">
94
    			<os family="unix" />
95
    		<executefile name="$INSTALL_PATH/bin/gvSIG/extensiones/com.iver.cit.gvsig/updateInfo.sh">
96
     			 <arg></arg>
97
    		</executefile>
98
 		 </job>
99
</processing>
100
-->
trunk/extensions/org.gvsig.chartlegend/src/main/javadoc/overview.html
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml">
4
<head>
5
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
<title>org.gvsig.template.extension package documentation</title>
7
</head>
8
<body>
9

  
10
	<p>TODO: Example extension overview.</p>
11
	
12
	<p>See the <a href="http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#overviewcomment">Javadoc Tool documentation about the overview file</a></p>
13

  
14
</body>
15
</html>
trunk/extensions/org.gvsig.chartlegend/src/main/java/org/gvsig/table/TableToImageExtension.java
1
/* gvSIG. Sistema de Informacion Geografica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2010 IVER T.I.
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
 *  IVER T.I.
22
 *   C/ Lerida, 20
23
 *   46009 Valencia
24
 *   SPAIN
25
 *   http://www.iver.es
26
 *   dac@iver.es
27
 *   +34 963163400
28
 *   
29
 *  or
30
 *  
31
 *  Generalitat Valenciana
32
 *   Conselleria d'Infraestructures i Transport
33
 *   Av. Blasco Iba?ez, 50
34
 *   46010 VALENCIA
35
 *   SPAIN
36
 */
37
package org.gvsig.table;
38

  
39
import java.awt.Component;
40
import java.awt.Graphics2D;
41
import java.awt.image.BufferedImage;
42
import java.io.File;
43
import java.io.IOException;
44
import javax.imageio.ImageIO;
45
import javax.swing.JOptionPane;
46
import javax.swing.JScrollPane;
47
import org.gvsig.gui.beans.swing.JFileChooser;
48
import com.iver.andami.PluginServices;
49
import com.iver.andami.messages.NotificationManager;
50
import com.iver.andami.plugins.Extension;
51
import com.iver.andami.ui.mdiManager.IWindow;
52
import com.iver.cit.gvsig.project.documents.table.gui.Table;
53
import com.iver.utiles.GenericFileFilter;
54

  
55
/**
56
 * This extension adds a tool to export a table into an image.
57
 * Keep in mind that the image's content is that which was visible in the table 
58
 * and not the entire table.
59
 * 
60
 * @author Francisco Bosch Cerver?
61
 *
62
 */
63
public class TableToImageExtension extends Extension{
64

  
65
	private Table table;
66
	private String lastPath;
67

  
68
	public TableToImageExtension() {
69
		this.table = null;
70
		this.lastPath = null;
71
	}
72
	
73
	/* (non-Javadoc)
74
	 * @see com.iver.andami.plugins.IExtension#initialize()
75
	 */
76
	public void initialize() {
77
	}
78
	
79
	/* (non-Javadoc)
80
	 * @see com.iver.andami.plugins.IExtension#isEnabled()
81
	 */
82
	public boolean isEnabled() {
83
		return true;
84
	}
85

  
86
	/* (non-Javadoc)
87
	 * @see com.iver.andami.plugins.IExtension#isVisible()
88
	 */
89
	public boolean isVisible() {
90
		IWindow v = PluginServices.getMDIManager().getActiveWindow();
91
		if (v == null) {
92
			return false;
93
		}
94
		else if (v instanceof Table) {
95
			this.table = (Table)v;
96
			return true;
97
		}
98
		return false;
99
	}
100

  
101
	/* (non-Javadoc)
102
	 * @see com.iver.andami.plugins.IExtension#execute(java.lang.String)
103
	 */
104
	public void execute(String actionCommand) {
105
		if(actionCommand.equals("TABLE_TO_IMAGE")){
106
			JFileChooser fileChooser = new JFileChooser("TableToImage", this.lastPath);
107
			fileChooser.setAcceptAllFileFilterUsed(false);
108
			fileChooser.setFileFilter(new GenericFileFilter(".png", PluginServices.getText(this, "png"), true));
109
			int respuesta=fileChooser.showSaveDialog((Component)PluginServices.getMainFrame());
110
			if(respuesta==JFileChooser.APPROVE_OPTION){
111
				File file = fileChooser.getSelectedFile();
112
				String nombre = file.getName();
113
				if(!nombre.endsWith(".png")){
114
					file = new File(file.getAbsolutePath()+".png");
115
				}
116
				if(file.exists()){
117
					if(preguntaGuardar(fileChooser))
118
						saveTableAsImage(this.table,file.getAbsolutePath());	
119
				}
120
				else{
121
					saveTableAsImage(this.table,file.getAbsolutePath());
122
				}	
123
			} 
124
		}
125
	}
126
	
127
	/**
128
	 * The function asks whether to overwrite a file or not.
129
	 * 
130
	 * @param fileChooser
131
	 * @return boolean
132
	 */
133
	private boolean preguntaGuardar(JFileChooser fileChooser) {
134
		Object[] opciones={"S?","No"};
135
		//Dialogo modal SI_NO
136
		int ret = JOptionPane.showOptionDialog(fileChooser,PluginServices.getText(this, "fichero_ya_existe_seguro_desea_guardarlo"),PluginServices.getText(this, "guardar"),JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,null,opciones,opciones[0]);
137
		if(ret==JOptionPane.YES_OPTION){
138
			return true;
139
		}
140
		else{
141
			return false;
142
		}
143
	}
144
	
145
	/**
146
	 * This method saves an image in the path passed as parameter.
147
	 * The image's content is the content that was visible in the table passed as parameter too.
148
	 * 
149
	 * @param table
150
	 * @param path
151
	 */
152
	private void saveTableAsImage(Table table, String path) {
153
		int width, height;
154
		JScrollPane scrollPane = (JScrollPane)table.getTable().getParent().getParent();
155
		width = scrollPane.getWidth();
156
		height = scrollPane.getHeight();
157
		BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
158
		Graphics2D g2r = image.createGraphics();
159
		scrollPane.paint(g2r);
160
		g2r.dispose();
161
		try {
162
			ImageIO.write(image, "png", new File(path));
163
		  }
164
		catch (IOException ioe) {
165
			NotificationManager.showMessageError(PluginServices.getText(this, "error_in_save_image"), ioe);
166
		  }
167
	}
168
}
trunk/extensions/org.gvsig.chartlegend/src/main/java/org/gvsig/app/project/documents/view/legend/gui/FieldsTable.java
1
package org.gvsig.app.project.documents.view.legend.gui;
2

  
3

  
4

  
5
import java.awt.Color;
6
import java.awt.Dimension;
7
import java.awt.GridLayout;
8

  
9
import javax.swing.JPanel;
10
import javax.swing.JScrollPane;
11
import javax.swing.JTable;
12
import javax.swing.table.DefaultTableModel;
13
import javax.swing.table.TableColumn;
14

  
15
import com.iver.andami.PluginServices;
16

  
17

  
18
/**
19
 * JPanel que contiene la tabla con los s?mbolos intervalos o valores y
20
 * etiquetado de estos valores.
21
 *
22
 * @author Vicente Caballero Navarro
23
 */
24
public class FieldsTable extends JPanel {
25
    private static final long serialVersionUID = -8694846716328735113L;
26
    private JTable table;
27
    private ColorChange colorChange;
28

  
29
    /**
30
     * Crea un nuevo FSymbolTable.
31
     *
32
     * @param type
33
     *            tipo de valor si es intervalo: "intervals" y si es por
34
     *            valores: "values".
35
     */
36
    public FieldsTable() {
37
        super(new GridLayout(1, 0));
38

  
39
        table = new JTable();
40
        table.setModel(new MyTableModel());
41
        table.setPreferredScrollableViewportSize(new Dimension(200, 110));
42

  
43
        // Create the scroll pane and add the table to it.
44
        JScrollPane scrollPane = new JScrollPane(table);
45

  
46
        // Set up column sizes.
47
        setUpColorColumn(table, table.getColumnModel().getColumn(0));
48

  
49
        setUpFieldColumn(table, table.getColumnModel().getColumn(1));
50
        setUpFieldColumn(table, table.getColumnModel().getColumn(2));
51

  
52
        // Add the scroll pane to this panel.
53
        add(scrollPane);
54
        table.setRowSelectionAllowed(true);
55
    }
56

  
57
    /**
58
     * Obtiene el valor de los elementos de una fila seleccionada
59
     *
60
     * @return Object[] Array con los objetos de cada una de las columnas de la fila seleccionada
61
     */
62
    public Object[] getSelectedRowElements() {
63
        Object[] values = new Object[3];
64

  
65
        MyTableModel m = (MyTableModel) table.getModel();
66
        int[] selectedRows = table.getSelectedRows();
67

  
68
        if(selectedRows.length != 1)
69
            return null;
70

  
71
        for (int i = 0; i < 3; i++) {
72
            values[i] = m.getValueAt(selectedRows[0], i);
73
        }
74

  
75
        return values;
76
    }
77
    /**
78
     * A?ade una fila al modelo.
79
     *
80
     * @param vector
81
     *            Fila en forma de vector de Object para a?adir al modelo.
82
     */
83
    public void addRow(Object[] vector) {
84
        MyTableModel m = (MyTableModel) table.getModel();
85
        m.addRow(vector);
86

  
87
    }
88

  
89
    /**
90
     * Elimina las filas que est?n seleccionadas.
91
     */
92
    public void removeSelectedRows() {
93
        if (table.getCellEditor() != null) {
94
            table.getCellEditor().cancelCellEditing();
95
        }
96

  
97
        MyTableModel m = (MyTableModel) table.getModel();
98
        int[] selectedRows = table.getSelectedRows();
99

  
100
        for (int i = selectedRows.length - 1; i >= 0; i--) {
101
            m.removeRow(selectedRows[i]);
102
        }
103
    }
104

  
105
    /**
106
     * Rellena la tabla con los s?mbolos valores y descripciones que se pasan
107
     * como par?metro.
108
     *
109
     * @param symbols
110
     *            Array de s?mbolos
111
     * @param values
112
     *            Array de valores.
113
     * @param descriptions
114
     *            Array de descripciones.
115
     */
116
    public void fillTableFromSymbolList(java.awt.Color[] colors, String[] fields, String[] labels) {
117
        for (int i = 0; i < colors.length; i++) {
118
            addTableRecord(colors[i], fields[i], labels[i]);
119
        }
120
    }
121

  
122
    /**
123
     * A?ade una fila con los objetos que se pasan como par?metros.
124
     *
125
     * @param symbol
126
     *            s?mbolo de la fila.
127
     * @param value
128
     *            Valor de la fila.
129
     * @param description
130
     *            Descripci?n.
131
     */
132
    public void addTableRecord(java.awt.Color color, String field, String label) {
133
        Object[] theRow = new Object[3];
134
        theRow[0] = color;
135
        theRow[1] = field;
136
        theRow[2] = label;
137
        addRow(theRow);
138
    }
139

  
140
    /**
141
     * Devuelve el valor a partie del n?mero de fila y columna.
142
     *
143
     * @param row
144
     *            n?mero de fila.
145
     * @param col
146
     *            n?mero de columna.
147
     *
148
     * @return Objeto.
149
     */
150
    public Object getFieldValue(int row, int col) {
151
        MyTableModel m = (MyTableModel) table.getModel();
152

  
153
        return m.getValueAt(row, col);
154
    }
155

  
156
    /**
157
     * Devuelve el n?mero total de filas que contiene el modelo.
158
     *
159
     * @return N?mero de filas.
160
     */
161
    public int getRowCount() {
162
        MyTableModel m = (MyTableModel) table.getModel();
163

  
164
        return m.getRowCount();
165
    }
166

  
167
    /**
168
     * Elimina todas las filas del modelo.
169
     */
170
    public void removeAllItems() {
171
        table.setModel(new MyTableModel());
172
        setUpColorColumn(table, table.getColumnModel().getColumn(0));
173
        setUpFieldColumn(table, table.getColumnModel().getColumn(1));
174
        setUpFieldColumn(table, table.getColumnModel().getColumn(2));
175
    }
176

  
177
    /**
178
     * Inicializa el cell editor de tipo descripci?n de la columna que se pasa
179
     * como par?metro.
180
     *
181
     * @param table2
182
     *            Tabla.
183
     * @param column
184
     *            Columna.
185
     */
186
    public void setUpFieldColumn(JTable table2, TableColumn column) {
187
//        TextFieldCellEditor labeleditor = new TextFieldCellEditor();
188
//        column.setCellEditor(labeleditor);
189
    }
190

  
191
    /**
192
     * Inicializa el cell editor de tipo s?mbolo de la columna que se pasa como
193
     * par?metro.
194
     *
195
     * @param table2
196
     *            Tabla.
197
     * @param column
198
     *            Columna.
199
     */
200
    public void setUpColorColumn(JTable table2, TableColumn column) {
201
        // Set up the editor
202
        column.setMaxWidth(100);
203
        column.setWidth(60);
204
        column.setPreferredWidth(60);
205
        column.setMinWidth(50);
206

  
207
        // FSymbolCellEditor symboleditor = new FSymbolCellEditor();
208
        ColorCellEditor coloreditor = new ColorCellEditor();
209
        coloreditor.addColorChange(colorChange);
210
        column.setCellEditor(coloreditor);
211

  
212
        TableColorCellRenderer renderer = new TableColorCellRenderer(true);
213
        column.setCellRenderer(renderer);
214
    }
215

  
216
    public int[] getSelectedRows(){
217
    	return table.getSelectedRows();
218
    }
219

  
220
    /**
221
     * Modelo que propio que se aplica a la tabla.
222
     *
223
     * @author Vicente Caballero Navarro
224
     */
225
    class MyTableModel extends DefaultTableModel {
226
        private static final long serialVersionUID = 1L;
227

  
228
        private String[] columnNames = {
229
                PluginServices.getText(this, "color"),
230
                PluginServices.getText(this, "field"),
231
                PluginServices.getText(this, "label")};
232

  
233
        /**
234
         * Devuelve el n?mero de columnas.
235
         *
236
         * @return N?mero de columnas.
237
         */
238
        public int getColumnCount() {
239
            return columnNames.length;
240
        }
241

  
242
        /**
243
         * Devuelve el String del valor de la columna.
244
         *
245
         * @param col
246
         *            N?mero de columna.
247
         *
248
         * @return Nombre de la columna.
249
         */
250
        public String getColumnName(int col) {
251
            return columnNames[col];
252
        }
253

  
254
        /**
255
         * JTable uses this method to determine the default renderer/ editor for
256
         * each cell. If we didn't implement this method, then the last column
257
         * would contain text ("true"/"false"), rather than a check box.
258
         */
259
        public Class getColumnClass(int c) {
260
            return getValueAt(0, c).getClass();
261
        }
262

  
263
        /*
264
         * Don't need to implement this method unless your table's editable.
265
         */
266
        public boolean isCellEditable(int row, int col) {
267
            // Note that the data/cell address is constant,
268
            // no matter where the cell appears onscreen.
269
            // if (col > 0) {
270
            return true;
271
        }
272

  
273
        @Override
274
        public Object getValueAt(int row, int column) {
275
            if(column == 0){
276
            	JPanel panelColor=new JPanel();
277
            	panelColor.setPreferredSize(new Dimension(60,30));
278
            	panelColor.setBackground((Color)super.getValueAt(row, column));
279
                return panelColor;
280
            }
281
            return super.getValueAt(row, column);
282
        }
283

  
284
        public void setValueAt(Object aValue, int row, int column) {
285
       		super.setValueAt(aValue, row, column);
286
        }
287

  
288
    }
289

  
290
	public void addColorChange(ColorChange colorChange) {
291
		this.colorChange=colorChange;
292
	}
293
}
trunk/extensions/org.gvsig.chartlegend/src/main/java/org/gvsig/app/project/documents/view/legend/gui/BarLegendPanel.java
1
package org.gvsig.app.project.documents.view.legend.gui;
2

  
3
import java.awt.BorderLayout;
4
import java.awt.Color;
5
import java.awt.Dimension;
6
import java.awt.FlowLayout;
7
import java.awt.Font;
8
import java.awt.event.ActionEvent;
9
import java.awt.event.ActionListener;
10
import java.sql.Types;
11
import java.util.Random;
12

  
13
import javax.swing.BorderFactory;
14
import javax.swing.DefaultListModel;
15
import javax.swing.ImageIcon;
16
import javax.swing.JButton;
17
import javax.swing.JCheckBox;
18
import javax.swing.JLabel;
19
import javax.swing.JList;
20
import javax.swing.JPanel;
21
import javax.swing.JScrollPane;
22
import javax.swing.border.TitledBorder;
23
import javax.swing.event.ChangeEvent;
24
import javax.swing.event.ChangeListener;
25

  
26
import org.gvsig.gui.beans.swing.JIncrementalNumberField;
27
import org.gvsig.gui.beans.swing.ValidatingTextField;
28
import org.gvsig.raster.datastruct.ColorItem;
29
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.BarLegend;
30
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.chart.IChartSymbol;
31

  
32
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
33
import com.hardcode.gdbms.engine.data.DataSource;
34
import com.hardcode.gdbms.engine.values.NullValue;
35
import com.hardcode.gdbms.engine.values.Value;
36
import com.iver.andami.PluginServices;
37
import com.iver.andami.messages.NotificationManager;
38
import com.iver.cit.gvsig.fmap.core.SymbologyFactory;
39
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol;
40
import com.iver.cit.gvsig.fmap.layers.FLayer;
41
import com.iver.cit.gvsig.fmap.layers.FLyrVect;
42
import com.iver.cit.gvsig.fmap.layers.SelectableDataSource;
43
import com.iver.cit.gvsig.fmap.layers.XMLException;
44
import com.iver.cit.gvsig.fmap.layers.layerOperations.AlphanumericData;
45
import com.iver.cit.gvsig.fmap.rendering.ILegend;
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff