Revision 8185
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.62/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.62</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.62/org.gvsig.legend.urbanhorizontalsignage.app/org.gvsig.legend.urbanhorizontalsignage.app.mainplugin/buildNumber.properties | ||
---|---|---|
1 |
#Mon Nov 14 22:07:51 CET 2022 |
|
2 |
buildNumber=153 |
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.62/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 |
<depends plugin-name="org.gvsig.legend.picturemarkersymboltable.app.mainplugin" /> |
|
16 |
<resourceBundle name="text" /> |
|
17 |
<libraries library-dir="lib" /> |
|
18 |
<extensions> |
|
19 |
<extension class-name="org.gvsig.legend.urbanhorizontalsignage.app.UrbanHorizontalSignageExtension" |
|
20 |
description="" active="true" priority="1"> |
|
21 |
|
|
22 |
<action |
|
23 |
name="layer-modify-clipboard-copy-as-polygons" |
|
24 |
label="_Copy_selected_features_as_polygons_to_clipboard" |
|
25 |
tooltip="_Copy_selected_features_as_polygons_to_clipboard" |
|
26 |
position="601105001" |
|
27 |
action-command="layer-modify-clipboard-copy-as-polygons" |
|
28 |
icon="layer-modify-clipboard-copy-as-polygons" |
|
29 |
accelerator="" |
|
30 |
/> |
|
31 |
|
|
32 |
<action |
|
33 |
name="tools-urbanSignage-linesToPolygons" |
|
34 |
label="_Convert_lines_to_polygons" |
|
35 |
tooltip="_Copy_selected_lines_to_polygons" |
|
36 |
position="900500000" |
|
37 |
action-command="tools-urbanSignage-linesToPolygons" |
|
38 |
icon="tools-urbanSignage-linesToPolygons" |
|
39 |
accelerator="" |
|
40 |
/> |
|
41 |
|
|
42 |
<menu |
|
43 |
name="layer-modify-clipboard-copy-as-polygons" |
|
44 |
text="Layer/Modify/_Copy_selected_features_as_polygons_to_clipboard" |
|
45 |
/> |
|
46 |
|
|
47 |
<menu |
|
48 |
name="tools-urbanSignage-linesToPolygons" |
|
49 |
text="tools/_Urban_signage/_Convert_lines_to_polygons" |
|
50 |
/> |
|
51 |
|
|
52 |
<!-- |
|
53 |
<tool-bar name="edit"> |
|
54 |
<action-tool |
|
55 |
name="layer-modify-clipboard-copy-as-polygons" |
|
56 |
/> |
|
57 |
</tool-bar> |
|
58 |
--> |
|
59 |
|
|
60 |
|
|
61 |
</extension> |
|
62 |
<extension class-name="org.gvsig.legend.urbanhorizontalsignage.app.rotate.RotatePointExtension" |
|
63 |
description="" active="false" priority="1"> |
|
64 |
|
|
65 |
<action |
|
66 |
name="layer-modify-rotatepoint" |
|
67 |
label="_Rotate_point" |
|
68 |
tooltip="_Rotate_point" |
|
69 |
position="601105001" |
|
70 |
action-command="layer-modify-rotatepoint" |
|
71 |
icon="layer-modify-rotatepoint" |
|
72 |
accelerator="" |
|
73 |
/> |
|
74 |
|
|
75 |
<menu |
|
76 |
name="layer-modify-rotatepoint" |
|
77 |
text="Layer/Modify/_Rotate_point" |
|
78 |
/> |
|
79 |
|
|
80 |
</extension> |
|
81 |
|
|
82 |
</extensions> |
|
83 |
</plugin-config> |
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.62/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.62/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 |
_Cant_convert_lines_to_polygons=No es posible convertir las l\u00edneas en pol\u00edgonos. |
|
45 |
|
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.62/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 |
|
44 |
_Cant_convert_lines_to_polygons=Can't convert lines to polygons. |
org.gvsig.legend.urbanhorizontalsignage/tags/org.gvsig.legend.urbanhorizontalsignage-1.0.62/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.62/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.62/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.62/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.62/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.threadsafedialogs.ThreadSafeDialogsManager; |
|
40 |
import org.gvsig.tools.swing.api.windowmanager.Dialog; |
|
41 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
|
42 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2; |
|
43 |
import org.gvsig.tools.util.LabeledValue; |
|
44 |
import org.slf4j.Logger; |
|
45 |
import org.slf4j.LoggerFactory; |
|
46 |
|
|
47 |
@SuppressWarnings("UseSpecificCatch") |
|
48 |
public class UrbanHorizontalSignageExtension extends Extension { |
|
49 |
|
|
50 |
private static final Logger LOGGER = LoggerFactory.getLogger(UrbanHorizontalSignageExtension.class); |
|
51 |
|
|
52 |
@Override |
|
53 |
public void initialize() { |
|
54 |
IconThemeHelper.registerIcon("legend", "legend-overview-vectorial-urbanhorizontalsignage", this); |
|
55 |
IconThemeHelper.registerIcon("legend", "legend-overview-vectorial-picturemarkersymboltable", this); |
|
56 |
IconThemeHelper.registerIcon("action", "layer-modify-clipboard-copy-as-polygons", this); |
|
57 |
|
|
58 |
} |
|
59 |
|
|
60 |
@Override |
|
61 |
public void execute(String actionCommand) { |
|
62 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
63 |
|
|
64 |
if ("layer-modify-clipboard-copy-as-polygons".equalsIgnoreCase(actionCommand) ) { |
|
65 |
ViewDocument viewdoc = (ViewDocument) application.getActiveDocument(ViewManager.TYPENAME); |
|
66 |
if (viewdoc == null) { |
|
67 |
return; |
|
68 |
} |
|
69 |
MapContext mapContext = viewdoc.getMapContext(); |
|
70 |
FLyrVect layer = mapContext.getLayers().getFirstActiveVectorLayer(); |
|
71 |
if (layer == null) { |
|
72 |
return; |
|
73 |
} |
|
74 |
copySelecctionAsPolygons(layer); |
|
75 |
|
|
76 |
} else if ("tools-urbanSignage-linesToPolygons".equalsIgnoreCase(actionCommand) ) { |
|
77 |
ViewDocument viewdoc = (ViewDocument) application.getActiveDocument(ViewManager.TYPENAME); |
|
78 |
if (viewdoc == null) { |
|
79 |
return; |
|
80 |
} |
|
81 |
MapContext mapContext = viewdoc.getMapContext(); |
|
82 |
FLyrVect layer = mapContext.getLayers().getFirstActiveVectorLayer(); |
|
83 |
if (layer == null) { |
|
84 |
return; |
|
85 |
} |
|
86 |
if( !(layer.getLegend() instanceof UrbanHorizontalSignageLegend) ) { |
|
87 |
//FIXME mensaje al usuario? |
|
88 |
return; |
|
89 |
} |
|
90 |
UrbanHorizontalSignageLegend legend = (UrbanHorizontalSignageLegend) layer.getLegend(); |
|
91 |
UrbanHorizontalSignageConfig config = legend.getConfig(); // FIXME: clone |
|
92 |
FeatureSet lines; |
|
93 |
try { |
|
94 |
lines = layer.getFeatureStore().getFeatureSelection(); |
|
95 |
} catch(Exception ex) { |
|
96 |
//FIXME mensaje al usuario? |
|
97 |
return; |
|
98 |
} |
|
99 |
convertLinesAsPolygons(config, lines); |
|
100 |
} |
|
101 |
|
|
102 |
} |
|
103 |
|
|
104 |
private void copySelecctionAsPolygons(FLyrVect sourceLayer) { |
|
105 |
// UrbanHorizontalSignageManager uhsManager = UrbanHorizontalSignageLocator.getUrbanHorizontalSignageManager(); |
|
106 |
|
|
107 |
UrbanHorizontalSignageConfigForCopyPanel panel = new UrbanHorizontalSignageConfigForCopyPanel(); |
|
108 |
panel.setFeatureType(sourceLayer.getFeatureStore().getDefaultFeatureTypeQuietly()); |
|
109 |
UrbanHorizontalSignageLegend legend = (UrbanHorizontalSignageLegend) sourceLayer.getLegend(); |
|
110 |
panel.put(legend.getConfig()); |
|
111 |
|
|
112 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
113 |
WindowManager_v2 winManager = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
|
114 |
|
|
115 |
Dialog theDialog = winManager.createDialog( |
|
116 |
panel.asJComponent(), |
|
117 |
i18n.getTranslation("_Copy_as_polygons"), |
|
118 |
i18n.getTranslation("_Copy_as_polygons"), |
|
119 |
WindowManager_v2.BUTTONS_OK_CANCEL |
|
120 |
); |
|
121 |
theDialog.setAutoclose(false); |
|
122 |
|
|
123 |
theDialog.setButtonLabel( |
|
124 |
WindowManager_v2.BUTTON_OK, |
|
125 |
i18n.getTranslation("_Accept") |
|
126 |
); |
|
127 |
theDialog.setButtonLabel( |
|
128 |
WindowManager_v2.BUTTON_CANCEL, |
|
129 |
i18n.getTranslation("_Cancel") |
|
130 |
); |
|
131 |
|
|
132 |
theDialog.addActionListener((ActionEvent e) -> { |
|
133 |
switch (theDialog.getAction()) { |
|
134 |
case WindowManager_v2.BUTTON_OK: |
|
135 |
Thread task = new Thread(() -> { |
|
136 |
panel.fetch(legend.getConfig()); |
|
137 |
performCopyAsPolygons(sourceLayer); |
|
138 |
theDialog.asJComponent().setVisible(false); |
|
139 |
}, "UHS_CopyAsPolygons"); |
|
140 |
task.start(); |
|
141 |
break; |
|
142 |
case WindowManager_v2.BUTTON_CANCEL: |
|
143 |
theDialog.asJComponent().setVisible(false); |
|
144 |
break; |
|
145 |
} |
|
146 |
}); |
|
147 |
|
|
148 |
theDialog.show(WindowManager.MODE.DIALOG); |
|
149 |
} |
|
150 |
|
|
151 |
private void performCopyAsPolygons(FLyrVect sourceLayer) { |
|
152 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
153 |
UrbanHorizontalSignageManager uhsManager = UrbanHorizontalSignageLocator.getUrbanHorizontalSignageManager(); |
|
154 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
155 |
DataManager dataManager = DALLocator.getDataManager(); |
|
156 |
|
|
157 |
UrbanHorizontalSignageLegend legend = (UrbanHorizontalSignageLegend) sourceLayer.getLegend(); |
|
158 |
FeatureStore tempTargetStore = null; |
|
159 |
FeatureSet tempFeatureSet = null; |
|
160 |
try { |
|
161 |
|
|
162 |
FeatureSet sourceFeatureSet = sourceLayer.getFeatureStore().getFeatureSelection(); |
|
163 |
tempTargetStore = uhsManager.createTemporaryPolygonsFromLines(legend.getConfig(), sourceFeatureSet, null); |
|
164 |
tempFeatureSet = tempTargetStore.getFeatureSet(); |
|
165 |
|
|
166 |
int n = application.confirmDialog( |
|
167 |
"_Number_of_geometries_to_be_copied_to_the_clipboard" + " " + tempFeatureSet.getSize() + "\n" + "_Do_you_want_to_continue", |
|
168 |
i18n.getTranslation("_Copy_selected_features_as_polygons_to_clipboard"), |
|
169 |
JOptionPane.YES_NO_OPTION, |
|
170 |
JOptionPane.QUESTION_MESSAGE); |
|
171 |
if (n == JOptionPane.YES_OPTION) { |
|
172 |
dataManager.putFeaturesInClipboard(tempFeatureSet); |
|
173 |
} |
|
174 |
|
|
175 |
} catch (Exception e) { |
|
176 |
LOGGER.warn("Can't get the selection as JSON.", e); |
|
177 |
} finally { |
|
178 |
DisposeUtils.disposeQuietly(tempTargetStore); |
|
179 |
DisposeUtils.disposeQuietly(tempFeatureSet); |
|
180 |
} |
|
181 |
|
|
182 |
} |
|
183 |
|
|
184 |
private void convertLinesAsPolygons(UrbanHorizontalSignageConfig config, FeatureSet source) { |
|
185 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
186 |
WindowManager_v2 winManager = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
|
187 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
188 |
UrbanHorizontalSignageManager uhsManager = UrbanHorizontalSignageLocator.getUrbanHorizontalSignageManager(); |
|
189 |
UrbanHorizontalSignageSwingManager uhsSwingManager = UrbanHorizontalSignageSwingLocator.getUrbanHorizontalSignageSwingManager(); |
|
190 |
|
|
191 |
|
|
192 |
final ConvertLinesToPolygonsPanel panel = uhsSwingManager.createConvertLinesToPolygonsPanel(); |
|
193 |
panel.setSource(source); |
|
194 |
// panel.setStores(new StoresWithLayerTypeIcon()); |
|
195 |
panel.put(config); |
|
196 |
|
|
197 |
Dialog theDialog = winManager.createDialog( |
|
198 |
panel.asJComponent(), |
|
199 |
i18n.getTranslation("_Convert_lines_to_polygons"), |
|
200 |
i18n.getTranslation("_Convert_Urban_signage_lines_to_polygons"), |
|
201 |
WindowManager_v2.BUTTONS_OK_CANCEL |
|
202 |
); |
|
203 |
theDialog.setButtonLabel(WindowManager_v2.BUTTON_OK, i18n.getTranslation("_Convert")); |
|
204 |
theDialog.setButtonLabel(WindowManager_v2.BUTTON_CANCEL, i18n.getTranslation("_Close")); |
|
205 |
theDialog.setAutoclose(false); |
|
206 |
|
|
207 |
theDialog.addActionListener((ActionEvent e) -> { |
|
208 |
switch (theDialog.getAction()) { |
|
209 |
case WindowManager_v2.BUTTON_OK: |
|
210 |
Thread task = new Thread(() -> { |
|
211 |
try { |
|
212 |
theDialog.setButtonEnabled(WindowManager_v2.BUTTON_OK, false); |
|
213 |
panel.setTaskStatusVisible(true); |
|
214 |
uhsManager.convertLinesToPolygons( |
|
215 |
panel.getConfig(), |
|
216 |
panel.getSource(), |
|
217 |
panel.getTargetStore(), |
|
218 |
panel.getDeleteSourceAtFinish(), |
|
219 |
panel.getTaskStatus() |
|
220 |
); |
|
221 |
theDialog.asJComponent().setVisible(false); |
|
222 |
} catch(Exception ex) { |
|
223 |
LOGGER.warn("Can't convert lines to polygons", ex); |
|
224 |
ThreadSafeDialogsManager dialogs = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
225 |
dialogs.messageDialog( |
|
226 |
i18n.getTranslation("_Cant_convert_lines_to_polygons") +"\n\n" + ex.getLocalizedMessage(), |
|
227 |
i18n.getTranslation("_Convert_Urban_signage_lines_to_polygons"), |
|
228 |
JOptionPane.WARNING_MESSAGE |
|
229 |
); |
|
230 |
} |
|
231 |
}, "UHS_ConvertLinesToPolygons"); |
|
232 |
task.start(); |
|
233 |
break; |
|
234 |
case WindowManager_v2.BUTTON_CANCEL: |
|
235 |
theDialog.asJComponent().setVisible(false); |
|
236 |
break; |
|
237 |
} |
|
238 |
}); |
|
239 |
|
|
240 |
theDialog.show(WindowManager.MODE.WINDOW); |
|
241 |
} |
|
242 |
|
|
243 |
@Override |
|
244 |
public boolean isEnabled() { |
|
245 |
// it's enabled if there is exactly one vector layer in the active view |
|
246 |
// and it has a selection |
|
247 |
|
|
248 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
249 |
ViewDocument viewdoc = (ViewDocument) application.getActiveDocument(ViewManager.TYPENAME); |
|
250 |
if (viewdoc == null) { |
|
251 |
return false; |
|
252 |
} |
|
253 |
MapContext mapContext = viewdoc.getMapContext(); |
|
254 |
FLyrVect layer = mapContext.getLayers().getFirstActiveVectorLayer(); |
|
255 |
if (layer == null) { |
|
256 |
return false; |
|
257 |
} |
|
258 |
if (!layer.isAvailable()) { |
|
259 |
// This can happen when opening a persisted project |
|
260 |
// and there is a "slow" layer (GeoDB) |
|
261 |
return false; |
|
262 |
} |
|
263 |
try { |
|
264 |
FeatureStore store = layer.getFeatureStore(); |
|
265 |
FeatureSelection selection = store.getFeatureSelection(); |
|
266 |
if (selection.isEmpty()) { |
|
267 |
return false; |
|
268 |
} |
|
269 |
return (layer.getLegend() instanceof UrbanHorizontalSignageLegend); |
|
270 |
// return !selection.isEmpty(); |
|
271 |
} catch (Exception ex) { |
|
272 |
LOGGER.warn("Can't get selection from layer '" + layer.getName() + "'.", ex); |
|
273 |
return false; |
|
274 |
} |
|
275 |
} |
|
276 |
|
|
277 |
@Override |
|
278 |
public boolean isVisible() { |
|
279 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
280 |
return application.getActiveDocument(ViewManager.TYPENAME) != null; |
|
281 |
} |
|
282 |
|
|
283 |
// private static class StoresWithLayerTypeIcon implements CompoundStoresTreeModel { |
|
284 |
// |
|
285 |
// private final CompoundStoresTreeModel delegated; |
|
286 |
// |
|
287 |
// public StoresWithLayerTypeIcon() { |
|
288 |
// ApplicationManager application = ApplicationLocator.getManager(); |
|
289 |
// this.delegated = (CompoundStoresTreeModel) application.createProjectStoresTreeModel(); |
|
290 |
// } |
|
291 |
// |
|
292 |
// @Override |
|
293 |
// public void setFilter(Predicate<DataStore> filter) { |
|
294 |
// this.delegated.setFilter(filter); |
|
295 |
// } |
|
296 |
// |
|
297 |
// @Override |
|
298 |
// public void addLayers(FLayers layers) { |
|
299 |
// this.delegated.addLayers(layers); |
|
300 |
// } |
|
301 |
// |
|
302 |
// @Override |
|
303 |
// public Icon getIcon(Object item) { |
|
304 |
// Icon icon = this.delegated.getIcon(item); |
|
305 |
// if( item instanceof LabeledValue ) { |
|
306 |
// item = ((LabeledValue)item).getValue(); |
|
307 |
// } |
|
308 |
// if (item instanceof FeatureStore) { |
|
309 |
// try { |
|
310 |
// FeatureStore store = (FeatureStore) item; |
|
311 |
// FeatureType ft = store.getDefaultFeatureTypeQuietly(); |
|
312 |
// int type = ft.getDefaultGeometryAttribute().getGeomType().getType(); |
|
313 |
// Icon icon2 = MapContextLocator.getMapContextManager().getIcon( |
|
314 |
// type, |
|
315 |
// !store.isFeatureSelectionEmpty() |
|
316 |
// ); |
|
317 |
// if( icon2!=null ) { |
|
318 |
// icon = ToolsSwingLocator.getToolsSwingManager().createCompoundIcon( |
|
319 |
// SwingConstants.HORIZONTAL, 2, icon, icon2 |
|
320 |
// ); |
|
321 |
// } |
|
322 |
// } catch(Exception ex) { |
|
323 |
// LOGGER.trace("Can't get geometry type from store.", ex); |
|
324 |
// } |
|
325 |
// } |
|
326 |
// return icon; |
|
327 |
// } |
|
328 |
// |
|
329 |
// @Override |
|
330 |
// public Object getRoot() { |
|
331 |
// return this.delegated.getRoot(); |
|
332 |
// } |
|
333 |
// |
|
334 |
// @Override |
|
335 |
// public Object getChild(Object parent, int index) { |
|
336 |
// return this.delegated.getChild(parent, index); |
|
337 |
// } |
|
338 |
// |
|
339 |
// @Override |
|
340 |
// public int getChildCount(Object parent) { |
|
341 |
// return this.delegated.getChildCount(parent); |
|
342 |
// } |
|
343 |
// |
|
344 |
// @Override |
|
345 |
// public boolean isLeaf(Object node) { |
|
346 |
// return this.delegated.isLeaf(node); |
|
347 |
// } |
|
348 |
// |
|
349 |
// @Override |
|
350 |
// public void valueForPathChanged(TreePath path, Object newValue) { |
|
351 |
// this.delegated.valueForPathChanged(path, newValue); |
|
352 |
// } |
|
353 |
// |
|
354 |
// @Override |
|
355 |
// public int getIndexOfChild(Object parent, Object child) { |
|
356 |
// return this.delegated.getIndexOfChild(parent, child); |
|
357 |
// } |
|
358 |
// |
|
359 |
// @Override |
|
360 |
// public void addTreeModelListener(TreeModelListener l) { |
|
361 |
// this.delegated.addTreeModelListener(l); |
|
362 |
// } |
|
363 |
// |
|
364 |
// @Override |
|
365 |
// public void removeTreeModelListener(TreeModelListener l) { |
|
366 |
// this.delegated.removeTreeModelListener(l); |
|
367 |
// } |
|
368 |
// |
|
369 |
// } |
|
370 |
|
|
371 |
} |
Also available in: Unified diff