Revision 37760
tags/v2_0_0_Build_2043/extensions/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app/buildNumber.properties | ||
---|---|---|
1 |
#maven.buildNumber.plugin properties file |
|
2 |
#Thu Jan 12 18:41:20 CET 2012 |
|
3 |
buildNumber=9 |
tags/v2_0_0_Build_2043/extensions/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>org.gvsig.app.document.layout.app</name> |
|
4 |
<comment></comment> |
|
5 |
<projects> |
|
6 |
</projects> |
|
7 |
<buildSpec> |
|
8 |
</buildSpec> |
|
9 |
<natures> |
|
10 |
</natures> |
|
11 |
</projectDescription> |
tags/v2_0_0_Build_2043/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>alpha3</package.info.state> |
|
88 |
</properties> |
|
89 |
</project> |
tags/v2_0_0_Build_2043/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_2043/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_2043/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_2043/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_2043/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/project/documents/layout/Attributes.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.project.documents.layout; |
|
23 |
|
|
24 |
import java.awt.Rectangle; |
|
25 |
import java.awt.geom.Point2D; |
|
26 |
import java.awt.geom.Rectangle2D; |
|
27 |
import java.awt.print.PageFormat; |
|
28 |
import java.awt.print.Paper; |
|
29 |
import java.text.NumberFormat; |
|
30 |
|
|
31 |
import javax.print.attribute.HashPrintRequestAttributeSet; |
|
32 |
import javax.print.attribute.PrintRequestAttributeSet; |
|
33 |
import javax.print.attribute.standard.Copies; |
|
34 |
import javax.print.attribute.standard.Fidelity; |
|
35 |
import javax.print.attribute.standard.Media; |
|
36 |
import javax.print.attribute.standard.MediaPrintableArea; |
|
37 |
import javax.print.attribute.standard.MediaSizeName; |
|
38 |
import javax.print.attribute.standard.OrientationRequested; |
|
39 |
import javax.print.attribute.standard.PrintQuality; |
|
40 |
import javax.print.attribute.standard.Sides; |
|
41 |
|
|
42 |
import org.gvsig.andami.PluginServices; |
|
43 |
import org.gvsig.compat.CompatLocator; |
|
44 |
import org.gvsig.compat.print.PrintAttributes; |
|
45 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
46 |
import org.gvsig.tools.ToolsLocator; |
|
47 |
import org.gvsig.tools.dynobject.DynStruct; |
|
48 |
import org.gvsig.tools.persistence.PersistenceManager; |
|
49 |
import org.gvsig.tools.persistence.Persistent; |
|
50 |
import org.gvsig.tools.persistence.PersistentState; |
|
51 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
|
52 |
import org.gvsig.utils.XMLEntity; |
|
53 |
|
|
54 |
/** |
|
55 |
* Attributes of Layout. |
|
56 |
* |
|
57 |
* @author Vicente Caballero Navarro |
|
58 |
*/ |
|
59 |
public class Attributes implements Persistent { |
|
60 |
|
|
61 |
public static final String PERSISTENCE_DEFINITION_NAME = "Attributes"; |
|
62 |
public static final String DPI_FIELD = "DPI"; |
|
63 |
public static final String DPISCREEN_FIELD = "DPISCREEN"; |
|
64 |
public static final String TYPEUNIT_FIELD = "typeUnit"; |
|
65 |
public static final String NUMX_FIELD = "numX"; |
|
66 |
public static final String NUMY_FIELD = "numY"; |
|
67 |
public static final String UNITX_FIELD = "unitX"; |
|
68 |
public static final String UNITY_FIELD = "unitY"; |
|
69 |
public static final String HASMARGIN_FIELD = "hasMargin"; |
|
70 |
public static final String RESOLUTIONSEL_FIELD = "resolutionSel"; |
|
71 |
public static final String TYPESEL_FIELD = "typeSel"; |
|
72 |
public static final String SELTYPEUNIT_FIELD = "selTypeUnit"; |
|
73 |
public static final String SIZEPAPER_FIELD = "sizePaper"; |
|
74 |
public static final String AREA_FIELD = "area"; |
|
75 |
public static final String WIDTHXHEIGHT_FIELD = "widthXHeight"; |
|
76 |
public static final String SIZEINUNITS_FIELD = "sizeInUnits"; |
|
77 |
public static final String ISLANDSEL_FIELD = "isLandSel"; |
|
78 |
|
|
79 |
/** |
|
80 |
* Array of doubles containg the change factro from <b>CENTIMETERS</b> to |
|
81 |
* KILOMETERS, METERS, CENTIMETERS, MILLIMETERS, MILES, YARDS, FEET, INCHES, |
|
82 |
* DECIMAL DEGREES |
|
83 |
*/ |
|
84 |
/* |
|
85 |
* Do not alter the order and the values of this array, if you need append |
|
86 |
* values. |
|
87 |
*/ |
|
88 |
public static final double[] CHANGE = { 100000, 100, 1, 0.1, 160934.4, |
|
89 |
91.44, 30.48, 2.54, 8.983152841195214E-6 }; |
|
90 |
public static final String DEGREES = "Grados"; |
|
91 |
/* |
|
92 |
* Do not alter the order and the values of this array, if you need append |
|
93 |
* values. |
|
94 |
*/ |
|
95 |
public static final double[] UNIT = { 0.0000025, 0.0025, 0.25, 2.5, |
|
96 |
0.0000025, 0.025, 0.025, 0.25, 8.8E-7 }; |
|
97 |
public static final int HIGH = 0; |
|
98 |
public static final int NORMAL = 1; |
|
99 |
public static final int DRAFT = 2; |
|
100 |
|
|
101 |
// Para impresi?n |
|
102 |
public final static double PULGADA = 2.54; |
|
103 |
|
|
104 |
// public final static Size CUSTOM_PAPER_SIZE = new Size(8.5, 11.0); |
|
105 |
public final static Size STANDARD_LETTER_PAPER_SIZE = new Size(8.5, 11.0); |
|
106 |
public final static Size STANDARD_FOLIO_PAPER_SIZE = new Size(8.5, 13.0); |
|
107 |
public final static Size STANDARD_LEGAL_PAPER_SIZE = new Size(8.5, 14.0); |
|
108 |
public final static Size STANDARD_TABLOID_PAPER_SIZE = new Size(11.0, 17.0); |
|
109 |
public final static Size METRIC_A0_PAPER_SIZE = new Size(118.9, 84.1); |
|
110 |
public final static Size METRIC_A1_PAPER_SIZE = new Size(84.1, 59.4); |
|
111 |
public final static Size METRIC_A2_PAPER_SIZE = new Size(59.4, 42.0); |
|
112 |
public final static Size METRIC_A3_PAPER_SIZE = new Size(42.0, 29.7); |
|
113 |
public final static Size METRIC_A4_PAPER_SIZE = new Size(29.7, 21.0); |
|
114 |
public final static Size METRIC_A5_PAPER_SIZE = new Size(21.0, 14.8); |
|
115 |
public final static Size ANSI_ENG_A_PAPER_SIZE = new Size(11.0, 8.5); |
|
116 |
public final static Size ANSI_ENG_B_PAPER_SIZE = new Size(17.0, 11.0); |
|
117 |
public final static Size ANSI_ENG_C_PAPER_SIZE = new Size(22.0, 17.0); |
|
118 |
public final static Size ANSI_ENG_D_PAPER_SIZE = new Size(34.0, 22.0); |
|
119 |
public final static Size ANSI_ENG_E_PAPER_SIZE = new Size(44.0, 34.0); |
|
120 |
public final static Size ANSI_ARCH_A_PAPER_SIZE = new Size(12.0, 9.0); |
|
121 |
public final static Size ANSI_ARCH_B_PAPER_SIZE = new Size(18.0, 12.0); |
|
122 |
public final static Size ANSI_ARCH_C_PAPER_SIZE = new Size(24.0, 18.0); |
|
123 |
public final static Size ANSI_ARCH_D_PAPER_SIZE = new Size(36.0, 24.0); |
|
124 |
public final static Size ANSI_ARCH_E_PAPER_SIZE = new Size(42.0, 30.0); |
|
125 |
public static Size CUSTOM_PAPER_SIZE = new Size(100.0, 100.0); |
|
126 |
public final static int PRINT = 0; |
|
127 |
public final static int CUSTOM = 6; |
|
128 |
public final static int A0 = 5; |
|
129 |
public final static int A1 = 4; |
|
130 |
public final static int A2 = 3; |
|
131 |
public final static int A3 = 2; |
|
132 |
public final static int A4 = 1; |
|
133 |
public static int DPI = 300; |
|
134 |
public static int DPISCREEN = 72; |
|
135 |
public static Rectangle clipRect = new Rectangle(); |
|
136 |
private static Point2D defaultGridGap; |
|
137 |
|
|
138 |
// static { |
|
139 |
// new Attributes(); |
|
140 |
// } |
|
141 |
|
|
142 |
private PrintRequestAttributeSet attributes = |
|
143 |
new HashPrintRequestAttributeSet(); |
|
144 |
private MediaSizeName m_type = MediaSizeName.ISO_A4; |
|
145 |
private boolean m_isLandSel; |
|
146 |
private OrientationRequested m_Orientation; |
|
147 |
private double m_TypeUnit = CHANGE[2]; // CENTIMETROS; |
|
148 |
private String m_NameUnit; |
|
149 |
private Double m_numX = null; |
|
150 |
private Double m_numY = null; |
|
151 |
private double m_unitX = 0; |
|
152 |
private double m_unitY = 0; |
|
153 |
private boolean hasmargin; |
|
154 |
private int m_resolutionSel = NORMAL; |
|
155 |
private int m_typeSel = PRINT; |
|
156 |
private int m_selTypeUnit = 2; |
|
157 |
public Size m_sizePaper = new Size(METRIC_A4_PAPER_SIZE.getAlto(), |
|
158 |
METRIC_A4_PAPER_SIZE.getAncho()); |
|
159 |
public double[] m_area = { PULGADA, PULGADA, PULGADA, PULGADA }; |
|
160 |
private double anchoXalto = m_sizePaper.getAlto() / m_sizePaper.getAncho(); |
|
161 |
private Size m_sizeinUnits = m_sizePaper; |
|
162 |
private PrintQuality m_resolution = PrintQuality.NORMAL; |
|
163 |
|
|
164 |
/** |
|
165 |
* Create a new object of Attributes. |
|
166 |
* |
|
167 |
*/ |
|
168 |
public Attributes() { |
|
169 |
m_NameUnit = PluginServices.getText(this, "Centimetros"); |
|
170 |
m_type = MediaSizeName.ISO_A4; |
|
171 |
m_isLandSel = true; |
|
172 |
setSizeinUnits(m_isLandSel); |
|
173 |
|
|
174 |
hasmargin = false; |
|
175 |
m_Orientation = OrientationRequested.LANDSCAPE; |
|
176 |
attributes.add(new Copies(1)); |
|
177 |
attributes.add(MediaSizeName.ISO_A4); |
|
178 |
attributes.add(Sides.ONE_SIDED); |
|
179 |
attributes.add(Fidelity.FIDELITY_FALSE); |
|
180 |
attributes.add(PrintQuality.NORMAL); |
|
181 |
|
|
182 |
setType(m_typeSel); |
|
183 |
|
|
184 |
attributes.add(new MediaPrintableArea(0, 0, (float) ((m_sizePaper |
|
185 |
.getAlto() * DPISCREEN) / PULGADA), (float) ((m_sizePaper |
|
186 |
.getAncho() * DPISCREEN) / PULGADA), MediaPrintableArea.MM)); |
|
187 |
} |
|
188 |
|
|
189 |
/** |
|
190 |
* Inserts the Layout's properties to print. |
|
191 |
* |
|
192 |
* @param typeSel |
|
193 |
* Type of sheet. |
|
194 |
* @param units |
|
195 |
* Units. |
|
196 |
* @param isLand |
|
197 |
* True if the sheet is horizontal. |
|
198 |
* @param margin |
|
199 |
* True if the sheet has margin. |
|
200 |
* @param resolution |
|
201 |
* Type of quality of resolution. |
|
202 |
* @param area |
|
203 |
* Printing area. |
|
204 |
*/ |
|
205 |
public void setSelectedOptions(int typeSel, int units, boolean isLand, |
|
206 |
boolean margin, int resolution, double[] area) { |
|
207 |
setType(typeSel); |
|
208 |
setUnit(units); |
|
209 |
setIsLandScape(isLand); |
|
210 |
hasmargin = margin; |
|
211 |
setResolution(resolution); |
|
212 |
m_area = area; |
|
213 |
} |
|
214 |
|
|
215 |
/** |
|
216 |
* Returns a PageFormat with the properties of printing. |
|
217 |
* |
|
218 |
* @return PageFormat |
|
219 |
*/ |
|
220 |
public PageFormat getPageFormat() { |
|
221 |
PageFormat pf1 = new PageFormat(); |
|
222 |
Paper paper = pf1.getPaper(); |
|
223 |
|
|
224 |
if (isLandSpace()) { |
|
225 |
pf1.setOrientation(0); |
|
226 |
paper.setSize((m_sizePaper.getAncho() * DPISCREEN) / PULGADA, |
|
227 |
(m_sizePaper.getAlto() * DPISCREEN) / PULGADA); |
|
228 |
|
|
229 |
double aux = m_area[0]; |
|
230 |
m_area[0] = m_area[3]; |
|
231 |
m_area[3] = m_area[1]; |
|
232 |
m_area[1] = m_area[2]; |
|
233 |
m_area[2] = aux; |
|
234 |
paper.setImageableArea(getInPixels(m_area[2]), |
|
235 |
getInPixels(m_area[0]), getInPixels(m_sizeinUnits.getAncho() |
|
236 |
- m_area[2] - m_area[3]), |
|
237 |
getInPixels(m_sizeinUnits.getAlto() - m_area[0] - m_area[1])); |
|
238 |
} else { |
|
239 |
pf1.setOrientation(1); |
|
240 |
paper.setSize((m_sizePaper.getAlto() * DPISCREEN) / PULGADA, |
|
241 |
(m_sizePaper.getAncho() * DPISCREEN) / PULGADA); |
|
242 |
paper.setImageableArea(getInPixels(m_area[2]), |
|
243 |
getInPixels(m_area[0]), getInPixels(m_sizeinUnits.getAlto() |
|
244 |
- m_area[2] - m_area[3]), |
|
245 |
getInPixels(m_sizeinUnits.getAncho() - m_area[0] - m_area[1])); |
|
246 |
} |
|
247 |
|
|
248 |
pf1.setPaper(paper); |
|
249 |
|
|
250 |
return pf1; |
|
251 |
} |
|
252 |
|
|
253 |
/** |
|
254 |
* Changes centimeters to pixels. |
|
255 |
* |
|
256 |
* @param d |
|
257 |
* Centimeters. |
|
258 |
* |
|
259 |
* @return Pixels. |
|
260 |
*/ |
|
261 |
private double getInPixels(double d) { |
|
262 |
return d * (DPISCREEN / PULGADA); |
|
263 |
} |
|
264 |
|
|
265 |
/** |
|
266 |
* Changes pixels to centimeters. |
|
267 |
* |
|
268 |
* @param d |
|
269 |
* Pixel. |
|
270 |
* |
|
271 |
* @return Centimeters. |
|
272 |
*/ |
|
273 |
private double getInCM(double d) { |
|
274 |
return d / (DPISCREEN / PULGADA); |
|
275 |
} |
|
276 |
|
|
277 |
/** |
|
278 |
* Returns the printing area. |
|
279 |
* |
|
280 |
* @return Rectangle Area. |
|
281 |
*/ |
|
282 |
public Rectangle2D getArea() { |
|
283 |
Rectangle2D.Double rect = new Rectangle2D.Double(); |
|
284 |
rect.setRect(m_area[0], m_area[1], m_sizePaper.getAncho() - m_area[0] |
|
285 |
- m_area[2], m_sizePaper.getAlto() - m_area[1] - m_area[3]); |
|
286 |
|
|
287 |
return rect; |
|
288 |
} |
|
289 |
|
|
290 |
/** |
|
291 |
* Inserts the attributes with a PageFormat. |
|
292 |
* |
|
293 |
* @param pf |
|
294 |
* PageFormat. |
|
295 |
*/ |
|
296 |
public void setPageFormat(PageFormat pf) { |
|
297 |
Size size = null; |
|
298 |
|
|
299 |
if (pf.getOrientation() == 0) { |
|
300 |
setIsLandScape(true); |
|
301 |
m_Orientation = OrientationRequested.LANDSCAPE; |
|
302 |
size = new Size(pf.getHeight(), pf.getWidth()); |
|
303 |
} else { |
|
304 |
setIsLandScape(false); |
|
305 |
m_Orientation = OrientationRequested.PORTRAIT; |
|
306 |
size = new Size(pf.getHeight(), pf.getWidth()); |
|
307 |
} |
|
308 |
|
|
309 |
attributes.add(m_Orientation); |
|
310 |
|
|
311 |
// area |
|
312 |
m_area[0] = getInCM(pf.getImageableY()); |
|
313 |
m_area[2] = getInCM(pf.getImageableX()); |
|
314 |
m_area[1] = |
|
315 |
m_sizePaper.getAlto() - getInCM(pf.getImageableHeight()) |
|
316 |
- m_area[0]; |
|
317 |
m_area[3] = |
|
318 |
m_sizePaper.getAncho() - getInCM(pf.getImageableWidth()) |
|
319 |
- m_area[2]; |
|
320 |
|
|
321 |
// tipo formato |
|
322 |
if (isLandSpace()) { |
|
323 |
// double aux = m_area[0]; |
|
324 |
// m_area[0] = m_area[3]; |
|
325 |
// m_area[3] = m_area[1]; |
|
326 |
// m_area[1] = m_area[2]; |
|
327 |
// m_area[2] = aux; |
|
328 |
attributes.add(new MediaPrintableArea((float) (m_area[2] * 10), |
|
329 |
(float) (m_area[0] * 10), (float) (m_sizeinUnits.getAlto() |
|
330 |
- m_area[0] - m_area[1]) * 10, (float) (m_sizeinUnits |
|
331 |
.getAncho() - m_area[2] - m_area[3]) * 10, |
|
332 |
MediaPrintableArea.MM)); |
|
333 |
} else { |
|
334 |
attributes.add(new MediaPrintableArea((float) (m_area[0] * 10), |
|
335 |
(float) (m_area[1] * 10), (float) (getInCM(pf |
|
336 |
.getImageableWidth()) * 10), (float) (getInCM(pf |
|
337 |
.getImageableHeight()) * 10), MediaPrintableArea.MM)); |
|
338 |
} |
|
339 |
|
|
340 |
setType(getTypePaper(size)); |
|
341 |
} |
|
342 |
|
|
343 |
/** |
|
344 |
* Returns a PrintRequestAttributeSet with all properties to the |
|
345 |
* PrintDialog. |
|
346 |
* |
|
347 |
* @return PrintRequestAttributesSet. |
|
348 |
*/ |
|
349 |
public PrintRequestAttributeSet toPrintRequestAttributeSet() { |
|
350 |
HashPrintRequestAttributeSet resul = new HashPrintRequestAttributeSet(); |
|
351 |
|
|
352 |
setType(m_typeSel); |
|
353 |
|
|
354 |
resul.add(m_type); |
|
355 |
|
|
356 |
// units, no hace falta a?adirlo a attributes |
|
357 |
resul.add(m_Orientation); |
|
358 |
setArea(m_area); |
|
359 |
resul.add(new MediaPrintableArea(0, 0, |
|
360 |
(float) ((m_sizePaper.getAlto() * DPISCREEN) / PULGADA), |
|
361 |
(float) ((m_sizePaper.getAncho() * DPISCREEN) / PULGADA), |
|
362 |
MediaPrintableArea.MM)); |
|
363 |
|
|
364 |
resul.add(m_resolution); |
|
365 |
// resul.add(new PrinterResolution(DPI,DPI,PrinterResolution.DPI)); |
Also available in: Unified diff