Revision 5792
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14/pom.xml | ||
---|---|---|
1 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<groupId>org.gvsig</groupId> |
|
4 |
<artifactId>org.gvsig.legend.urbanhorizontalsignage</artifactId> |
|
5 |
<version>1.0.14</version> |
|
6 |
<packaging>pom</packaging> |
|
7 |
<name>${project.artifactId}</name> |
|
8 |
<description>Legend for urban horizontal signage.</description> |
|
9 |
<parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<artifactId>org.gvsig.desktop</artifactId> |
|
12 |
<version>2.0.342</version> |
|
13 |
</parent> |
|
14 |
|
|
15 |
<url>https://devel.gvsig.org/sites/org.gvsig.legend.urbanhorizontalsignage/${project.version}</url> |
|
16 |
<scm> |
|
17 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-base-legends/org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14</connection> |
|
18 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-base-legends/org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14</developerConnection> |
|
19 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-base-legends/repository/show/org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14</url> |
|
20 |
</scm> |
|
21 |
<repositories> |
|
22 |
<repository> |
|
23 |
<id>gvsig-public-http-repository</id> |
|
24 |
<name>gvSIG maven public HTTP repository</name> |
|
25 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
26 |
<releases> |
|
27 |
<enabled>true</enabled> |
|
28 |
<updatePolicy>daily</updatePolicy> |
|
29 |
<checksumPolicy>warn</checksumPolicy> |
|
30 |
</releases> |
|
31 |
<snapshots> |
|
32 |
<enabled>true</enabled> |
|
33 |
<updatePolicy>daily</updatePolicy> |
|
34 |
<checksumPolicy>warn</checksumPolicy> |
|
35 |
</snapshots> |
|
36 |
</repository> |
|
37 |
</repositories> |
|
38 |
|
|
39 |
<distributionManagement> |
|
40 |
<site> |
|
41 |
<id>gvsig-repository</id> |
|
42 |
<url>dav:https://devel.gvsig.org/download/projects/gvsig-base-legends/pool/${project.artifactId}/${project.version}</url> |
|
43 |
</site> |
|
44 |
</distributionManagement> |
|
45 |
|
|
46 |
<build> |
|
47 |
<plugins> |
|
48 |
<plugin> |
|
49 |
<groupId>org.apache.maven.plugins</groupId> |
|
50 |
<artifactId>maven-release-plugin</artifactId> |
|
51 |
<configuration> |
|
52 |
<tagBase>https://devel.gvsig.org/svn/gvsig-base-legends/org.gvsig.legend.urbanhorizontalsignage/tags</tagBase> |
|
53 |
</configuration> |
|
54 |
</plugin> |
|
55 |
</plugins> |
|
56 |
</build> |
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
<dependencyManagement> |
|
61 |
<dependencies> |
|
62 |
<dependency> |
|
63 |
<groupId>org.gvsig</groupId> |
|
64 |
<artifactId>org.gvsig.legend.urbanhorizontalsignage.lib.api</artifactId> |
|
65 |
<version>1.0.14</version> |
|
66 |
</dependency> |
|
67 |
<dependency> |
|
68 |
<groupId>org.gvsig</groupId> |
|
69 |
<artifactId>org.gvsig.legend.urbanhorizontalsignage.lib.impl</artifactId> |
|
70 |
<version>1.0.14</version> |
|
71 |
</dependency> |
|
72 |
<dependency> |
|
73 |
<groupId>org.gvsig</groupId> |
|
74 |
<artifactId>org.gvsig.legend.urbanhorizontalsignage.swing.api</artifactId> |
|
75 |
<version>1.0.14</version> |
|
76 |
</dependency> |
|
77 |
<dependency> |
|
78 |
<groupId>org.gvsig</groupId> |
|
79 |
<artifactId>org.gvsig.legend.urbanhorizontalsignage.swing.impl</artifactId> |
|
80 |
<version>1.0.14</version> |
|
81 |
</dependency> |
|
82 |
<dependency> |
|
83 |
<groupId>org.gvsig</groupId> |
|
84 |
<artifactId>org.gvsig.legend.urbanhorizontalsignage.app.mainplugin</artifactId> |
|
85 |
<version>1.0.14</version> |
|
86 |
</dependency> |
|
87 |
</dependencies> |
|
88 |
</dependencyManagement> |
|
89 |
<modules> |
|
90 |
<module>org.gvsig.legend.urbanhorizontalsignage.lib</module> |
|
91 |
<module>org.gvsig.legend.urbanhorizontalsignage.swing</module> |
|
92 |
<module>org.gvsig.legend.urbanhorizontalsignage.app</module> |
|
93 |
</modules> |
|
94 |
</project> |
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14/org.gvsig.legend.urbanhorizontalsignage.app/pom.xml | ||
---|---|---|
1 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<parent> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.legend.urbanhorizontalsignage</artifactId> |
|
6 |
<version>1.0.14</version> |
|
7 |
</parent> |
|
8 |
<groupId>org.gvsig</groupId> |
|
9 |
<artifactId>org.gvsig.legend.urbanhorizontalsignage.app</artifactId> |
|
10 |
<packaging>pom</packaging> |
|
11 |
<name>org.gvsig.legend.urbanhorizontalsignage.app</name> |
|
12 |
|
|
13 |
<modules> |
|
14 |
<module>org.gvsig.legend.urbanhorizontalsignage.app.mainplugin</module> |
|
15 |
</modules> |
|
16 |
|
|
17 |
</project> |
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14/org.gvsig.legend.urbanhorizontalsignage.app/org.gvsig.legend.urbanhorizontalsignage.app.mainplugin/buildNumber.properties | ||
---|---|---|
1 |
#Tue Nov 16 22:19:44 CET 2021 |
|
2 |
buildNumber=104 |
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14/org.gvsig.legend.urbanhorizontalsignage.app/org.gvsig.legend.urbanhorizontalsignage.app.mainplugin/src/main/resources-plugin/plugin-persistence.def | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<!-- |
|
3 |
Definitions of plugin persistence org.gvsig.aggregatelegend.app.mainplugin |
|
4 |
--> |
|
5 |
<definitions> |
|
6 |
<version>1.0.0</version> |
|
7 |
<classes> |
|
8 |
<class name="org.gvsig.legend.urbanhorizontalsignage.app.mainplugin"> |
|
9 |
<extends> |
|
10 |
</extends> |
|
11 |
<description>Persistence of the legend of urban horizontal signage</description> |
|
12 |
<fields> |
|
13 |
</fields> |
|
14 |
</class> |
|
15 |
</classes> |
|
16 |
</definitions> |
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14/org.gvsig.legend.urbanhorizontalsignage.app/org.gvsig.legend.urbanhorizontalsignage.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
1 |
_Urban_horizontal_signage_legend_description=Leyenda para la se\u00f1alizaci\u00f3n urbana horizontal |
|
2 |
_Urban_horizontal_signage_legend=Se\u00f1alizaci\u00f3n urbana horizontal |
|
3 |
_Width_field=Campo para la anchura |
|
4 |
_Continuity_field=Campo para la continuidad |
|
5 |
_Segments_color_field=Campo para el color de los segmentos |
|
6 |
_Segments_length_field=Campo para la longitud de los segmentos |
|
7 |
_Paint_holes_field=Campo para el pintado de los huecos |
|
8 |
_Holes_color_field=Campo para el color de los huecos |
|
9 |
_Holes_length_field=Campo para la longitud de los huecos |
|
10 |
_Round_vertex_field=Campo para el redondeo de los v\u00e9rtices |
|
11 |
_Gap_width_between_lines=Separaci\u00f3n entre l\u00edneas |
|
12 |
_Copy_selected_features_as_polygons_to_clipboard=Copiar elementos seleccionados como pol\u00edgonos al portapapeles |
|
13 |
_Number_of_geometries_to_be_copied_to_the_clipboard=N\u00famero de geometr\u00edas a ser copiadas al portapapeles |
|
14 |
_Do_you_want_to_continue=\u00bfDesea continuar? |
|
15 |
_Copy_as_polygons=Copiar como pol\u00edgonos |
|
16 |
_Target_Color_field=Campo de destino para el color |
|
17 |
_Target_Length_field=Campo de destino para la longitud |
|
18 |
_Target_Area_field=Campo de destino para el \u00e1rea |
|
19 |
# --------------------------------------- |
|
20 |
# Picture marker symbol table legend |
|
21 |
# |
|
22 |
_Picture_marker_symbol_table_legend=Valores \u00fanicos de marcador de imagen en tabla |
|
23 |
_Legend_table_fields=Campos de la tabla de la leyenda |
|
24 |
_Images_table_fields=Campos de la tabla de las imagenes |
|
25 |
_Unit=Unidad |
|
26 |
_Line_to_offset_color=Color de la linea al offset |
|
27 |
_Draw_line_to_offset=Pinta la linea al offset |
|
28 |
_Classifying_field=Campo para clasificar |
|
29 |
_OffsetX_field=Campo para el offset X |
|
30 |
_OffsetY_field=Campo para el offset Y |
|
31 |
_Rotation_field=Campo para la rotaci\u00f3n |
|
32 |
_Line_to_offset_color_field=Campo para el color de la linea al offset |
|
33 |
_Table_name=Nombre de tabla |
|
34 |
_Image_field=Campo de la imagen |
|
35 |
_Image_selected_field=Campo de la imagen seleccionada |
|
36 |
# --------------------------------------- |
|
37 |
_Convert_lines_to_polygons=Convertir lineas a poligonos |
|
38 |
_Convert_Urban_signage_lines_to_polygons=Convertir lineas de se\u00e1lizaci\u00f2n urbana a poligonos |
|
39 |
_Convert=Converir |
|
40 |
_Target_layer=Capa destino |
|
41 |
_Elements_to_process=Elementos a procesar |
|
42 |
_Delete_lines_at_finish=Eliminar lineas al terminar |
|
43 |
_Urban_signage=Se\u00f1alizaci\u00f3n urbana |
|
44 |
|
|
45 |
|
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14/org.gvsig.legend.urbanhorizontalsignage.app/org.gvsig.legend.urbanhorizontalsignage.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
1 |
_Urban_horizontal_signage_legend_description=Urban horizontal signage legend |
|
2 |
_Urban_horizontal_signage_legend=Urban horizontal signage |
|
3 |
_Width_field=Width field |
|
4 |
_Continuity_field=Continuity field |
|
5 |
_Segments_color_field=Segments color field |
|
6 |
_Segments_length_field=Segments length field |
|
7 |
_Paint_holes_field=Paint holes field |
|
8 |
_Holes_color_field=Holes color field |
|
9 |
_Holes_length_field=Holes length field |
|
10 |
_Round_vertex_field=Round vertex field |
|
11 |
_Gap_width_between_lines=Gap width between lines |
|
12 |
_Copy_selected_features_as_polygons_to_clipboard=Copy selected features as polygons to clipboard |
|
13 |
_Number_of_geometries_to_be_copied_to_the_clipboard=Number of geometries to be copied to the clipboard |
|
14 |
_Do_you_want_to_continue=Do you want to continue? |
|
15 |
_Copy_as_polygons=Copy as polygons |
|
16 |
_Target_Color_field=Target color field |
|
17 |
_Target_Length_field=Target length field |
|
18 |
_Target_Area_field=Target area field |
|
19 |
# --------------------------------------- |
|
20 |
# Picture marker symbol table legend |
|
21 |
# |
|
22 |
_Picture_marker_symbol_table_legend=Picture marker unique values in table |
|
23 |
_Legend_table_fields=Legend table fields |
|
24 |
_Images_table_fields=Images table fields |
|
25 |
_Unit=Unit |
|
26 |
_Line_to_offset_color=Line to offset color |
|
27 |
_Draw_line_to_offset=Draw line to offset |
|
28 |
_Classifying_field=Classifying field |
|
29 |
_OffsetX_field=OffsetX field |
|
30 |
_OffsetY_field=OffsetY field |
|
31 |
_Rotation_field=Rotation field |
|
32 |
_Line_to_offset_color_field=Line to offset color field |
|
33 |
_Table_name=Table name |
|
34 |
_Image_field=Image field |
|
35 |
_Image_selected_field=Image selected field |
|
36 |
# --------------------------------------- |
|
37 |
_Convert_lines_to_polygons=Convert lines to polygons |
|
38 |
_Convert_Urban_signage_lines_to_polygons=Convert urban signage lines to polygons |
|
39 |
_Convert=Convert |
|
40 |
_Target_layer=Target layer |
|
41 |
_Elements_to_process=Elements to process |
|
42 |
_Delete_lines_at_finish=Delete lines at finish |
|
43 |
_Urban_signage=Urban signage |
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14/org.gvsig.legend.urbanhorizontalsignage.app/org.gvsig.legend.urbanhorizontalsignage.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<!-- gvSIG. Desktop Geographic Information System. Copyright (C) 2007-2013 gvSIG |
|
3 |
Association. This program is free software; you can redistribute it and/or modify |
|
4 |
it under the terms of the GNU General Public License as published by the Free Software |
|
5 |
Foundation; either version 3 of the License, or (at your option) any later version. |
|
6 |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
|
7 |
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
8 |
PURPOSE. See the GNU General Public License for more details. You should have received |
|
9 |
a copy of the GNU General Public License along with this program; if not, write to |
|
10 |
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, |
|
11 |
USA. For any additional information, do not hesitate to contact us at info AT gvsig.com, |
|
12 |
or visit our website www.gvsig.com. --> |
|
13 |
<plugin-config> |
|
14 |
<depends plugin-name="org.gvsig.app.mainplugin" /> |
|
15 |
<resourceBundle name="text" /> |
|
16 |
<libraries library-dir="lib" /> |
|
17 |
<extensions> |
|
18 |
<extension class-name="org.gvsig.legend.urbanhorizontalsignage.app.UrbanHorizontalSignageExtension" |
|
19 |
description="" active="true" priority="1"> |
|
20 |
|
|
21 |
<action |
|
22 |
name="layer-modify-clipboard-copy-as-polygons" |
|
23 |
label="_Copy_selected_features_as_polygons_to_clipboard" |
|
24 |
tooltip="_Copy_selected_features_as_polygons_to_clipboard" |
|
25 |
position="601105001" |
|
26 |
action-command="layer-modify-clipboard-copy-as-polygons" |
|
27 |
icon="layer-modify-clipboard-copy-as-polygons" |
|
28 |
accelerator="" |
|
29 |
/> |
|
30 |
|
|
31 |
<action |
|
32 |
name="tools-urbanSignage-linesToPolygons" |
|
33 |
label="_Convert_lines_to_polygons" |
|
34 |
tooltip="_Copy_selected_lines_to_polygons" |
|
35 |
position="900500000" |
|
36 |
action-command="tools-urbanSignage-linesToPolygons" |
|
37 |
icon="tools-urbanSignage-linesToPolygons" |
|
38 |
accelerator="" |
|
39 |
/> |
|
40 |
|
|
41 |
<menu |
|
42 |
name="layer-modify-clipboard-copy-as-polygons" |
|
43 |
text="Layer/Modify/_Copy_selected_features_as_polygons_to_clipboard" |
|
44 |
/> |
|
45 |
|
|
46 |
<menu |
|
47 |
name="tools-urbanSignage-linesToPolygons" |
|
48 |
text="tools/_Urban_signage/_Convert_lines_to_polygons" |
|
49 |
/> |
|
50 |
|
|
51 |
<!-- |
|
52 |
<tool-bar name="edit"> |
|
53 |
<action-tool |
|
54 |
name="layer-modify-clipboard-copy-as-polygons" |
|
55 |
/> |
|
56 |
</tool-bar> |
|
57 |
--> |
|
58 |
|
|
59 |
|
|
60 |
</extension> |
|
61 |
<extension class-name="org.gvsig.legend.urbanhorizontalsignage.app.rotate.RotatePointExtension" |
|
62 |
description="" active="false" priority="1"> |
|
63 |
|
|
64 |
<action |
|
65 |
name="layer-modify-rotatepoint" |
|
66 |
label="_Rotate_point" |
|
67 |
tooltip="_Rotate_point" |
|
68 |
position="601105001" |
|
69 |
action-command="layer-modify-rotatepoint" |
|
70 |
icon="layer-modify-rotatepoint" |
|
71 |
accelerator="" |
|
72 |
/> |
|
73 |
|
|
74 |
<menu |
|
75 |
name="layer-modify-rotatepoint" |
|
76 |
text="Layer/Modify/_Rotate_point" |
|
77 |
/> |
|
78 |
|
|
79 |
</extension> |
|
80 |
|
|
81 |
</extensions> |
|
82 |
</plugin-config> |
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14/org.gvsig.legend.urbanhorizontalsignage.app/org.gvsig.legend.urbanhorizontalsignage.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml | ||
---|---|---|
1 |
<!-- gvSIG. Desktop Geographic Information System. Copyright (C) 2007-2013 gvSIG |
|
2 |
Association. This program is free software; you can redistribute it and/or modify |
|
3 |
it under the terms of the GNU General Public License as published by the Free Software |
|
4 |
Foundation; either version 3 of the License, or (at your option) any later version. |
|
5 |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
|
6 |
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
7 |
PURPOSE. See the GNU General Public License for more details. You should have received |
|
8 |
a copy of the GNU General Public License along with this program; if not, write to |
|
9 |
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, |
|
10 |
USA. For any additional information, do not hesitate to contact us at info AT gvsig.com, |
|
11 |
or visit our website www.gvsig.com. --> |
|
12 |
<assembly> |
|
13 |
<id>gvsig-plugin-package</id> |
|
14 |
<formats> |
|
15 |
<format>zip</format> |
|
16 |
</formats> |
|
17 |
<baseDirectory>${project.artifactId}</baseDirectory> |
|
18 |
<includeBaseDirectory>true</includeBaseDirectory> |
|
19 |
<files> |
|
20 |
<file> |
|
21 |
<source>target/${project.artifactId}-${project.version}.jar</source> |
|
22 |
<outputDirectory>lib</outputDirectory> |
|
23 |
</file> |
|
24 |
<file> |
|
25 |
<source>target/package.info</source> |
|
26 |
</file> |
|
27 |
</files> |
|
28 |
|
|
29 |
<fileSets> |
|
30 |
<fileSet> |
|
31 |
<directory>src/main/resources-plugin</directory> |
|
32 |
<outputDirectory>.</outputDirectory> |
|
33 |
</fileSet> |
|
34 |
</fileSets> |
|
35 |
|
|
36 |
|
|
37 |
<dependencySets> |
|
38 |
<dependencySet> |
|
39 |
<useProjectArtifact>false</useProjectArtifact> |
|
40 |
<useTransitiveDependencies>false</useTransitiveDependencies> |
|
41 |
<outputDirectory>lib</outputDirectory> |
|
42 |
<includes> |
|
43 |
<include>org.gvsig:org.gvsig.legend.urbanhorizontalsignage.lib.api</include> |
|
44 |
<include>org.gvsig:org.gvsig.legend.urbanhorizontalsignage.lib.impl</include> |
|
45 |
<include>org.gvsig:org.gvsig.legend.urbanhorizontalsignage.swing.api</include> |
|
46 |
<include>org.gvsig:org.gvsig.legend.urbanhorizontalsignage.swing.impl</include> |
|
47 |
</includes> |
|
48 |
</dependencySet> |
|
49 |
</dependencySets> |
|
50 |
|
|
51 |
</assembly> |
|
52 |
|
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14/org.gvsig.legend.urbanhorizontalsignage.app/org.gvsig.legend.urbanhorizontalsignage.app.mainplugin/src/main/java/org/gvsig/legend/urbanhorizontalsignage/app/UrbanHorizontalSignageConfigForCopyPanelView.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<object classname="com.jeta.forms.store.memento.FormPackage"> |
|
4 |
<at name="fileversion"> |
|
5 |
<object classname="com.jeta.forms.store.memento.FormsVersion2"> |
|
6 |
<at name="major">2</at> |
|
7 |
<at name="minor">0</at> |
|
8 |
<at name="sub">0</at> |
|
9 |
</object> |
|
10 |
</at> |
|
11 |
<at name="form"> |
|
12 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
13 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
14 |
<at name="cellconstraints"> |
|
15 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
16 |
<at name="column">1</at> |
|
17 |
<at name="row">1</at> |
|
18 |
<at name="colspan">1</at> |
|
19 |
<at name="rowspan">1</at> |
|
20 |
<at name="halign">default</at> |
|
21 |
<at name="valign">default</at> |
|
22 |
<at name="insets" object="insets">0,0,0,0</at> |
|
23 |
</object> |
|
24 |
</at> |
|
25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
26 |
</super> |
|
27 |
<at name="id">/home/fdiaz/projects/gvSIG/org.gvsig.legend.urbanhorizontalsignage/org.gvsig.legend.urbanhorizontalsignage.app/org.gvsig.legend.urbanhorizontalsignage.app.mainplugin/src/main/java/org/gvsig/legend/urbanhorizontalsignage/app/UrbanHorizontalSignageConfigForCopyPanelView.xml</at> |
|
28 |
<at name="rowspecs">CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE</at> |
|
29 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE</at> |
|
30 |
<at name="components"> |
|
31 |
<object classname="java.util.LinkedList"> |
|
32 |
<item > |
|
33 |
<at name="value"> |
|
34 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
35 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
36 |
<at name="cellconstraints"> |
|
37 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
38 |
<at name="column">2</at> |
|
39 |
<at name="row">2</at> |
|
40 |
<at name="colspan">1</at> |
|
41 |
<at name="rowspan">1</at> |
|
42 |
<at name="halign">default</at> |
|
43 |
<at name="valign">default</at> |
|
44 |
<at name="insets" object="insets">0,0,0,0</at> |
|
45 |
</object> |
|
46 |
</at> |
|
47 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
48 |
</super> |
|
49 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
50 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
51 |
<at name="beanproperties"> |
|
52 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
53 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
54 |
<at name="properties"> |
|
55 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
56 |
<at name="border"> |
|
57 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
58 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
59 |
<at name="name">border</at> |
|
60 |
</super> |
|
61 |
<at name="borders"> |
|
62 |
<object classname="java.util.LinkedList"> |
|
63 |
<item > |
|
64 |
<at name="value"> |
|
65 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
66 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
67 |
<at name="name">border</at> |
|
68 |
</super> |
|
69 |
</object> |
|
70 |
</at> |
|
71 |
</item> |
|
72 |
</object> |
|
73 |
</at> |
|
74 |
</object> |
|
75 |
</at> |
|
76 |
<at name="name">lblTargetColorField</at> |
|
77 |
<at name="width">117</at> |
|
78 |
<at name="text">_Target_Color_field</at> |
|
79 |
<at name="fill"> |
|
80 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
81 |
<at name="name">fill</at> |
|
82 |
</object> |
|
83 |
</at> |
|
84 |
<at name="height">14</at> |
|
85 |
</object> |
|
86 |
</at> |
|
87 |
</object> |
|
88 |
</at> |
|
89 |
</object> |
|
90 |
</at> |
|
91 |
</item> |
|
92 |
<item > |
|
93 |
<at name="value"> |
|
94 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
95 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
96 |
<at name="cellconstraints"> |
|
97 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
98 |
<at name="column">2</at> |
|
99 |
<at name="row">4</at> |
|
100 |
<at name="colspan">1</at> |
|
101 |
<at name="rowspan">1</at> |
|
102 |
<at name="halign">default</at> |
|
103 |
<at name="valign">default</at> |
|
104 |
<at name="insets" object="insets">0,0,0,0</at> |
|
105 |
</object> |
|
106 |
</at> |
|
107 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
108 |
</super> |
|
109 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
110 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
111 |
<at name="beanproperties"> |
|
112 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
113 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
114 |
<at name="properties"> |
|
115 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
116 |
<at name="border"> |
|
117 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
118 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
119 |
<at name="name">border</at> |
|
120 |
</super> |
|
121 |
<at name="borders"> |
|
122 |
<object classname="java.util.LinkedList"> |
|
123 |
<item > |
|
124 |
<at name="value"> |
|
125 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
126 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
127 |
<at name="name">border</at> |
|
128 |
</super> |
|
129 |
</object> |
|
130 |
</at> |
|
131 |
</item> |
|
132 |
</object> |
|
133 |
</at> |
|
134 |
</object> |
|
135 |
</at> |
|
136 |
<at name="name">lblTargetLengthField</at> |
|
137 |
<at name="width">117</at> |
|
138 |
<at name="text">_Target_Length_field</at> |
|
139 |
<at name="fill"> |
|
140 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
141 |
<at name="name">fill</at> |
|
142 |
</object> |
|
143 |
</at> |
|
144 |
<at name="height">14</at> |
|
145 |
</object> |
|
146 |
</at> |
|
147 |
</object> |
|
148 |
</at> |
|
149 |
</object> |
|
150 |
</at> |
|
151 |
</item> |
|
152 |
<item > |
|
153 |
<at name="value"> |
|
154 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
155 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
156 |
<at name="cellconstraints"> |
|
157 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
158 |
<at name="column">2</at> |
|
159 |
<at name="row">6</at> |
|
160 |
<at name="colspan">1</at> |
|
161 |
<at name="rowspan">1</at> |
|
162 |
<at name="halign">default</at> |
|
163 |
<at name="valign">default</at> |
|
164 |
<at name="insets" object="insets">0,0,0,0</at> |
|
165 |
</object> |
|
166 |
</at> |
|
167 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
168 |
</super> |
|
169 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
170 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
171 |
<at name="beanproperties"> |
|
172 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
173 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
174 |
<at name="properties"> |
|
175 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
176 |
<at name="border"> |
|
177 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
178 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
179 |
<at name="name">border</at> |
|
180 |
</super> |
|
181 |
<at name="borders"> |
|
182 |
<object classname="java.util.LinkedList"> |
|
183 |
<item > |
|
184 |
<at name="value"> |
|
185 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
186 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
187 |
<at name="name">border</at> |
|
188 |
</super> |
|
189 |
</object> |
|
190 |
</at> |
|
191 |
</item> |
|
192 |
</object> |
|
193 |
</at> |
|
194 |
</object> |
|
195 |
</at> |
|
196 |
<at name="name">lblTargetAreaField</at> |
|
197 |
<at name="width">117</at> |
|
198 |
<at name="text">_Target_Area_field</at> |
|
199 |
<at name="fill"> |
|
200 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
201 |
<at name="name">fill</at> |
|
202 |
</object> |
|
203 |
</at> |
|
204 |
<at name="height">14</at> |
|
205 |
</object> |
|
206 |
</at> |
|
207 |
</object> |
|
208 |
</at> |
|
209 |
</object> |
|
210 |
</at> |
|
211 |
</item> |
|
212 |
<item > |
|
213 |
<at name="value"> |
|
214 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
215 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
216 |
<at name="cellconstraints"> |
|
217 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
218 |
<at name="column">4</at> |
|
219 |
<at name="row">2</at> |
|
220 |
<at name="colspan">3</at> |
|
221 |
<at name="rowspan">1</at> |
|
222 |
<at name="halign">default</at> |
|
223 |
<at name="valign">default</at> |
|
224 |
<at name="insets" object="insets">0,0,0,0</at> |
|
225 |
</object> |
|
226 |
</at> |
|
227 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
228 |
</super> |
|
229 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
230 |
<at name="beanclass">javax.swing.JComboBox</at> |
|
231 |
<at name="beanproperties"> |
|
232 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
233 |
<at name="classname">javax.swing.JComboBox</at> |
|
234 |
<at name="properties"> |
|
235 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
236 |
<at name="border"> |
|
237 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
238 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
239 |
<at name="name">border</at> |
|
240 |
</super> |
|
241 |
<at name="borders"> |
|
242 |
<object classname="java.util.LinkedList"> |
|
243 |
<item > |
|
244 |
<at name="value"> |
|
245 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
246 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
247 |
<at name="name">border</at> |
|
248 |
</super> |
|
249 |
</object> |
|
250 |
</at> |
|
251 |
</item> |
|
252 |
</object> |
|
253 |
</at> |
|
254 |
</object> |
|
255 |
</at> |
|
256 |
<at name="componentCount">3</at> |
|
257 |
<at name="editable">true</at> |
|
258 |
<at name="requestFocusEnabled">false</at> |
|
259 |
<at name="name">cboTargetColorFields</at> |
|
260 |
<at name="width">1155</at> |
|
261 |
<at name="items"> |
|
262 |
<object classname="com.jeta.forms.store.properties.ItemsProperty"> |
|
263 |
<at name="name">items</at> |
|
264 |
</object> |
|
265 |
</at> |
|
266 |
<at name="height">20</at> |
|
267 |
</object> |
|
268 |
</at> |
|
269 |
</object> |
|
270 |
</at> |
|
271 |
</object> |
|
272 |
</at> |
|
273 |
</item> |
|
274 |
<item > |
|
275 |
<at name="value"> |
|
276 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
277 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
278 |
<at name="cellconstraints"> |
|
279 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
280 |
<at name="column">4</at> |
|
281 |
<at name="row">6</at> |
|
282 |
<at name="colspan">3</at> |
|
283 |
<at name="rowspan">1</at> |
|
284 |
<at name="halign">default</at> |
|
285 |
<at name="valign">default</at> |
|
286 |
<at name="insets" object="insets">0,0,0,0</at> |
|
287 |
</object> |
|
288 |
</at> |
|
289 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
290 |
</super> |
|
291 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
292 |
<at name="beanclass">javax.swing.JComboBox</at> |
|
293 |
<at name="beanproperties"> |
|
294 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
295 |
<at name="classname">javax.swing.JComboBox</at> |
|
296 |
<at name="properties"> |
|
297 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
298 |
<at name="border"> |
|
299 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
300 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
301 |
<at name="name">border</at> |
|
302 |
</super> |
|
303 |
<at name="borders"> |
|
304 |
<object classname="java.util.LinkedList"> |
|
305 |
<item > |
|
306 |
<at name="value"> |
|
307 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
308 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
309 |
<at name="name">border</at> |
|
310 |
</super> |
|
311 |
</object> |
|
312 |
</at> |
|
313 |
</item> |
|
314 |
</object> |
|
315 |
</at> |
|
316 |
</object> |
|
317 |
</at> |
|
318 |
<at name="componentCount">3</at> |
|
319 |
<at name="editable">true</at> |
|
320 |
<at name="requestFocusEnabled">false</at> |
|
321 |
<at name="name">cboTargetAreaFields</at> |
|
322 |
<at name="width">1155</at> |
|
323 |
<at name="items"> |
|
324 |
<object classname="com.jeta.forms.store.properties.ItemsProperty"> |
|
325 |
<at name="name">items</at> |
|
326 |
</object> |
|
327 |
</at> |
|
328 |
<at name="height">20</at> |
|
329 |
</object> |
|
330 |
</at> |
|
331 |
</object> |
|
332 |
</at> |
|
333 |
</object> |
|
334 |
</at> |
|
335 |
</item> |
|
336 |
<item > |
|
337 |
<at name="value"> |
|
338 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
339 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
340 |
<at name="cellconstraints"> |
|
341 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
342 |
<at name="column">4</at> |
|
343 |
<at name="row">4</at> |
|
344 |
<at name="colspan">3</at> |
|
345 |
<at name="rowspan">1</at> |
|
346 |
<at name="halign">default</at> |
|
347 |
<at name="valign">default</at> |
|
348 |
<at name="insets" object="insets">0,0,0,0</at> |
|
349 |
</object> |
|
350 |
</at> |
|
351 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
352 |
</super> |
|
353 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
354 |
<at name="beanclass">javax.swing.JComboBox</at> |
|
355 |
<at name="beanproperties"> |
|
356 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
357 |
<at name="classname">javax.swing.JComboBox</at> |
|
358 |
<at name="properties"> |
|
359 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
360 |
<at name="border"> |
|
361 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
362 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
363 |
<at name="name">border</at> |
|
364 |
</super> |
|
365 |
<at name="borders"> |
|
366 |
<object classname="java.util.LinkedList"> |
|
367 |
<item > |
|
368 |
<at name="value"> |
|
369 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
370 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
371 |
<at name="name">border</at> |
|
372 |
</super> |
|
373 |
</object> |
|
374 |
</at> |
|
375 |
</item> |
|
376 |
</object> |
|
377 |
</at> |
|
378 |
</object> |
|
379 |
</at> |
|
380 |
<at name="componentCount">3</at> |
|
381 |
<at name="editable">true</at> |
|
382 |
<at name="requestFocusEnabled">false</at> |
|
383 |
<at name="name">cboTargetLengthFields</at> |
|
384 |
<at name="width">1155</at> |
|
385 |
<at name="items"> |
|
386 |
<object classname="com.jeta.forms.store.properties.ItemsProperty"> |
|
387 |
<at name="name">items</at> |
|
388 |
</object> |
|
389 |
</at> |
|
390 |
<at name="height">20</at> |
|
391 |
</object> |
|
392 |
</at> |
|
393 |
</object> |
|
394 |
</at> |
|
395 |
</object> |
|
396 |
</at> |
|
397 |
</item> |
|
398 |
</object> |
|
399 |
</at> |
|
400 |
<at name="properties"> |
|
401 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
402 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
403 |
<at name="properties"> |
|
404 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
405 |
<at name="border"> |
|
406 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
407 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
408 |
<at name="name">border</at> |
|
409 |
</super> |
|
410 |
<at name="borders"> |
|
411 |
<object classname="java.util.LinkedList"/> |
|
412 |
</at> |
|
413 |
</object> |
|
414 |
</at> |
|
415 |
<at name="name"/> |
|
416 |
<at name="fill"> |
|
417 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
418 |
<at name="name">fill</at> |
|
419 |
</object> |
|
420 |
</at> |
|
421 |
<at name="scollBars"> |
|
422 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
423 |
<at name="name">scollBars</at> |
|
424 |
<at name="verticalpolicy">21</at> |
|
425 |
<at name="horizontalpolicy">31</at> |
|
426 |
<at name="border"> |
|
427 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
428 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
429 |
<at name="name">border</at> |
|
430 |
</super> |
|
431 |
<at name="borders"> |
|
432 |
<object classname="java.util.LinkedList"> |
|
433 |
<item > |
|
434 |
<at name="value"> |
|
435 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
436 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
437 |
<at name="name">border</at> |
|
438 |
</super> |
|
439 |
</object> |
|
440 |
</at> |
|
441 |
</item> |
|
442 |
</object> |
|
443 |
</at> |
|
444 |
</object> |
|
445 |
</at> |
|
446 |
</object> |
|
447 |
</at> |
|
448 |
</object> |
|
449 |
</at> |
|
450 |
</object> |
|
451 |
</at> |
|
452 |
<at name="cellpainters"> |
|
453 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
454 |
<at name="rows"> |
|
455 |
<object classname="[Ljava.lang.Object;" size="7"> |
|
456 |
<at name="item" index="0"> |
|
457 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
458 |
</at> |
|
459 |
<at name="item" index="1"> |
|
460 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
461 |
</at> |
|
462 |
<at name="item" index="2"> |
|
463 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
464 |
</at> |
|
465 |
<at name="item" index="3"> |
|
466 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
467 |
</at> |
|
468 |
<at name="item" index="4"> |
|
469 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
470 |
</at> |
|
471 |
<at name="item" index="5"> |
|
472 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
473 |
</at> |
|
474 |
<at name="item" index="6"> |
|
475 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
476 |
</at> |
|
477 |
</object> |
|
478 |
</at> |
|
479 |
</object> |
|
480 |
</at> |
|
481 |
<at name="rowgroups"> |
|
482 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
483 |
<at name="groups"> |
|
484 |
<object classname="java.util.HashMap"/> |
|
485 |
</at> |
|
486 |
</object> |
|
487 |
</at> |
|
488 |
<at name="colgroups"> |
|
489 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
490 |
<at name="groups"> |
|
491 |
<object classname="java.util.HashMap"/> |
|
492 |
</at> |
|
493 |
</object> |
|
494 |
</at> |
|
495 |
</object> |
|
496 |
</at> |
|
497 |
</object> |
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14/org.gvsig.legend.urbanhorizontalsignage.app/org.gvsig.legend.urbanhorizontalsignage.app.mainplugin/src/main/java/org/gvsig/legend/urbanhorizontalsignage/app/UrbanHorizontalSignageConfigForCopyPanelView.java | ||
---|---|---|
1 |
package org.gvsig.legend.urbanhorizontalsignage.app; |
|
2 |
|
|
3 |
import com.jeta.open.i18n.I18NUtils; |
|
4 |
import com.jgoodies.forms.layout.CellConstraints; |
|
5 |
import com.jgoodies.forms.layout.FormLayout; |
|
6 |
import java.awt.BorderLayout; |
|
7 |
import java.awt.ComponentOrientation; |
|
8 |
import java.awt.Container; |
|
9 |
import java.awt.Dimension; |
|
10 |
import javax.swing.Box; |
|
11 |
import javax.swing.ImageIcon; |
|
12 |
import javax.swing.JComboBox; |
|
13 |
import javax.swing.JFrame; |
|
14 |
import javax.swing.JLabel; |
|
15 |
import javax.swing.JPanel; |
|
16 |
|
|
17 |
|
|
18 |
public class UrbanHorizontalSignageConfigForCopyPanelView extends JPanel |
|
19 |
{ |
|
20 |
JLabel lblTargetColorField = new JLabel(); |
|
21 |
JLabel lblTargetLengthField = new JLabel(); |
|
22 |
JLabel lblTargetAreaField = new JLabel(); |
|
23 |
JComboBox cboTargetColorFields = new JComboBox(); |
|
24 |
JComboBox cboTargetAreaFields = new JComboBox(); |
|
25 |
JComboBox cboTargetLengthFields = new JComboBox(); |
|
26 |
|
|
27 |
/** |
|
28 |
* Default constructor |
|
29 |
*/ |
|
30 |
public UrbanHorizontalSignageConfigForCopyPanelView() |
|
31 |
{ |
|
32 |
initializePanel(); |
|
33 |
} |
|
34 |
|
|
35 |
/** |
|
36 |
* Adds fill components to empty cells in the first row and first column of the grid. |
|
37 |
* This ensures that the grid spacing will be the same as shown in the designer. |
|
38 |
* @param cols an array of column indices in the first row where fill components should be added. |
|
39 |
* @param rows an array of row indices in the first column where fill components should be added. |
|
40 |
*/ |
|
41 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
|
42 |
{ |
|
43 |
Dimension filler = new Dimension(10,10); |
|
44 |
|
|
45 |
boolean filled_cell_11 = false; |
|
46 |
CellConstraints cc = new CellConstraints(); |
|
47 |
if ( cols.length > 0 && rows.length > 0 ) |
|
48 |
{ |
|
49 |
if ( cols[0] == 1 && rows[0] == 1 ) |
|
50 |
{ |
|
51 |
/** add a rigid area */ |
|
52 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
|
53 |
filled_cell_11 = true; |
|
54 |
} |
|
55 |
} |
|
56 |
|
|
57 |
for( int index = 0; index < cols.length; index++ ) |
|
58 |
{ |
|
59 |
if ( cols[index] == 1 && filled_cell_11 ) |
|
60 |
{ |
|
61 |
continue; |
|
62 |
} |
|
63 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
|
64 |
} |
|
65 |
|
|
66 |
for( int index = 0; index < rows.length; index++ ) |
|
67 |
{ |
|
68 |
if ( rows[index] == 1 && filled_cell_11 ) |
|
69 |
{ |
|
70 |
continue; |
|
71 |
} |
|
72 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
|
73 |
} |
|
74 |
|
|
75 |
} |
|
76 |
|
|
77 |
/** |
|
78 |
* Helper method to load an image file from the CLASSPATH |
|
79 |
* @param imageName the package and name of the file to load relative to the CLASSPATH |
|
80 |
* @return an ImageIcon instance with the specified image file |
|
81 |
* @throws IllegalArgumentException if the image resource cannot be loaded. |
|
82 |
*/ |
|
83 |
public ImageIcon loadImage( String imageName ) |
|
84 |
{ |
|
85 |
try |
|
86 |
{ |
|
87 |
ClassLoader classloader = getClass().getClassLoader(); |
|
88 |
java.net.URL url = classloader.getResource( imageName ); |
|
89 |
if ( url != null ) |
|
90 |
{ |
|
91 |
ImageIcon icon = new ImageIcon( url ); |
|
92 |
return icon; |
|
93 |
} |
|
94 |
} |
|
95 |
catch( Exception e ) |
|
96 |
{ |
|
97 |
e.printStackTrace(); |
|
98 |
} |
|
99 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
|
100 |
} |
|
101 |
|
|
102 |
/** |
|
103 |
* Method for recalculating the component orientation for |
|
104 |
* right-to-left Locales. |
|
105 |
* @param orientation the component orientation to be applied |
|
106 |
*/ |
|
107 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
|
108 |
{ |
|
109 |
// Not yet implemented... |
|
110 |
// I18NUtils.applyComponentOrientation(this, orientation); |
|
111 |
super.applyComponentOrientation(orientation); |
|
112 |
} |
|
113 |
|
|
114 |
public JPanel createPanel() |
|
115 |
{ |
|
116 |
JPanel jpanel1 = new JPanel(); |
|
117 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE","CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE"); |
|
118 |
CellConstraints cc = new CellConstraints(); |
|
119 |
jpanel1.setLayout(formlayout1); |
|
120 |
|
|
121 |
lblTargetColorField.setName("lblTargetColorField"); |
|
122 |
lblTargetColorField.setText("_Target_Color_field"); |
|
123 |
jpanel1.add(lblTargetColorField,cc.xy(2,2)); |
|
124 |
|
|
125 |
lblTargetLengthField.setName("lblTargetLengthField"); |
|
126 |
lblTargetLengthField.setText("_Target_Length_field"); |
|
127 |
jpanel1.add(lblTargetLengthField,cc.xy(2,4)); |
|
128 |
|
|
129 |
lblTargetAreaField.setName("lblTargetAreaField"); |
|
130 |
lblTargetAreaField.setText("_Target_Area_field"); |
|
131 |
jpanel1.add(lblTargetAreaField,cc.xy(2,6)); |
|
132 |
|
|
133 |
cboTargetColorFields.setEditable(true); |
|
134 |
cboTargetColorFields.setName("cboTargetColorFields"); |
|
135 |
cboTargetColorFields.setRequestFocusEnabled(false); |
|
136 |
jpanel1.add(cboTargetColorFields,cc.xywh(4,2,3,1)); |
|
137 |
|
|
138 |
cboTargetAreaFields.setEditable(true); |
|
139 |
cboTargetAreaFields.setName("cboTargetAreaFields"); |
|
140 |
cboTargetAreaFields.setRequestFocusEnabled(false); |
|
141 |
jpanel1.add(cboTargetAreaFields,cc.xywh(4,6,3,1)); |
|
142 |
|
|
143 |
cboTargetLengthFields.setEditable(true); |
|
144 |
cboTargetLengthFields.setName("cboTargetLengthFields"); |
|
145 |
cboTargetLengthFields.setRequestFocusEnabled(false); |
|
146 |
jpanel1.add(cboTargetLengthFields,cc.xywh(4,4,3,1)); |
|
147 |
|
|
148 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7 }); |
|
149 |
return jpanel1; |
|
150 |
} |
|
151 |
|
|
152 |
/** |
|
153 |
* Initializer |
|
154 |
*/ |
|
155 |
protected void initializePanel() |
|
156 |
{ |
|
157 |
setLayout(new BorderLayout()); |
|
158 |
add(createPanel(), BorderLayout.CENTER); |
|
159 |
} |
|
160 |
|
|
161 |
|
|
162 |
} |
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14/org.gvsig.legend.urbanhorizontalsignage.app/org.gvsig.legend.urbanhorizontalsignage.app.mainplugin/src/main/java/org/gvsig/legend/urbanhorizontalsignage/app/UrbanHorizontalSignageConfigForCopyPanel.java | ||
---|---|---|
1 |
/* |
|
2 |
* To change this license header, choose License Headers in Project Properties. |
|
3 |
* To change this template file, choose Tools | Templates |
|
4 |
* and open the template in the editor. |
|
5 |
*/ |
|
6 |
package org.gvsig.legend.urbanhorizontalsignage.app; |
|
7 |
|
|
8 |
import javax.swing.JComponent; |
|
9 |
import org.gvsig.fmap.dal.DataTypes; |
|
10 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
11 |
import org.gvsig.fmap.dal.swing.DALSwingLocator; |
|
12 |
import org.gvsig.fmap.dal.swing.DataSwingManager; |
|
13 |
import org.gvsig.fmap.dal.swing.featuretype.AttributeDescriptorPickerController; |
|
14 |
import org.gvsig.legend.urbanhorizontalsignage.lib.api.linelegend.UrbanHorizontalSignageConfig; |
|
15 |
import org.gvsig.legend.urbanhorizontalsignage.swing.api.linelegend.UrbanHorizontalSignageConfigPanel; |
|
16 |
import org.gvsig.tools.swing.api.Component; |
|
17 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
18 |
import org.gvsig.tools.swing.api.ToolsSwingManager; |
|
19 |
|
|
20 |
/** |
|
21 |
* |
|
22 |
* @author fdiaz |
|
23 |
*/ |
|
24 |
public class UrbanHorizontalSignageConfigForCopyPanel extends UrbanHorizontalSignageConfigForCopyPanelView implements UrbanHorizontalSignageConfigPanel, Component { |
|
25 |
|
|
26 |
private AttributeDescriptorPickerController targetColorFieldController; |
|
27 |
private AttributeDescriptorPickerController targetLengthFieldController; |
|
28 |
private AttributeDescriptorPickerController targetAreaFieldController; |
|
29 |
|
|
30 |
public UrbanHorizontalSignageConfigForCopyPanel() { |
|
31 |
|
|
32 |
initComponents(); |
|
33 |
|
|
34 |
} |
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
private void initComponents(){ |
|
39 |
ToolsSwingManager toolsSwingManager = ToolsSwingLocator.getToolsSwingManager(); |
|
40 |
DataSwingManager dataSwingManager = DALSwingLocator.getDataSwingManager(); |
|
41 |
|
|
42 |
targetColorFieldController = dataSwingManager.createAttributeDescriptorPickerController(cboTargetColorFields, (t) -> { |
|
43 |
return t.getDataType().isNumeric() || t.getType() == DataTypes.STRING; |
|
44 |
}); |
|
45 |
targetColorFieldController.setEditable(true); |
|
46 |
|
|
47 |
targetLengthFieldController = dataSwingManager.createAttributeDescriptorPickerController(cboTargetLengthFields, (t) -> { |
|
48 |
return t.getDataType().isNumeric(); |
|
49 |
}); |
|
50 |
targetLengthFieldController.setEditable(true); |
|
51 |
|
|
52 |
targetAreaFieldController = dataSwingManager.createAttributeDescriptorPickerController(cboTargetAreaFields, (t) -> { |
|
53 |
return t.getDataType().isNumeric(); |
|
54 |
}); |
|
55 |
targetAreaFieldController.setEditable(true); |
|
56 |
|
|
57 |
translateAll(); |
|
58 |
} |
|
59 |
|
|
60 |
private void translateAll() { |
|
61 |
ToolsSwingManager toolsSwingmanager = ToolsSwingLocator.getToolsSwingManager(); |
|
62 |
toolsSwingmanager.translate(this.lblTargetColorField); |
|
63 |
toolsSwingmanager.translate(this.lblTargetLengthField); |
|
64 |
toolsSwingmanager.translate(this.lblTargetAreaField); |
|
65 |
} |
|
66 |
|
|
67 |
@Override |
|
68 |
public void fetch(UrbanHorizontalSignageConfig config) { |
|
69 |
config.setTargetColorFieldName((String) this.targetColorFieldController.getName()); |
|
70 |
config.setTargetLenghtFieldName((String) this.targetLengthFieldController.getName()); |
|
71 |
config.setTargetAreaFieldName((String) this.targetAreaFieldController.getName()); |
|
72 |
} |
|
73 |
|
|
74 |
@Override |
|
75 |
public void put(UrbanHorizontalSignageConfig config) { |
|
76 |
this.targetColorFieldController.set(config.getTargetColorFieldName()); |
|
77 |
this.targetLengthFieldController.set(config.getTargetLenghtFieldName()); |
|
78 |
this.targetAreaFieldController.set(config.getTargetAreaFieldName()); |
|
79 |
} |
|
80 |
|
|
81 |
@Override |
|
82 |
public void setFeatureType(FeatureType type) { |
|
83 |
this.targetColorFieldController.setFeatureType(type); |
|
84 |
this.targetAreaFieldController.setFeatureType(type); |
|
85 |
this.targetLengthFieldController.setFeatureType(type); |
|
86 |
} |
|
87 |
|
|
88 |
@Override |
|
89 |
public JComponent asJComponent() { |
|
90 |
return this; |
|
91 |
} |
|
92 |
|
|
93 |
} |
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.14/org.gvsig.legend.urbanhorizontalsignage.app/org.gvsig.legend.urbanhorizontalsignage.app.mainplugin/src/main/java/org/gvsig/legend/urbanhorizontalsignage/app/UrbanHorizontalSignageExtension.java | ||
---|---|---|
1 |
package org.gvsig.legend.urbanhorizontalsignage.app; |
|
2 |
|
|
3 |
import java.awt.event.ActionEvent; |
|
4 |
import java.util.function.Predicate; |
|
5 |
import javax.swing.Icon; |
|
6 |
import javax.swing.JOptionPane; |
|
7 |
import javax.swing.SwingConstants; |
|
8 |
import javax.swing.event.TreeModelListener; |
|
9 |
import javax.swing.tree.TreePath; |
|
10 |
import org.gvsig.andami.IconThemeHelper; |
|
11 |
import org.gvsig.andami.plugins.Extension; |
|
12 |
import org.gvsig.app.ApplicationLocator; |
|
13 |
import org.gvsig.app.ApplicationManager; |
|
14 |
import org.gvsig.app.project.documents.view.ViewDocument; |
|
15 |
import org.gvsig.app.project.documents.view.ViewManager; |
|
16 |
import org.gvsig.fmap.dal.DALLocator; |
|
17 |
import org.gvsig.fmap.dal.DataManager; |
|
18 |
import org.gvsig.fmap.dal.DataStore; |
|
19 |
import org.gvsig.fmap.dal.feature.FeatureSelection; |
|
20 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
21 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
22 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
23 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
24 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
|
25 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
|
26 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
27 |
import org.gvsig.fmap.mapcontrol.CompoundStoresTreeModel; |
|
28 |
import org.gvsig.legend.urbanhorizontalsignage.lib.api.linelegend.UrbanHorizontalSignageLegend; |
|
29 |
import org.gvsig.legend.urbanhorizontalsignage.lib.api.UrbanHorizontalSignageLocator; |
|
30 |
import org.gvsig.legend.urbanhorizontalsignage.lib.api.UrbanHorizontalSignageManager; |
|
31 |
import org.gvsig.legend.urbanhorizontalsignage.lib.api.linelegend.UrbanHorizontalSignageConfig; |
|
32 |
import org.gvsig.legend.urbanhorizontalsignage.swing.api.ConvertLinesToPolygonsPanel; |
|
33 |
import org.gvsig.legend.urbanhorizontalsignage.swing.api.UrbanHorizontalSignageSwingLocator; |
|
34 |
import org.gvsig.legend.urbanhorizontalsignage.swing.api.UrbanHorizontalSignageSwingManager; |
|
35 |
import org.gvsig.tools.ToolsLocator; |
|
36 |
import org.gvsig.tools.dispose.DisposeUtils; |
|
37 |
import org.gvsig.tools.i18n.I18nManager; |
|
38 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
39 |
import org.gvsig.tools.swing.api.windowmanager.Dialog; |
|
40 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
|
41 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2; |
|
42 |
import org.gvsig.tools.util.LabeledValue; |
|
43 |
import org.slf4j.Logger; |
|
44 |
import org.slf4j.LoggerFactory; |
|
45 |
|
|
46 |
@SuppressWarnings("UseSpecificCatch") |
|
47 |
public class UrbanHorizontalSignageExtension extends Extension { |
|
48 |
|
|
49 |
private static final Logger LOGGER = LoggerFactory.getLogger(UrbanHorizontalSignageExtension.class); |
|
50 |
|
|
51 |
@Override |
|
52 |
public void initialize() { |
|
53 |
IconThemeHelper.registerIcon("legend", "legend-overview-vectorial-urbanhorizontalsignage", this); |
|
54 |
IconThemeHelper.registerIcon("legend", "legend-overview-vectorial-picturemarkersymboltable", this); |
|
55 |
IconThemeHelper.registerIcon("action", "layer-modify-clipboard-copy-as-polygons", this); |
|
56 |
|
|
57 |
} |
|
58 |
|
|
59 |
@Override |
|
60 |
public void execute(String actionCommand) { |
|
61 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
62 |
|
|
63 |
if ("layer-modify-clipboard-copy-as-polygons".equalsIgnoreCase(actionCommand) ) { |
|
64 |
ViewDocument viewdoc = (ViewDocument) application.getActiveDocument(ViewManager.TYPENAME); |
|
65 |
if (viewdoc == null) { |
|
66 |
return; |
|
67 |
} |
|
68 |
MapContext mapContext = viewdoc.getMapContext(); |
|
69 |
FLyrVect layer = mapContext.getLayers().getFirstActiveVectorLayer(); |
|
70 |
if (layer == null) { |
|
71 |
return; |
|
72 |
} |
|
73 |
copySelecctionAsPolygons(layer); |
|
74 |
|
|
75 |
} else if ("tools-urbanSignage-linesToPolygons".equalsIgnoreCase(actionCommand) ) { |
|
76 |
ViewDocument viewdoc = (ViewDocument) application.getActiveDocument(ViewManager.TYPENAME); |
|
77 |
if (viewdoc == null) { |
|
78 |
return; |
|
79 |
} |
|
80 |
MapContext mapContext = viewdoc.getMapContext(); |
|
81 |
FLyrVect layer = mapContext.getLayers().getFirstActiveVectorLayer(); |
|
82 |
if (layer == null) { |
|
83 |
return; |
|
84 |
} |
|
85 |
if( !(layer.getLegend() instanceof UrbanHorizontalSignageLegend) ) { |
|
86 |
//FIXME mensaje al usuario? |
|
87 |
return; |
|
88 |
} |
|
89 |
UrbanHorizontalSignageLegend legend = (UrbanHorizontalSignageLegend) layer.getLegend(); |
|
90 |
UrbanHorizontalSignageConfig config = legend.getConfig(); // FIXME: clone |
|
91 |
FeatureSet lines; |
|
92 |
try { |
|
93 |
lines = layer.getFeatureStore().getFeatureSelection(); |
|
94 |
} catch(Exception ex) { |
|
95 |
//FIXME mensaje al usuario? |
|
96 |
return; |
|
97 |
} |
|
98 |
convertLinesAsPolygons(config, lines); |
|
99 |
} |
|
100 |
|
|
101 |
} |
|
102 |
|
|
103 |
private void copySelecctionAsPolygons(FLyrVect sourceLayer) { |
|
104 |
// UrbanHorizontalSignageManager uhsManager = UrbanHorizontalSignageLocator.getUrbanHorizontalSignageManager(); |
|
105 |
|
|
106 |
UrbanHorizontalSignageConfigForCopyPanel panel = new UrbanHorizontalSignageConfigForCopyPanel(); |
|
107 |
panel.setFeatureType(sourceLayer.getFeatureStore().getDefaultFeatureTypeQuietly()); |
|
108 |
UrbanHorizontalSignageLegend legend = (UrbanHorizontalSignageLegend) sourceLayer.getLegend(); |
|
109 |
panel.put(legend.getConfig()); |
|
110 |
|
|
111 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
112 |
WindowManager_v2 winManager = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
|
113 |
|
|
114 |
Dialog theDialog = winManager.createDialog( |
|
115 |
panel.asJComponent(), |
|
116 |
i18n.getTranslation("_Copy_as_polygons"), |
|
117 |
i18n.getTranslation("_Copy_as_polygons"), |
|
118 |
WindowManager_v2.BUTTONS_OK_CANCEL |
|
119 |
); |
|
120 |
theDialog.setAutoclose(false); |
|
121 |
|
|
122 |
theDialog.setButtonLabel( |
|
123 |
WindowManager_v2.BUTTON_OK, |
|
124 |
i18n.getTranslation("_Accept") |
|
125 |
); |
|
126 |
theDialog.setButtonLabel( |
|
127 |
WindowManager_v2.BUTTON_CANCEL, |
|
128 |
i18n.getTranslation("_Cancel") |
|
129 |
); |
|
130 |
|
|
131 |
theDialog.addActionListener((ActionEvent e) -> { |
|
132 |
switch (theDialog.getAction()) { |
|
133 |
case WindowManager_v2.BUTTON_OK: |
|
134 |
Thread task = new Thread(() -> { |
|
135 |
panel.fetch(legend.getConfig()); |
|
136 |
performCopyAsPolygons(sourceLayer); |
|
137 |
theDialog.asJComponent().setVisible(false); |
|
138 |
}, "UHS_CopyAsPolygons"); |
|
139 |
task.start(); |
|
140 |
break; |
|
141 |
case WindowManager_v2.BUTTON_CANCEL: |
|
142 |
theDialog.asJComponent().setVisible(false); |
|
143 |
break; |
|
144 |
} |
|
145 |
}); |
|
146 |
|
|
147 |
theDialog.show(WindowManager.MODE.DIALOG); |
|
148 |
} |
|
149 |
|
|
150 |
private void performCopyAsPolygons(FLyrVect sourceLayer) { |
|
151 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
152 |
UrbanHorizontalSignageManager uhsManager = UrbanHorizontalSignageLocator.getUrbanHorizontalSignageManager(); |
|
153 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
154 |
DataManager dataManager = DALLocator.getDataManager(); |
|
155 |
|
|
156 |
UrbanHorizontalSignageLegend legend = (UrbanHorizontalSignageLegend) sourceLayer.getLegend(); |
|
157 |
FeatureStore tempTargetStore = null; |
|
158 |
FeatureSet tempFeatureSet = null; |
|
159 |
try { |
|
160 |
|
|
161 |
FeatureSet sourceFeatureSet = sourceLayer.getFeatureStore().getFeatureSelection(); |
|
162 |
tempTargetStore = uhsManager.createTemporaryPolygonsFromLines(legend.getConfig(), sourceFeatureSet, null); |
|
163 |
tempFeatureSet = tempTargetStore.getFeatureSet(); |
|
164 |
|
|
165 |
int n = application.confirmDialog( |
|
166 |
"_Number_of_geometries_to_be_copied_to_the_clipboard" + " " + tempFeatureSet.getSize() + "\n" + "_Do_you_want_to_continue", |
|
167 |
i18n.getTranslation("_Copy_selected_features_as_polygons_to_clipboard"), |
|
168 |
JOptionPane.YES_NO_OPTION, |
|
169 |
JOptionPane.QUESTION_MESSAGE); |
|
170 |
if (n == JOptionPane.YES_OPTION) { |
|
171 |
dataManager.putFeaturesInClipboard(tempFeatureSet); |
|
172 |
} |
|
173 |
|
|
174 |
} catch (Exception e) { |
|
175 |
LOGGER.warn("Can't get the selection as JSON.", e); |
|
176 |
} finally { |
|
177 |
DisposeUtils.disposeQuietly(tempTargetStore); |
|
178 |
DisposeUtils.disposeQuietly(tempFeatureSet); |
|
179 |
} |
|
180 |
|
|
181 |
} |
|
182 |
|
|
183 |
private void convertLinesAsPolygons(UrbanHorizontalSignageConfig config, FeatureSet source) { |
|
184 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
185 |
WindowManager_v2 winManager = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
|
186 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
187 |
UrbanHorizontalSignageManager uhsManager = UrbanHorizontalSignageLocator.getUrbanHorizontalSignageManager(); |
|
188 |
UrbanHorizontalSignageSwingManager uhsSwingManager = UrbanHorizontalSignageSwingLocator.getUrbanHorizontalSignageSwingManager(); |
|
189 |
|
|
190 |
|
|
191 |
final ConvertLinesToPolygonsPanel panel = uhsSwingManager.createConvertLinesToPolygonsPanel(); |
|
192 |
panel.setSource(source); |
|
193 |
panel.setStores(new StoresWithLayerTypeIcon()); |
|
194 |
panel.put(config); |
|
195 |
|
|
196 |
Dialog theDialog = winManager.createDialog( |
|
197 |
panel.asJComponent(), |
|
198 |
i18n.getTranslation("_Convert_lines_to_polygons"), |
|
199 |
i18n.getTranslation("_Convert_Urban_signage_lines_to_polygons"), |
|
200 |
WindowManager_v2.BUTTONS_OK_CANCEL |
|
201 |
); |
|
202 |
theDialog.setButtonLabel(WindowManager_v2.BUTTON_OK, i18n.getTranslation("_Convert")); |
|
203 |
theDialog.setButtonLabel(WindowManager_v2.BUTTON_CANCEL, i18n.getTranslation("_Close")); |
|
204 |
theDialog.setAutoclose(false); |
|
205 |
|
|
206 |
theDialog.addActionListener((ActionEvent e) -> { |
|
207 |
switch (theDialog.getAction()) { |
|
208 |
case WindowManager_v2.BUTTON_OK: |
|
209 |
Thread task = new Thread(() -> { |
|
210 |
try { |
|
211 |
theDialog.setButtonEnabled(WindowManager_v2.BUTTON_OK, false); |
|
212 |
panel.setTaskStatusVisible(true); |
|
213 |
uhsManager.convertLinesToPolygons( |
|
214 |
panel.getConfig(), |
|
215 |
panel.getSource(), |
|
216 |
panel.getTargetStore(), |
|
217 |
panel.getDeleteSourceAtFinish(), |
|
218 |
panel.getTaskStatus() |
|
219 |
); |
|
220 |
theDialog.asJComponent().setVisible(false); |
|
221 |
} catch(Exception ex) { |
|
222 |
LOGGER.warn("Can't convert lines to polygons", ex); |
|
223 |
} |
|
224 |
}, "UHS_ConvertLinesToPolygons"); |
|
225 |
task.start(); |
|
226 |
break; |
|
227 |
case WindowManager_v2.BUTTON_CANCEL: |
|
228 |
theDialog.asJComponent().setVisible(false); |
|
229 |
break; |
|
230 |
} |
|
231 |
}); |
|
232 |
|
|
233 |
theDialog.show(WindowManager.MODE.WINDOW); |
|
234 |
} |
|
235 |
|
|
236 |
@Override |
|
237 |
public boolean isEnabled() { |
|
238 |
// it's enabled if there is exactly one vector layer in the active view |
|
239 |
// and it has a selection |
|
240 |
|
|
241 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
242 |
ViewDocument viewdoc = (ViewDocument) application.getActiveDocument(ViewManager.TYPENAME); |
|
243 |
if (viewdoc == null) { |
|
244 |
return false; |
|
245 |
} |
|
246 |
MapContext mapContext = viewdoc.getMapContext(); |
|
247 |
FLyrVect layer = mapContext.getLayers().getFirstActiveVectorLayer(); |
|
248 |
if (layer == null) { |
|
249 |
return false; |
|
250 |
} |
|
251 |
if (!layer.isAvailable()) { |
|
252 |
// This can happen when opening a persisted project |
|
253 |
// and there is a "slow" layer (GeoDB) |
|
254 |
return false; |
|
255 |
} |
|
256 |
try { |
|
257 |
FeatureStore store = layer.getFeatureStore(); |
|
258 |
FeatureSelection selection = store.getFeatureSelection(); |
|
259 |
if (selection.isEmpty()) { |
|
260 |
return false; |
|
261 |
} |
|
262 |
return (layer.getLegend() instanceof UrbanHorizontalSignageLegend); |
|
263 |
// return !selection.isEmpty(); |
|
264 |
} catch (Exception ex) { |
|
265 |
LOGGER.warn("Can't get selection from layer '" + layer.getName() + "'.", ex); |
|
266 |
return false; |
|
267 |
} |
|
268 |
} |
|
269 |
|
|
270 |
@Override |
|
271 |
public boolean isVisible() { |
|
272 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
273 |
return application.getActiveDocument(ViewManager.TYPENAME) != null; |
|
274 |
} |
|
275 |
|
|
276 |
private static class StoresWithLayerTypeIcon implements CompoundStoresTreeModel { |
Also available in: Unified diff