Revision 38351

View differences:

tags/v2_0_0_Build_2047/extensions/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app/buildNumber.properties
1
#maven.buildNumber.plugin properties file
2
#Tue May 29 16:38:23 CEST 2012
3
buildNumber=13
tags/v2_0_0_Build_2047/extensions/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app/pom.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2

  
3
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
	<modelVersion>4.0.0</modelVersion>
6
	<artifactId>org.gvsig.app.document.layout.app</artifactId>
7
	<packaging>pom</packaging>
8
	<version>2.0.0-SNAPSHOT</version>
9
    <name>Layout document plugins</name>
10
    <description>Layout document plugins</description>
11
	<parent>
12
		<groupId>org.gvsig</groupId>
13
		<artifactId>org.gvsig.maven.base.extension.pom</artifactId>
14
		<version>1.0.8-SNAPSHOT</version>
15
	</parent>
16

  
17
    <scm>
18
        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/branches/v2_0_0_prep/extensions/org.gvsig.app.document.layout.app</connection>
19
        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/branches/v2_0_0_prep/extensions/org.gvsig.app.document.layout.app</developerConnection>
20
        <url>https://devel.gvsig.org/redmine/projects/gvsig-desktop/repository/show/branches/v2_0_0_prep/extensions/org.gvsig.app.document.layout.app</url>
21
    </scm>
22

  
23
	<developers>
24
		<developer>
25
			<id>jjdelcerro</id>
26
			<name>Joaqu?n Jos? del Cerro</name>
27
			<email>jjdelcerro@gvsig.org</email>
28
			<roles>
29
				<role>Architect</role>
30
				<role>Developer</role>
31
			</roles>
32
		</developer>
33
		<developer>
34
			<id>cordinyana</id>
35
			<name>C?sar Ordi?ana</name>
36
			<email>cordinyana@gvsig.com</email>
37
			<roles>
38
				<role>Architect</role>
39
				<role>Developer</role>
40
			</roles>
41
		</developer>
42
	</developers>
43
	<repositories>
44
		<repository>
45
			<id>gvsig-public-http-repository</id>
46
			<name>gvSIG maven public HTTP repository</name>
47
            <url>http://devel.gvsig.org/m2repo/j2se</url>
48
			<releases>
49
				<enabled>true</enabled>
50
				<updatePolicy>daily</updatePolicy>
51
				<checksumPolicy>warn</checksumPolicy>
52
			</releases>
53
			<snapshots>
54
				<enabled>true</enabled>
55
				<updatePolicy>daily</updatePolicy>
56
				<checksumPolicy>warn</checksumPolicy>
57
			</snapshots>
58
		</repository>
59
	</repositories>
60
	<dependencyManagement>
61
		<dependencies>
62
			<dependency>
63
				<groupId>org.gvsig</groupId>
64
				<artifactId>org.gvsig.core.maven.dependencies</artifactId>
65
				<version>2.0.1-SNAPSHOT</version>
66
				<type>pom</type>
67
				<scope>import</scope>
68
			</dependency>
69
			<dependency>
70
				<groupId>org.gvsig</groupId>
71
				<artifactId>org.gvsig.andami</artifactId>
72
				<version>2.0-SNAPSHOT</version>
73
				<scope>compile</scope>
74
			</dependency>
75
			<dependency>
76
				<groupId>org.gvsig</groupId>
77
				<artifactId>org.gvsig.app</artifactId>
78
				<version>2.0-SNAPSHOT</version>
79
				<scope>compile</scope>
80
			</dependency>
81
		</dependencies>
82
	</dependencyManagement>
83
	<modules>
84
		<module>org.gvsig.app.document.layout.app.mainplugin</module>
85
	</modules>
86
	<properties>
87
		<package.info.state>alpha5</package.info.state>
88
	</properties>
89
</project>
tags/v2_0_0_Build_2047/extensions/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/pom.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4
    <modelVersion>4.0.0</modelVersion>
5
    <packaging>jar</packaging>
6
    <artifactId>org.gvsig.app.document.layout.app.mainplugin</artifactId>
7
    <name>Document: Layout</name>
8
    <description>Adds a layout document type which allows to design printed maps.</description>
9
    <parent>
10
        <groupId>org.gvsig</groupId>
11
        <artifactId>org.gvsig.app.document.layout.app</artifactId>
12
        <version>2.0.0-SNAPSHOT</version>
13
    </parent>
14
    <dependencies>
15
        <dependency>
16
            <groupId>org.gvsig</groupId>
17
            <artifactId>org.gvsig.core.maven.dependencies</artifactId>
18
            <version>2.0.1-SNAPSHOT</version>
19
            <type>pom</type>
20
            <scope>test</scope>
21
        </dependency>
22
        <dependency>
23
            <groupId>org.gvsig</groupId>
24
            <artifactId>org.gvsig.app</artifactId>
25
            <scope>compile</scope>
26
        </dependency>
27
        <dependency>
28
            <groupId>org.gvsig</groupId>
29
            <artifactId>org.gvsig.andami</artifactId>
30
            <scope>compile</scope>
31
        </dependency>
32
        <dependency>
33
            <groupId>org.gvsig</groupId>
34
            <artifactId>org.gvsig.fmap.control</artifactId>
35
            <scope>compile</scope>
36
        </dependency>
37
        <dependency>
38
            <groupId>org.gvsig</groupId>
39
            <artifactId>org.gvsig.tools.lib</artifactId>
40
            <scope>compile</scope>
41
        </dependency>
42
        <dependency>
43
            <groupId>org.gvsig</groupId>
44
            <artifactId>org.gvsig.tools.swing.api</artifactId>
45
            <scope>compile</scope>
46
        </dependency>
47
        <dependency>
48
            <groupId>org.gvsig</groupId>
49
            <artifactId>org.gvsig.fmap.mapcontext</artifactId>
50
            <scope>compile</scope>
51
        </dependency>
52
        <dependency>
53
            <groupId>org.gvsig</groupId>
54
            <artifactId>org.gvsig.fmap.mapcontext</artifactId>
55
            <scope>compile</scope>
56
            <classifier>operation</classifier>
57
        </dependency>
58
        <dependency>
59
            <groupId>org.gvsig</groupId>
60
            <artifactId>org.gvsig.fmap.geometry</artifactId>
61
            <scope>compile</scope>
62
        </dependency>
63
        <dependency>
64
            <groupId>org.gvsig</groupId>
65
            <artifactId>org.gvsig.utils</artifactId>
66
            <scope>compile</scope>
67
        </dependency>
68
        <dependency>
69
            <groupId>org.gvsig</groupId>
70
            <artifactId>org.gvsig.ui</artifactId>
71
            <scope>compile</scope>
72
        </dependency>
73
        <dependency>
74
            <groupId>org.gvsig</groupId>
75
            <artifactId>org.gvsig.fmap.dal</artifactId>
76
            <scope>compile</scope>
77
        </dependency>
78
        <dependency>
79
            <groupId>org.gvsig</groupId>
80
            <artifactId>org.gvsig.compat</artifactId>
81
            <scope>compile</scope>
82
        </dependency>
83
        <dependency>
84
            <groupId>org.gvsig</groupId>
85
            <artifactId>org.gvsig.projection</artifactId>
86
            <scope>compile</scope>
87
        </dependency>
88
        <dependency>
89
            <groupId>org.gvsig</groupId>
90
            <artifactId>org.gvsig.symbology.lib.api</artifactId>
91
            <scope>compile</scope>
92
        </dependency>
93
        <dependency>
94
            <groupId>org.gvsig</groupId>
95
            <artifactId>org.gvsig.symbology.swing.api</artifactId>
96
            <scope>compile</scope>
97
        </dependency>
98
        <dependency>
99
            <groupId>org.gvsig</groupId>
100
            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
101
            <scope>compile</scope>
102
        </dependency>
103
        <dependency>
104
            <groupId>com.lowagie</groupId>
105
            <artifactId>itext</artifactId>
106
            <scope>compile</scope>
107
        </dependency>
108
        <dependency>
109
            <groupId>org.apache.xmlgraphics</groupId>
110
            <artifactId>batik-gvt</artifactId>
111
            <scope>compile</scope>
112
        </dependency>
113
        <dependency>
114
            <groupId>org.apache.xmlgraphics</groupId>
115
            <artifactId>batik-script</artifactId>
116
            <scope>compile</scope>
117
        </dependency>
118
        <dependency>
119
            <groupId>org.gvsig</groupId>
120
            <artifactId>batik-ext-gvsig-custom</artifactId>
121
        </dependency>
122
        <dependency>
123
            <groupId>com.sun</groupId>
124
            <artifactId>jimi</artifactId>
125
            <scope>compile</scope>
126
        </dependency>
127
    </dependencies>
128
    <profiles>
129
        <profile>
130
            <id>gvsig-install</id>
131
            <activation>
132
                <activeByDefault>true</activeByDefault>
133
            </activation>
134
            <properties>
135
                <!-- Default gvSIG installation folder relative to the current workspace -->
136
                <gvsig.install.dir>${basedir}/../../build/product</gvsig.install.dir>
137
            </properties>
138
        </profile>
139
    </profiles>
140
    <properties>
141
        <package.info.dependencies>required: org.gvsig.app -ge 2.0-2036</package.info.dependencies>
142
        <package.info.categories>Layout</package.info.categories>
143
    </properties>
144
</project>
tags/v2_0_0_Build_2047/extensions/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/distribution/distribution.xml
1
<assembly>
2
    <id>distribution</id>
3
    <formats>
4
        <format>dir</format>
5
    </formats>
6
    <fileSets>
7
        <!-- Estructure for the extension -->
8
        <fileSet>
9
            <directory>src/main/resources</directory>
10
            <outputDirectory>${extension.install.dir.name}
11
            </outputDirectory>
12
        </fileSet>
13
    </fileSets>
14
    <files>
15
        <file>
16
            <source>package.info</source>
17
            <outputDirectory>${extension.install.dir.name}</outputDirectory>
18
        </file>
19
    </files>
20
    <dependencySets>
21
        <dependencySet>
22
            <outputDirectory>${extension.install.dir.name}/${library-dir}
23
            </outputDirectory>
24
            <includes>
25
                <include>org.gvsig:org.gvsig.app.document.layout.app.mainplugin
26
                </include>
27
                <include>*:itext</include>
28
            </includes>
29
        </dependencySet>
30
    </dependencySets>
31
</assembly>
tags/v2_0_0_Build_2047/extensions/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/buildNumber.properties
1
#maven.buildNumber.plugin properties file
2
#Tue May 29 16:38:23 CEST 2012
3
buildNumber=13
tags/v2_0_0_Build_2047/extensions/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/src/test/resources/README.txt
1
Put into this folder the resources needed by your test classes.
2

  
3
This folder is added to the Tests classpath, so you can load any resources 
4
through the ClassLoader.
5

  
6
By default, in this folder you can find an example of log4j configuration,
7
prepared to log messages through the console, so logging works when you
8
run your tests classes.
tags/v2_0_0_Build_2047/extensions/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/src/test/resources/log4j.xml
1
<?xml version="1.0" encoding="ISO-8859-1" ?>
2
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
3

  
4
<!-- 
5
Log4J configuration file for unit tests execution.
6
 -->
7
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
8

  
9
	<!-- Appender configuration to show logging messages through the console -->
10
	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
11
		<layout class="org.apache.log4j.PatternLayout">
12
			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n  %m%n" />
13
		</layout>
14
	</appender>
15

  
16
	<!-- 
17
	Activate logging messages of DEBUG level of higher only for the
18
	org.gvsig.tools packages.
19
	You can put full classes names or packages instead, to configure
20
	logging for all the classes and subpackages of the package.
21
	-->
22
	<category name="org.gvsig.tools">
23
		<priority value="DEBUG" />
24
	</category>
25
	<category name="org.gvsig.app.document.layout">
26
		<priority value="DEBUG" />
27
	</category>
28

  
29
	<!-- 
30
	By default, show only logging messages of INFO level or higher, 
31
	through the previously configured CONSOLE appender. 
32
	-->
33
	<root>
34
		<priority value="INFO" />
35
		<appender-ref ref="CONSOLE" />
36
	</root>
37
</log4j:configuration>
tags/v2_0_0_Build_2047/extensions/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/src/main/resources/config.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<plugin-config>
3
    <libraries library-dir="lib"/>
4
    <depends plugin-name="org.gvsig.app" />
5
	<resourceBundle name="text"/>
6
	<label-set class-name="org.gvsig.app.project.documents.layout.gui.LayoutPanel">
7
		<label id="units" size="80"/>
8
		<label id="2" size="180"/>
9
		<label id="3" size="180"/>
10
		<label id="4" size="50"/>
11
		<label id="5" size="50"/>
12
	</label-set>
13
	<extensions>
14
		<extension class-name="org.gvsig.app.extension.LayoutMainExtension"
15
			description="Extensi?n encargada de gestionar los layouts."
16
			active="true"
17
			priority="10">
18

  
19
			<menu text="Mapa"
20
				position="500"
21
				is_separator="true"/>
22

  
23
			<menu text="Mapa/abrir_plantilla"
24
				action-command="OPENTEMPLATE"
25
				tooltip="abrir_plantilla"
26
				icon="layout-template-open"
27
				position="50010"
28
				last="true"/>
29
		</extension>
30

  
31
		<extension class-name="org.gvsig.app.extension.ExportLayoutExtension"
32
			description="Extension for exporting the layout to PDF and PostScript."
33
			active="true">
34
			<menu text="Mapa/exportar"
35
				position="50010"
36
				is_separator="true"/>
37
			<menu text="Mapa/exportar/exportar_pdf" action-command="PDF"
38
				 tooltip="exportar_pdf" icon="layout-export-pdf"
39
				 position="5001010"/>
40
			<menu text="Mapa/exportar/exportar_ps" action-command="PS"
41
				 tooltip="exportar_ps" icon="layout-export-ps"
42
				 position="5001020"/>
43
			<tool-bar name="gvSIG" position="1">
44
				<action-tool icon="layout-export-pdf" action-command="PDF"  tooltip="exportar_pdf" position="4"/>
45
				<action-tool icon="layout-export-ps" action-command="PS"  tooltip="exportar_ps" position="5"/>
46
			</tool-bar>
47
		</extension>
48

  
49
		<extension class-name="org.gvsig.app.extension.LayoutExtension"
50
			description="Extensi?n encargada de gestionar los eventos realizados sobre el Layout."
51
			active="true">
52

  
53
			<menu text="Mapa/guardar_como_plantilla" action-command="SAVETEMPLATE"
54
				 tooltip="guardar"
55
				 icon="save-icon"
56
				 position="50020"/>
57
			<menu text="Mapa/navegacion"
58
				position="50030" 
59
				is_separator="true"/>
60
			<menu text="Mapa/navegacion/Zoom_Mas" position="5003010" action-command="LAYOUT_ZOOM_IN" tooltip="Zoom_Mas" icon="layout-zoom-in"/>
61
			<menu text="Mapa/navegacion/Zoom_Menos" position="5003020" action-command="LAYOUT_ZOOM_OUT" tooltip="Zoom_Menos" icon="layout-zoom-out"/>
62
			<menu text="Mapa/navegacion/Zoom_Acercar" position="5003030" action-command="LAYOUT_ZOOMIN" tooltip="Zoom_Acercar" icon="view-zoom-center-in"/>
63
			<menu text="Mapa/navegacion/Zoom_Alejar" position="5003040" action-command="LAYOUT_ZOOMOUT" tooltip="Zoom_Alejar" icon="view-zoom-center-out"/>
64
			<menu text="Mapa/navegacion/Zoom_Completo" position="5003050" action-command="LAYOUT_FULL" tooltip="Zoom_Completo" icon="layout-zoom-fit"/>
65
			<menu text="Mapa/navegacion/Zoom_Real" position="5003060" action-command="REALZOOM" tooltip="Zoom_Real" icon="layout-zoom-real"/>
66
			<menu text="Mapa/navegacion/Zoom_Select" position="5003070" action-command="ZOOMSELECT" tooltip="Zoom_Select" icon="layout-zoom-selected"/>
67
			<menu text="Mapa/navegacion/Desplazamiento" position="5003080" action-command="LAYOUT_PAN"  tooltip="Encuadre" icon="layout-pan"/>
68
			<tool-bar name="Layout_Tools_Zooms" position="20">
69
				<selectable-tool icon="layout-zoom-in" action-command="LAYOUT_ZOOM_IN" tooltip="Zoom_Mas"/>
70
				<selectable-tool icon="layout-zoom-out" action-command="LAYOUT_ZOOM_OUT" tooltip="Zoom_Menos"/>
71
				<action-tool icon="view-zoom-center-in" action-command="LAYOUT_ZOOMIN" tooltip="Zoom_Acercar"/>
72
				<action-tool icon="view-zoom-center-out" action-command="LAYOUT_ZOOMOUT" tooltip="Zoom_Alejar"/>
73
				<action-tool icon="layout-zoom-fit" action-command="LAYOUT_FULL" tooltip="Zoom_Completo"/>
74
				<action-tool icon="layout-zoom-real" action-command="REALZOOM" tooltip="Zoom_Real"/>
75
				<action-tool icon="layout-zoom-selected" action-command="ZOOMSELECT" tooltip="Zoom_Select"/>
76
				<selectable-tool icon="layout-pan" action-command="LAYOUT_PAN"  tooltip="Encuadre"/>
77
			</tool-bar>
78
		</extension>
79

  
80
		<extension class-name="org.gvsig.app.extension.LayoutEditableControls"
81
			description="Extensi?n encargada de gestionar los eventos de edici?n realizados sobre el Layout."
82
			active="true">
83
			<menu text="Mapa/propiedades" position="50040" action-command="PROPERTIES" tooltip="propiedades_mapa"/>
84
		</extension>
85

  
86
		<extension class-name="org.gvsig.app.extension.LayoutEditVertexExtension"
87
			description="Extensi?n encargada de gestionar los eventos de edici?n realizados sobre el Layout."
88
			active="true">
89
			<menu text="Mapa/edicion"
90
				position="50050" 
91
				is_separator="true"/>
92
			<menu text="Mapa/edicion/editar_vertices" position="5005010" action-command="VERTEX" tooltip="editar_vertices" icon="layout-edit-vertex"/>
93
			<tool-bar name="Tools_Select" position="6">
94
				<selectable-tool icon="layout-edit-vertex" action-command="VERTEX" tooltip="editar_vertices" position="4"/>
95
			</tool-bar>
96
		</extension>
97

  
98
		<extension class-name="org.gvsig.app.extension.LayoutInsertToolsExtension"
99
			description="Extensi?n encargada de gestionar los eventos de edici?n realizados sobre el Layout."
100
			active="true">
101
			<menu text="Mapa/seleccion"
102
				position="50060" 
103
				is_separator="true"/>
104
			<menu text="Mapa/seleccion/seleccionar_por_rectangulo" position="5006010" action-command="SELECT"  tooltip="seleccionar_por_rectangulo" icon="view-select-geometry"/>
105
			<menu text="Mapa/Insertar"
106
				position="50070" 
107
				is_separator="true"/>
108
			<menu text="Mapa/Insertar/texto" position="5007010" action-command="RECTANGLETEXT" tooltip="insertar_texto" icon="layout-insert-text"/>
109
			<menu text="Mapa/Insertar/punto" position="5007015" action-command="POINT" tooltip="insertar_punto" icon="layout-insert-point"/>
110
			<menu text="Mapa/Insertar/rectangulo" position="5007020" action-command="RECTANGLESIMPLE" tooltip="insertar_rectangulo" icon="layout-insert-polygon"/>
111
			<menu text="Mapa/Insertar/circulo" position="5007025" action-command="CIRCLE" tooltip="insertar_circulo" icon="layout-insert-circle"/>
112
			<menu text="Mapa/Insertar/linea" position="5007030" action-command="LINE" tooltip="insertar_linea" icon="layout-insert-line"/>
113
			<menu text="Mapa/Insertar/polilinea" position="5007035" action-command="POLYLINE" tooltip="insertar_polilinea" icon="layout-insert-polyline"/>
114
			<menu text="Mapa/Insertar/poligono" position="5007040" action-command="POLYGON" tooltip="insertar_poligono" icon="layout-insert-poligon"/>
115
			<menu text="Mapa/Insertar/imagen" position="5007045" action-command="RECTANGLEPICTURE" tooltip="insertar_imagen" icon="layout-insert-image"/>
116
			<menu text="Mapa/Insertar/Vista" position="5007050" action-command="RECTANGLEVIEW" tooltip="insertar_vista" icon="layout-insert-view"/>
117
			<menu text="Mapa/Insertar/Localizador" position="5007055" action-command="RECTANGLEOVERVIEW" tooltip="insertar_localizador" icon="layout-insert-locator"/>
118
			<menu text="Mapa/Insertar/leyenda" position="5007060" action-command="RECTANGLELEGEND"  tooltip="insertar_leyenda" icon="layout-insert-legend"/>
119
			<menu text="Mapa/Insertar/escala" position="5007065" action-command="RECTANGLESCALEBAR"  tooltip="insertar_escala" icon="layout-insert-scalebar"/>
120
			<menu text="Mapa/Insertar/north" position="5007070" action-command="RECTANGLENORTH" tooltip="insertar_norte" icon="layout-insert-north"/>
121
			<menu text="Mapa/Insertar/cajetin" position="5007075" action-command="RECTANGLEBOX" tooltip="insertar_cajetin" icon="layout-insert-box"/>
122

  
123
			<tool-bar name="Tools_Select" position="6">
124
				<selectable-tool icon="view-select-geometry" action-command="SELECT"  tooltip="seleccionar_por_rectangulo" position="5"/>
125
				<action-tool icon="remove-selection" action-command="REMOVE" tooltip="borra_seleccion" position="6"/>
126
			</tool-bar>
127

  
128
			<tool-bar name="Layout_Tools_Insert_Simple" position="7">
129
				<selectable-tool icon="layout-insert-text" action-command="RECTANGLETEXT"  tooltip="insertar_texto" position="1"/>
130
				<selectable-tool icon="layout-insert-image" action-command="RECTANGLEPICTURE"  tooltip="insertar_imagen" position="2"/>
131
				<selectable-tool icon="layout-insert-point" action-command="POINT"  tooltip="insertar_punto" position="3"/>
132
				<selectable-tool icon="layout-insert-polygon" action-command="RECTANGLESIMPLE"  tooltip="insertar_rectangulo" position="4"/>
133
				<selectable-tool icon="layout-insert-circle" action-command="CIRCLE"  tooltip="insertar_circulo" position="5"/>
134
				<selectable-tool icon="layout-insert-line" action-command="LINE"  tooltip="insertar_linea" position="6"/>
135
				<selectable-tool icon="layout-insert-polyline" action-command="POLYLINE"  tooltip="insertar_polilinea" position="7"/>
136
				<selectable-tool icon="layout-insert-poligon" action-command="POLYGON" tooltip="insertar_poligono" position="8"/>
137
			</tool-bar>
138

  
139
			<tool-bar name="Layout_Tools_Insert_Cartografy" position="8">
140
				<selectable-tool icon="layout-insert-view" action-command="RECTANGLEVIEW" tooltip="insertar_vista" position="1"/>
141
				<selectable-tool icon="layout-insert-locator" action-command="RECTANGLEOVERVIEW" tooltip="insertar_localizador" position="2"/>
142
				<selectable-tool icon="layout-insert-legend" action-command="RECTANGLELEGEND"  tooltip="insertar_leyenda" position="3"/>
143
				<selectable-tool icon="layout-insert-scalebar" action-command="RECTANGLESCALEBAR"  tooltip="insertar_escala" position="4"/>
144
				<selectable-tool icon="layout-insert-north" action-command="RECTANGLENORTH"  tooltip="insertar_norte" position="5"/>
145
				<selectable-tool icon="layout-insert-box" action-command="RECTANGLEBOX"  tooltip="insertar_cajetin" position="6"/>
146
			</tool-bar>
147
		</extension>
148

  
149
		<extension class-name="org.gvsig.app.extension.FFrameViewExtension"
150
			description="Extensi?n encargada de gestionar los eventos realizados sobre las vistas a?adidas al Layout."
151
			active="true">
152
			<menu text="Mapa/navegacion_vista"
153
				position="50070" 
154
				is_separator="true"/>
155
			<menu text="Mapa/navegacion_vista/Zoom_Mas_Vista" position="5007010" action-command="VIEW_ZOOMIN" tooltip="Zoom_Mas_Vista" icon="view-zoom-in"/>
156
			<menu text="Mapa/navegacion_vista/Zoom_Menos_Vista" position="5007020" action-command="VIEW_ZOOMOUT" tooltip="Zoom_Menos_Vista" icon="view-zoom-out"/>
157
			<menu text="Mapa/navegacion_vista/Zoom_Completo_Vista" position="5007030" action-command="VIEW_FULL" tooltip="Zoom_Completo_Vista" icon="view-zoom-map-contents"/>
158
			<menu text="Mapa/navegacion_vista/Encuadre_Vista" position="5007040" action-command="VIEW_PAN" tooltip="Encuadre_Vista" icon="view-pan"/>
159
			<tool-bar name="Layout_Tools_View" position="9">
160
				<action-tool icon="view-zoom-map-contents" action-command="VIEW_FULL" tooltip="Zoom_Completo_Vista" position="1"/>
161
				<selectable-tool icon="view-zoom-in" action-command="VIEW_ZOOMIN" tooltip="Zoom_Mas_Vista" position="2"/>
162
				<selectable-tool icon="view-zoom-out" action-command="VIEW_ZOOMOUT" tooltip="Zoom_Menos_Vista" position="3"/>
163
				<selectable-tool icon="view-pan" action-command="VIEW_PAN" tooltip="Encuadre_Vista" position="4"/>
164
			</tool-bar>
165
		</extension>
166

  
167
		<extension class-name="org.gvsig.app.extension.TagExtension"
168
			description="Extensi?n para a?adir un tag a los FFrames."
169
			active="false">
170
			<menu text="Mapa/anadir_tag" position="50075" key="t" action-command="SET_TAG" tooltip="anadir_tag" icon="layout-tag"/>
171
			<tool-bar name="Mapa" position="10">
172
				<action-tool icon="layout-insert-tag" action-command="SET_TAG" tooltip="anadir_tag" position="1"/>
173
				<action-tool icon="layout-show-tag" action-command="VIEW_TAGS" tooltip="ver_tags" position="2"/>
174
			</tool-bar>
175
		</extension>
176

  
177
		<extension class-name="org.gvsig.app.extension.LayoutGraphicControls"
178
			description="Extensi?n encargada de gestionar los eventos realizados sobre los gr?ficos que contiene el Layout."
179
			active="true">
180
			<menu text="Mapa/Graficos"
181
				position="50080" 
182
				is_separator="true"/>
183
			<menu text="Mapa/Graficos/propiedades" position="5008010" action-command="PROPIEDADES" tooltip="propiedades" />
184
			<menu text="Mapa/Graficos/alinear" position="5008020" action-command="ALINEAR" tooltip="alinear_graficos"/>
185
			<menu text="Mapa/Graficos/agrupar" position="5008030" action-command="AGRUPAR" tooltip="agrupar_graficos" icon="layout-group"/>
186
			<menu text="Mapa/Graficos/desagrupar" position="5008040" action-command="DESAGRUPAR" tooltip="desagrupar_graficos" icon="layout-ungroup"/>
187
			<menu text="Mapa/Graficos/colocar_delante" position="5008050" action-command="DELANTE" tooltip="colocar_delante" icon="layout-bring-to-front"/>
188
			<menu text="Mapa/Graficos/colocar_detras" position="5008060" action-command="DETRAS" tooltip="colocar_detras" icon="layout-send-to-back"/>
189
			<menu text="Mapa/Graficos/tamano_posicion" position="5008070" action-command="POSICIONAR" tooltip="tamano_posicion" icon="layout-set-size-position"/>
190
			<menu text="Mapa/Graficos/linea_grafica" position="5008080" action-command="BORDEAR" tooltip="linea_grafica" icon="layout-add-border"/>
191
			<tool-bar name="Layout_Tools_Graphics" position="11">
192
				<action-tool icon="layout-bring-to-front" action-command="DELANTE" tooltip="colocar_delante" position="1"/>
193
				<action-tool icon="layout-send-to-back" action-command="DETRAS" tooltip="colocar_detras" position="2"/>
194
				<action-tool icon="layout-set-size-position" action-command="POSICIONAR" tooltip="tamano_posicion" position="3"/>
195
				<action-tool icon="layout-group" action-command="AGRUPAR" tooltip="agrupar_graficos" position="4"/>
196
				<action-tool icon="layout-ungroup" action-command="DESAGRUPAR" tooltip="desagrupar_graficos" position="5"/>
197
				<action-tool icon="layout-add-border" action-command="BORDEAR" tooltip="linea_grafica" position="6"/>
198
			</tool-bar>
199
		</extension>
200

  
201
		<extension class-name="org.gvsig.app.extension.FFrameLegendExtension"
202
			description="Extensi?n encargada de controlar un FFrameLegend."
203
			active="true">
204
			<menu text="Mapa/Graficos/simplificar_leyenda" position="5008090" action-command="SIMPLIFICAR" tooltip="simplificar_leyenda"/>
205
		</extension>
206

  
207
		<extension class-name="org.gvsig.app.extension.LayoutRedoExtension"
208
			description="Extensi?n para rehacer cambios sobre el Layout."
209
			active="true">
210
			<menu text="Mapa/rehacer" position="50084" action-command="REDO" tooltip="rehacer" icon="layout-redo"/>
211
			<tool-bar name="Mapa" position="10">
212
				<action-tool icon="layout-redo" action-command="REDO" tooltip="rehacer" position="4"/>
213
			</tool-bar>
214
		</extension>
215

  
216
		<extension class-name="org.gvsig.app.extension.LayoutUndoExtension"
217
			description="Extensi?n para deshacer cambios sobre el Layout."
218
			active="true">
219
			<menu text="Mapa/deshacer" position="50086" action-command="UNDO" tooltip="dehacer" icon="layout-undo"/>
220
			<tool-bar name="Mapa" position="10">
221
				<action-tool icon="layout-undo" action-command="UNDO" tooltip="deshacer" position="3"/>
222
			</tool-bar>
223
		</extension>
224

  
225
		<extension class-name="org.gvsig.app.extension.LayoutCommandStackExtension"
226
			description="Extensi?n encargada de abrir el di?logo para gestionar los comandos apilados."
227
			active="true">
228
			<menu text="Mapa/pila_de_comandos" position="50090" key="k" action-command="COMMANDSTACK" tooltip="pila_de_comandos" icon="edition-command-stack"/>
229
			<tool-bar name="Mapa" position="10">
230
				<action-tool icon="edition-command-stack" action-command="COMMANDSTACK" tooltip="pila_de_comandos" position="5"/>
231
			</tool-bar>
232
		</extension>
233

  
234
		<extension class-name="org.gvsig.app.extension.Print"
235
			description="Extensi?n encargada de la impresi?n."
236
			active="true">
237
			<menu text="Mapa/Imprimir" position="50094" icon="document-print" tooltip="Imprimir"/>
238
			<tool-bar name="Mapa" position="10">
239
				<action-tool icon="document-print" tooltip="Imprimir" position="6"/>
240
			</tool-bar>
241
		</extension>
242

  
243
		<extension class-name="org.gvsig.app.extension.PrintProperties"
244
			escription="Extensi?n encargada de las propiedades de impresi?n."
245
			active="true">
246
			<menu text="Mapa/preparar_pagina" position="50096" action-command="CONFIG" tooltip="preparar_pagina"/>
247
			<tool-bar name="Mapa" position="10">
248
				<action-tool icon="layout-page-setup" tooltip="preparar_pagina" position="7"/>
249
			</tool-bar>
250
		</extension>
251
	</extensions>
252
</plugin-config>
tags/v2_0_0_Build_2047/extensions/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/src/main/resources/build.number
1
#Build Number for ANT. Do not edit!
2
#Tue Apr 28 16:00:47 CEST 2009
3
build.number=2005
tags/v2_0_0_Build_2047/extensions/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/src/main/java/org/gvsig/app/gui/preferencespage/LayoutPage.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.app.gui.preferencespage;
23

  
24
import javax.swing.ImageIcon;
25
import javax.swing.JCheckBox;
26
import javax.swing.JPanel;
27
import javax.swing.JTextField;
28

  
29
import org.gvsig.andami.PluginServices;
30
import org.gvsig.andami.preferences.AbstractPreferencePage;
31
import org.gvsig.andami.preferences.StoreException;
32
import org.gvsig.app.project.ProjectManager;
33
import org.gvsig.app.project.documents.layout.Attributes;
34
import org.gvsig.app.project.documents.layout.DefaultLayoutManager;
35
import org.gvsig.utils.XMLEntity;
36

  
37
/**
38
 * Layout preference page where the user can establish default values for
39
 * <ol>
40
 * <li><b>grid horizontal gap</b></li>
41
 * <li><b>grid vertical gap</b></li>
42
 * <li><b>show or hide grid</b></li>
43
 * <li><b>adjust elements to grid</b></li>
44
 * <li><b>show or hide rules</b></li>
45
 * </ol>
46
 * 
47
 * @author jaume dominguez faus - jaume.dominguez@iver.es
48
 * 
49
 */
50
public class LayoutPage extends AbstractPreferencePage {
51

  
52
    private static final long serialVersionUID = -8225970409668105935L;
53
    private static final boolean FACTORY_DEFAULT_LAYOUT_ENABLE_RULES = true;
54
    private static final boolean FACTORY_DEFAULT_LAYOUT_GRID_SHOW = true;
55
    private static final double FACTORY_DEFAULT_VERTICAL_GAP = 1;
56
    private static final double FACTORY_DEFAULT_HORIZONTAL_GAP = 1;
57
    private static final boolean FACTORY_DEFAULT_LAYOUT_GRID_ENABLE = false;
58
    private static final String DEFAULT_SHOW_LAYOUT_GRID_KEY_NAME =
59
        "DefaultShowLayoutGrid";
60
    private static final String DEFAULT_ENABLE_LAYOUT_GRID_KEY_NAME =
61
        "DefaultEnableLayoutGrid";
62
    private static final String DEFAULT_SHOW_LAYOUT_RULES_KEY_NAME =
63
        "DefaultShowLayoutRules";
64
    private static final String DEFAULT_LAYOUT_GRID_VERTICAL_GAP_KEY_NAME =
65
        "DefaultGridVerticalGap";
66
    private static final String DEFAULT_LAYOUT_GRID_HORIZONTAL_GAP_KEY_NAME =
67
        "DefaultGridHorizontalGap";
68
    static String id = LayoutPage.class.getName();;
69
    private ImageIcon icon;
70
    private JCheckBox chkGridEnabled;
71
    private JCheckBox chkShowRules;
72
    private JCheckBox chkShowGrid;
73
    private JTextField txtVGap;
74
    private JTextField txtHGap;
75

  
76
    private static DefaultLayoutManager layoutManager = null;
77

  
78
    /**
79
     * Builds preference page where the user can establish default values for
80
     * <ol>
81
     * <li><b>grid horizontal gap</b></li>
82
     * <li><b>grid vertical gap</b></li>
83
     * <li><b>show or hide grid</b></li>
84
     * <li><b>adjust elements to grid</b></li>
85
     * <li><b>show or hide rules</b></li>
86
     * </ol>
87
     */
88
    public LayoutPage() {
89
        super();
90
        layoutManager =
91
            (DefaultLayoutManager) ProjectManager.getInstance()
92
                .getDocumentManager(DefaultLayoutManager.TYPENAME);
93

  
94
        icon = PluginServices.getIconTheme().get("mapa-icono");
95

  
96
        // horizontal gap text field
97
        addComponent(PluginServices.getText(this, "espaciado_horizontal"),
98
            txtHGap = new JTextField(5));
99

  
100
        // vertical gap text field
101
        addComponent(PluginServices.getText(this, "espaciado_vertical"),
102
            txtVGap = new JTextField(5));
103

  
104
        // show/hide show check
105
        addComponent(chkShowGrid =
106
            new JCheckBox(PluginServices.getText(this, "visualizar_cuadricula")));
107

  
108
        // enable/disable grid
109
        addComponent(chkGridEnabled =
110
            new JCheckBox(PluginServices.getText(this, "malla_activada")));
111

  
112
        // show/hide rules
113
        addComponent(chkShowRules =
114
            new JCheckBox(PluginServices.getText(this, "activar_regla")));
115

  
116
    }
117

  
118
    public void storeValues() throws StoreException {
119
        double hGap, vGap;
120
        boolean gridEnabled, showRules, showGrid;
121
        try {
122
            hGap = Double.parseDouble(txtHGap.getText());
123
            vGap = Double.parseDouble(txtVGap.getText());
124
            gridEnabled = chkGridEnabled.isSelected();
125
            showGrid = chkShowGrid.isSelected();
126
            showRules = chkShowRules.isSelected();
127
        } catch (Exception e) {
128
            throw new StoreException(PluginServices.getText(this,
129
                "invalid_value_for_gap"));
130
        }
131
        layoutManager.setDefaultShowGrid(showGrid);
132
        layoutManager.setDefaultAdjustToGrid(gridEnabled);
133
        layoutManager.setDefaultShowRulers(showRules);
134
        Attributes.setDefaultGridGap(hGap, vGap);
135
        PluginServices ps = PluginServices.getPluginServices(this);
136
        XMLEntity xml = ps.getPersistentXML();
137
        xml.putProperty(DEFAULT_LAYOUT_GRID_HORIZONTAL_GAP_KEY_NAME, hGap);
138
        xml.putProperty(DEFAULT_LAYOUT_GRID_VERTICAL_GAP_KEY_NAME, vGap);
139
        xml.putProperty(DEFAULT_SHOW_LAYOUT_GRID_KEY_NAME, showGrid);
140
        xml.putProperty(DEFAULT_ENABLE_LAYOUT_GRID_KEY_NAME, gridEnabled);
141
        xml.putProperty(DEFAULT_SHOW_LAYOUT_RULES_KEY_NAME, showRules);
142
    }
143

  
144
    public String getID() {
145
        return id;
146
    }
147

  
148
    public String getTitle() {
149
        return PluginServices.getText(this, "Mapa");
150
    }
151

  
152
    public JPanel getPanel() {
153
        return this;
154
    }
155

  
156
    public void initializeValues() {
157
        PluginServices ps = PluginServices.getPluginServices(this);
158
        XMLEntity xml = ps.getPersistentXML();
159
        double hGap = FACTORY_DEFAULT_HORIZONTAL_GAP;
160
        double vGap = FACTORY_DEFAULT_VERTICAL_GAP;
161
        boolean showGrid = FACTORY_DEFAULT_LAYOUT_GRID_SHOW;
162
        boolean gridEnabled = FACTORY_DEFAULT_LAYOUT_GRID_ENABLE;
163
        boolean showRules = FACTORY_DEFAULT_LAYOUT_ENABLE_RULES;
164
        // horizontal gap
165
        if (xml.contains(DEFAULT_LAYOUT_GRID_HORIZONTAL_GAP_KEY_NAME)) {
166
            hGap =
167
                xml.getDoubleProperty(DEFAULT_LAYOUT_GRID_HORIZONTAL_GAP_KEY_NAME);
168
        }
169
        txtHGap.setText(String.valueOf(hGap));
170

  
171
        // vertical gap
172
        if (xml.contains(DEFAULT_LAYOUT_GRID_VERTICAL_GAP_KEY_NAME)) {
173
            vGap =
174
                xml.getDoubleProperty(DEFAULT_LAYOUT_GRID_VERTICAL_GAP_KEY_NAME);
175
        }
176
        txtVGap.setText(String.valueOf(vGap));
177

  
178
        // show/hide grid check
179
        if (xml.contains(DEFAULT_SHOW_LAYOUT_GRID_KEY_NAME)) {
180
            showGrid =
181
                xml.getBooleanProperty(DEFAULT_SHOW_LAYOUT_GRID_KEY_NAME);
182
        }
183
        chkShowGrid.setSelected(showGrid);
184

  
185
        // enable/disable grid check
186
        if (xml.contains(DEFAULT_ENABLE_LAYOUT_GRID_KEY_NAME)) {
187
            gridEnabled =
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff