Revision 4911
trunk/extensions/extWFS2/config/text.properties | ||
---|---|---|
1 | 1 |
feature=Features |
2 |
Fichero=File |
|
3 |
Valor_azul=Valor Azul |
|
4 |
Valor_rojo=Valor Rojo |
|
5 |
Valor_verde=Valor Verde |
|
6 |
WMSLayer=capaWMS |
|
7 |
abstract=Resumen |
|
8 |
add=A?adir |
|
9 |
ancho_alto=Ancho X Alto |
|
10 |
anterior=Anterior |
|
11 |
apply=Aplicar |
|
12 |
bands=Bandas |
|
13 |
cancel=Cancelar |
|
14 |
cannotReproject=No se puede reproyectar este sistema de coordenadas |
|
15 |
cant_connect=No ha sido posible realizar la conexi?n con el WFS |
|
16 |
capas=Capas |
|
17 |
clear=Limpiar |
|
18 |
conectar=Conectar |
|
19 |
connect_error=Error conectando |
|
20 |
coor_geograficas=Coor. Geograficas |
|
21 |
countries_of_the_world=Afghanistan;Albania;Algeria;American Samoa;Andorra;Angola;Anguilla;Antarctica;Antigua and Barbuda;Argentina;Armenia;Aruba;Ascension Island;Australia;Austria;Azerbaijan;Bahamas;Bahrain;Bangladesh;Barbados;Belarus;Belgium;Belize;Benin;Bermuda;Bhutan;Bolivia;Bosnia and Herzegovina;Botswana;Bouvet Island;Brazil;British Indian Ocean Territory;Brunei;Bulgaria;Burkina Faso;Burundi;Cambodia;Cameroon;Canada;Cape Verde;Cayman Islands;Central African Republic;Chad;Chile;China;Christmas Island;Cocos (Keeling) Islands;Colombia;Comoros;Congo (DRC);Congo;Cook Islands;Costa Rica;C?te d'Ivoire;Croatia;Cuba;Cyprus;Czech Republic;Denmark;Djibouti;Dominica;Dominican Republic;Ecuador;Egypt;El Salvador;Equatorial Guinea;Eritrea;Estonia;Ethiopia;Falkland Islands (Islas Malvinas);Faroe Islands;Fiji Islands;Finland;France;French Guiana;French Polynesia;French Southern and Antarctic Lands;Gabon;Gambia, The;Georgia;Germany;Ghana;Gibraltar;Greece;Greenland;Grenada;Guadeloupe;Guam;Guatemala;Guernsey;Guinea;Guinea-Bissau;Guyana;Haiti;Heard Island and McDonald Islands;Honduras;Hong Kong SAR;Hungary;Iceland;India;Indonesia;Iran;Iraq;Ireland;Isle of Man;Israel;Italy;Jamaica;Japan;Jordan;Jersey;Kazakhstan;Kenya;Kiribati;Korea;Kuwait;Kyrgyzstan;Laos;Latvia;Lebanon;Lesotho;Liberia;Libya;Liechtenstein;Lithuania;Luxembourg;Macao SAR;Macedonia, Former Yugoslav Republic of;Madagascar;Malawi;Malaysia;Maldives;Mali;Malta;Marshall Islands;Martinique;Mauritania;Mauritius;Mayotte;Mexico;Micronesia;Moldova;Monaco;Mongolia;Montserrat;Morocco;Mozambique;Myanmar;Namibia;Nauru;Nepal;Netherlands Antilles;Netherlands, The;New Caledonia;New Zealand;Nicaragua;Niger;Nigeria;Niue;Norfolk Island;North Korea;Northern Mariana Islands;Norway;Oman;Pakistan;Palau;Palestinian Authority;Panama;Papua New Guinea;Paraguay;Peru;Philippines;Pitcairn Islands;Poland;Portugal;Puerto Rico;Qatar;Reunion;Romania;Russia;Rwanda;Samoa;San Marino;S?o Tom? and Pr?ncipe;Saudi Arabia;Senegal;Serbia and Montenegro;Seychelles;Sierra Leone;Singapore;Slovakia;Slovenia;Solomon Islands;Somalia;South Africa;South Georgia and the South Sandwich Islands;Spain;Sri Lanka;St. Helena;St. Kitts and Nevis;St. Lucia;St. Pierre and Miquelon;St. Vincent and the Grenadines;Sudan;Suriname;Svalbard and Jan Mayen;Swaziland;Sweden;Switzerland;Syria;Taiwan;Tajikistan;Tanzania;Thailand;Timor-Leste;Togo;Tokelau;Tonga;Trinidad and Tobago;Tristan da Cunha;Tunisia;Turkey;Turkmenistan;Turks and Caicos Islands;Tuvalu;Uganda;Ukraine;United Arab Emirates;United Kingdom;United States of America;United States Minor Outlying Islands;Uruguay;Uzbekistan;Vanuatu;Vatican City;Venezuela;Vietnam;Virgin Islands;Virgin Islands, British;Wallis and Futuna;Yemen;Zambia;Zimbabwe |
|
22 |
covered_extension=Extensi?n |
|
23 |
description=Descripci?n |
|
24 |
desde=Desde |
|
25 |
dimension=Dimensi?n |
|
26 |
dimensiones=Dimensiones |
|
27 |
eliminar_extremos=Eliminar Extremos |
|
28 |
estilos=Estilos |
|
29 |
extents_no_coincidentes=El extent de la imagen seleccionada no coincide con la imagen de origen. |
|
30 |
fichero_existe=El fichero seleccionado ya existe como banda de la capa |
|
31 |
fit_WMS_layer=Ajustar capa WMS |
|
32 |
format=Formato |
|
33 |
formatos=Formatos |
|
34 |
from=Desde |
|
35 |
in=in |
|
36 |
info=Informaci?n |
|
37 |
interval=Intervalo |
|
38 |
intervalo=Intervalo |
|
39 |
introduzca_intervalo_deseado=Introduzca el intervalo deseado |
|
40 |
layer_abstract=Resumen |
|
41 |
layer_name=Nombre de la capa |
|
42 |
layer_title=T?tulo de la capa |
|
43 |
lineal_directo=Lineal Directo |
|
44 |
move_layer_down=Mover abajo |
|
45 |
move_layer_up=Mover arriba |
|
46 |
muestra=Muestra |
|
47 |
multiple_value=Valor m?ltiple |
|
48 |
multiples_intervalos=M?ltiples Intervalos |
|
49 |
name=Nombre |
|
50 |
none_selected=Ninguno seleccionado |
|
51 |
not_available=No disponible |
|
52 |
num_bandas=N\u00FAmero de bandas |
|
53 |
ok=Aceptar |
|
54 |
opacidad=Opacidad |
|
55 |
period=Periodo |
|
56 |
properties=Propiedades |
|
57 |
propiedades_raster=Propiedades del r\u00E1ster |
|
58 |
realce=Realce |
|
59 |
recorte=recorte |
|
60 |
recorte_colas=Recorte de Colas |
|
61 |
refresh_capabilities=Refrescar cach? |
|
62 |
refresh_capabilities_tooltip=Marque esta casilla para sobreescribir los datos anteriores. |
|
63 |
remove=Quitar |
|
64 |
seleccionar_srs=Seleccionar SRS |
|
65 |
select_formats=Seleccionar formatos |
|
66 |
select_layers=Seleccionar capas |
|
67 |
selected_dimensions=Dimensiones Seleccionadas |
|
68 |
selected_layers=Capas seleccionadas |
|
69 |
selected_themes=Temas seleccionados |
|
70 |
server=Servidor |
|
71 |
server_abstract=Sumario |
|
72 |
server_cant_render_layers=Este servidor no puede renderizar estas capas juntas.\nPruebe a hacer peticiones separadas para cada capa. |
|
73 |
server_timeout=Alcanzado m?ximo tiempo de espera de respuesta del WMS |
|
74 |
server_title=T?tulo |
|
75 |
server_type=Tipo de servidor |
|
76 |
service_info=Informaci?n del servicio |
|
77 |
set=Establecer |
|
78 |
settings=Ajustes |
|
79 |
settings_editor=Editor de ajustes |
|
80 |
show_layer_names=Mostrar nombres |
|
81 |
disagregate_layers=Conservar estructura de capas |
|
82 |
siguiente=Siguiente |
|
83 |
sin_realce=Sin Realce |
|
84 |
single_value=Valor simple |
|
85 |
style=Estilo |
|
86 |
tipo_dato=Tipo de Dato |
|
87 |
to=Hasta |
|
88 |
transparencia=Transparencia |
|
89 |
unknown_response_format=Formato de respuesta desconocido |
|
90 |
usar_rango=Usa un rango |
|
91 |
valor_pixel=Valor de pixel |
|
92 |
value=Valor |
|
93 |
version_conflict=Conflicto de versiones |
|
94 |
wms_not_queryable=Este servidor no acepta peticiones de este tipo |
|
95 |
wms_properties=Propiedades WMS |
|
96 |
wms_server_error=Error del servidor WMS |
|
97 |
wms_transparency=Transparencia |
|
98 |
xmax=X m\u00E1xima |
|
99 |
xmin=X m\u00EDnima |
|
100 |
ymax=Y m\u00E1xima |
|
101 |
ymin=Y m\u00EDnima |
|
2 |
fields=Campos |
|
3 |
options=Opciones |
|
4 |
nombre_feature=Nombre de la Feature |
|
5 |
select_fields=Seleccionar campos de la Feature |
|
6 |
select_features=Selecciona las Features |
|
7 |
|
trunk/extensions/extWFS2/config/config.xml | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
2 | 2 |
<plugin-config> |
3 |
|
|
4 | 3 |
<depends plugin-name="com.iver.cit.gvsig" /> |
5 | 4 |
<libraries library-dir="./lib"/> |
5 |
<resourceBundle name="text"/> |
|
6 | 6 |
<extensions> |
7 | 7 |
<extension class-name="com.iver.cit.gvsig.wfs.WFSClientExtension" |
8 | 8 |
description="Support to access WFS" |
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/fmap/drivers/WFSDriver.java | ||
---|---|---|
48 | 48 |
* |
49 | 49 |
* $Id$ |
50 | 50 |
* $Log$ |
51 |
* Revision 1.1 2006-04-19 12:50:16 jorpiell |
|
51 |
* Revision 1.2 2006-04-20 16:38:24 jorpiell |
|
52 |
* Ahora mismo ya se puede hacer un getCapabilities y un getDescribeType de la capa seleccionada para ver los atributos a dibujar. Queda implementar el panel de opciones y hacer el getFeature(). |
|
53 |
* |
|
54 |
* Revision 1.1 2006/04/19 12:50:16 jorpiell |
|
52 | 55 |
* Primer commit de la aplicaci?n. Se puede hacer un getCapabilities y ver el mensaje de vienvenida del servidor |
53 | 56 |
* |
54 | 57 |
* |
... | ... | |
66 | 69 |
*/ |
67 | 70 |
public void getCapabilities(URL server) throws WFSException; |
68 | 71 |
|
72 |
/** |
|
73 |
* Obtiene la informacion asociada a una feature particular. |
|
74 |
* Esta informaci?n puede ser un conjunto de campos o un |
|
75 |
* esquema que los contiene. No devuleve nada. Simplemente |
|
76 |
* actualiza la lista de features. |
|
77 |
* @param featureType |
|
78 |
* Nombre de la featurea a buscar |
|
79 |
* @throws WFSException |
|
80 |
*/ |
|
81 |
public void describeFeatureType(String featureType)throws WFSException; |
|
69 | 82 |
|
70 | 83 |
|
71 | 84 |
|
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/fmap/drivers/wfs/FMapWFSDriver.java | ||
---|---|---|
5 | 5 |
import java.net.URL; |
6 | 6 |
import java.util.Hashtable; |
7 | 7 |
import java.util.Iterator; |
8 |
import java.util.Set; |
|
8 | 9 |
import java.util.Vector; |
9 | 10 |
|
10 | 11 |
import org.gvsig.remoteClient.wfs.WFSClient; |
12 |
import org.gvsig.remoteClient.wfs.WFSFeature; |
|
11 | 13 |
import org.gvsig.remoteClient.wfs.WFSProtocolHandler.ServiceInformation; |
12 | 14 |
|
13 | 15 |
import com.iver.cit.gvsig.fmap.DriverException; |
... | ... | |
60 | 62 |
* |
61 | 63 |
* $Id$ |
62 | 64 |
* $Log$ |
63 |
* Revision 1.1 2006-04-19 12:50:16 jorpiell |
|
65 |
* Revision 1.2 2006-04-20 16:38:24 jorpiell |
|
66 |
* Ahora mismo ya se puede hacer un getCapabilities y un getDescribeType de la capa seleccionada para ver los atributos a dibujar. Queda implementar el panel de opciones y hacer el getFeature(). |
|
67 |
* |
|
68 |
* Revision 1.1 2006/04/19 12:50:16 jorpiell |
|
64 | 69 |
* Primer commit de la aplicaci?n. Se puede hacer un getCapabilities y ver el mensaje de vienvenida del servidor |
65 | 70 |
* |
66 | 71 |
* |
... | ... | |
70 | 75 |
*/ |
71 | 76 |
public class FMapWFSDriver implements WFSDriver{ |
72 | 77 |
private WFSClient client; |
73 |
private WFSLayerNode fmapRootLayer; |
|
78 |
private WFSLayerNode[] featuresList; |
|
79 |
private Hashtable features; |
|
74 | 80 |
|
75 | 81 |
/* |
76 | 82 |
* (non-Javadoc) |
... | ... | |
82 | 88 |
getClient(server).connect(); |
83 | 89 |
} catch (Exception e) { |
84 | 90 |
throw new WFSException(e); |
85 |
} |
|
86 |
|
|
87 |
} |
|
88 |
|
|
91 |
} |
|
92 |
} |
|
89 | 93 |
|
90 | 94 |
/** |
91 | 95 |
* Devuelve WFSClient a partir de su URL. |
... | ... | |
103 | 107 |
if (client == null) { |
104 | 108 |
client = new WFSClient(url.toString()); |
105 | 109 |
} |
106 |
|
|
107 | 110 |
return client; |
108 | 111 |
} |
109 | 112 |
|
... | ... | |
132 | 135 |
} |
133 | 136 |
|
134 | 137 |
/** |
138 |
* Returns an array of WFSLayerNode's with the descriptors of |
|
139 |
* all features (retrieved using the getCapabilities operation) |
|
140 |
* @return WFSLayerNode[] |
|
141 |
*/ |
|
142 |
public WFSLayerNode[] getLayerList(){ |
|
143 |
if (features == null) { |
|
144 |
features = new Hashtable(); |
|
145 |
Hashtable wfsFeatures = client.getFeatures(); |
|
146 |
|
|
147 |
Iterator keys = wfsFeatures.keySet().iterator(); |
|
148 |
featuresList = new WFSLayerNode[wfsFeatures.size()]; |
|
149 |
|
|
150 |
for (int i=0 ; i<wfsFeatures.size() ; i++){ |
|
151 |
WFSLayerNode lyr = new WFSLayerNode(); |
|
152 |
WFSFeature feature = (WFSFeature)wfsFeatures.get(keys.next()); |
|
153 |
|
|
154 |
lyr.setName(feature.getName()); |
|
155 |
lyr.setTitle(feature.getTitle()); |
|
156 |
lyr.setAbstract(feature.getAbstract()); |
|
157 |
lyr.setFields(feature.getFields()); |
|
158 |
|
|
159 |
featuresList[i] = lyr; |
|
160 |
features.put(lyr.getName(), lyr); |
|
161 |
} |
|
162 |
} |
|
163 |
return featuresList; |
|
164 |
} |
|
165 |
|
|
166 |
/** |
|
167 |
* Returns all the feature information retrieved using a |
|
168 |
* describeFeatureTypeOpearion |
|
169 |
* @param layerName |
|
170 |
* Feature name |
|
171 |
* @return |
|
172 |
*/ |
|
173 |
public WFSLayerNode getLayerInfo(String layerName){ |
|
174 |
WFSLayerNode lyr = (WFSLayerNode)features.get(layerName); |
|
175 |
if (lyr.getFields().size() == 0){ |
|
176 |
try { |
|
177 |
describeFeatureType(layerName); |
|
178 |
WFSFeature feature = (WFSFeature) client.getFeatures().get(layerName); |
|
179 |
lyr.setFields(feature.getFields()); |
|
180 |
} catch (WFSException e) { |
|
181 |
// The feature doesn't has fields |
|
182 |
e.printStackTrace(); |
|
183 |
} |
|
184 |
} |
|
185 |
return lyr; |
|
186 |
} |
|
187 |
|
|
188 |
|
|
189 |
/** |
|
135 | 190 |
* @return The title of the service offered by the WMS server. |
136 | 191 |
*/ |
137 | 192 |
public String getServiceTitle() { |
... | ... | |
168 | 223 |
} |
169 | 224 |
|
170 | 225 |
/** |
171 |
* Returns the feature list |
|
172 |
* @return Features vector |
|
173 |
*/ |
|
174 |
public Vector getFeatures(){ |
|
175 |
return client.getFeatures(); |
|
176 |
} |
|
177 |
|
|
178 |
/** |
|
179 | 226 |
* |
180 | 227 |
* @return the host |
181 | 228 |
*/ |
... | ... | |
189 | 236 |
public String getVersion() { |
190 | 237 |
return client.getVersion(); |
191 | 238 |
} |
239 |
|
|
240 |
/* |
|
241 |
* (non-Javadoc) |
|
242 |
* @see com.iver.cit.gvsig.fmap.drivers.WFSDriver#describeFeatureType(java.lang.String) |
|
243 |
*/ |
|
244 |
public void describeFeatureType(String featureType) throws WFSException { |
|
245 |
client.describeFeatureType(null,featureType); |
|
246 |
} |
|
192 | 247 |
|
193 | 248 |
|
194 | 249 |
} |
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/fmap/layers/WFSLayerNode.java | ||
---|---|---|
1 | 1 |
package com.iver.cit.gvsig.fmap.layers; |
2 |
|
|
3 |
import java.util.Hashtable; |
|
4 |
import java.util.Vector; |
|
5 |
|
|
2 | 6 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
3 | 7 |
* |
4 | 8 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
... | ... | |
43 | 47 |
* |
44 | 48 |
* $Id$ |
45 | 49 |
* $Log$ |
46 |
* Revision 1.1 2006-04-19 12:50:16 jorpiell |
|
50 |
* Revision 1.2 2006-04-20 16:38:24 jorpiell |
|
51 |
* Ahora mismo ya se puede hacer un getCapabilities y un getDescribeType de la capa seleccionada para ver los atributos a dibujar. Queda implementar el panel de opciones y hacer el getFeature(). |
|
52 |
* |
|
53 |
* Revision 1.1 2006/04/19 12:50:16 jorpiell |
|
47 | 54 |
* Primer commit de la aplicaci?n. Se puede hacer un getCapabilities y ver el mensaje de vienvenida del servidor |
48 | 55 |
* |
49 | 56 |
* |
... | ... | |
54 | 61 |
* @author Jorge Piera Llodr? (piera_jor@gva.es) |
55 | 62 |
*/ |
56 | 63 |
public class WFSLayerNode { |
57 |
private String name; |
|
58 |
private String description; |
|
59 |
|
|
64 |
private String name = null; |
|
65 |
private String title = null; |
|
66 |
private String _abstract = null; |
|
67 |
private Vector keykords = new Vector(); |
|
68 |
private String defaultSRS = null; |
|
69 |
private Vector otherSRS = new Vector(); |
|
70 |
private String noSRS = null; |
|
71 |
private Vector operations = new Vector(); |
|
72 |
private String outputFormat = null; |
|
73 |
private String wgs84BoundingBox = null; |
|
74 |
private Vector metadataURL = new Vector(); |
|
75 |
private Hashtable fields = new Hashtable(); |
|
76 |
|
|
60 | 77 |
/** |
61 |
* @return Returns the description.
|
|
78 |
* @return Returns the fields.
|
|
62 | 79 |
*/ |
63 |
public String getDescription() {
|
|
64 |
return description;
|
|
80 |
public Hashtable getFields() {
|
|
81 |
return fields;
|
|
65 | 82 |
} |
66 |
|
|
67 | 83 |
/** |
84 |
* @param fields The fields to set. |
|
85 |
*/ |
|
86 |
public void setFields(Hashtable fields) { |
|
87 |
this.fields = fields; |
|
88 |
} |
|
89 |
/** |
|
90 |
* |
|
91 |
*/ |
|
92 |
public String toString(){ |
|
93 |
String str; |
|
94 |
if (getName()==null) |
|
95 |
str = getTitle(); |
|
96 |
else |
|
97 |
str = "["+getName()+"] "+getTitle(); |
|
98 |
return str; |
|
99 |
} |
|
100 |
/** |
|
101 |
* @return Returns the _abstract. |
|
102 |
*/ |
|
103 |
public String getAbstract() { |
|
104 |
return _abstract; |
|
105 |
} |
|
106 |
/** |
|
107 |
* @param _abstract The _abstract to set. |
|
108 |
*/ |
|
109 |
public void setAbstract(String _abstract) { |
|
110 |
this._abstract = _abstract; |
|
111 |
} |
|
112 |
/** |
|
68 | 113 |
* @return Returns the name. |
69 | 114 |
*/ |
70 | 115 |
public String getName() { |
71 | 116 |
return name; |
72 | 117 |
} |
118 |
/** |
|
119 |
* @param name The name to set. |
|
120 |
*/ |
|
121 |
public void setName(String name) { |
|
122 |
this.name = name; |
|
123 |
} |
|
124 |
/** |
|
125 |
* @return Returns the title. |
|
126 |
*/ |
|
127 |
public String getTitle() { |
|
128 |
return title; |
|
129 |
} |
|
130 |
/** |
|
131 |
* @param title The title to set. |
|
132 |
*/ |
|
133 |
public void setTitle(String title) { |
|
134 |
this.title = title; |
|
135 |
} |
|
73 | 136 |
|
74 |
|
|
137 |
|
|
138 |
|
|
75 | 139 |
} |
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/gui/panels/InfoPanel.java | ||
---|---|---|
1 |
package com.iver.cit.gvsig.gui.panels; |
|
2 |
|
|
3 |
import javax.swing.JEditorPane; |
|
4 |
import javax.swing.JPanel; |
|
5 |
import javax.swing.JScrollPane; |
|
6 |
|
|
7 |
import com.iver.andami.PluginServices; |
|
8 |
import com.iver.cit.gvsig.fmap.layers.WFSLayerNode; |
|
9 |
import com.iver.cit.gvsig.gui.wizards.WFSWizardData; |
|
10 |
|
|
11 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
12 |
* |
|
13 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
14 |
* |
|
15 |
* This program is free software; you can redistribute it and/or |
|
16 |
* modify it under the terms of the GNU General Public License |
|
17 |
* as published by the Free Software Foundation; either version 2 |
|
18 |
* of the License, or (at your option) any later version. |
|
19 |
* |
|
20 |
* This program is distributed in the hope that it will be useful, |
|
21 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
22 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
23 |
* GNU General Public License for more details. |
|
24 |
* |
|
25 |
* You should have received a copy of the GNU General Public License |
|
26 |
* along with this program; if not, write to the Free Software |
|
27 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
28 |
* |
|
29 |
* For more information, contact: |
|
30 |
* |
|
31 |
* Generalitat Valenciana |
|
32 |
* Conselleria d'Infraestructures i Transport |
|
33 |
* Av. Blasco Ib??ez, 50 |
|
34 |
* 46010 VALENCIA |
|
35 |
* SPAIN |
|
36 |
* |
|
37 |
* +34 963862235 |
|
38 |
* gvsig@gva.es |
|
39 |
* www.gvsig.gva.es |
|
40 |
* |
|
41 |
* or |
|
42 |
* |
|
43 |
* IVER T.I. S.A |
|
44 |
* Salamanca 50 |
|
45 |
* 46005 Valencia |
|
46 |
* Spain |
|
47 |
* |
|
48 |
* +34 963163400 |
|
49 |
* dac@iver.es |
|
50 |
*/ |
|
51 |
/* CVS MESSAGES: |
|
52 |
* |
|
53 |
* $Id$ |
|
54 |
* $Log$ |
|
55 |
* Revision 1.1 2006-04-19 12:50:16 jorpiell |
|
56 |
* Primer commit de la aplicaci?n. Se puede hacer un getCapabilities y ver el mensaje de vienvenida del servidor |
|
57 |
* |
|
58 |
* |
|
59 |
*/ |
|
60 |
/** |
|
61 |
* @author Jorge Piera Llodr? (piera_jor@gva.es) |
|
62 |
*/ |
|
63 |
public class InfoPanel extends JPanel { |
|
64 |
private final String bgColor0 = "\"#FEEDD6\""; // light salmon |
|
65 |
private final String bgColor1 = "\"#EAEAEA\""; // light grey |
|
66 |
private final String bgColor2 = "\"#F2FEFF\""; // light blue |
|
67 |
private final String bgColor3 = "\"#FBFFE1\""; // light yellow |
|
68 |
|
|
69 |
private final String service_title = PluginServices.getText(this, "service_info"); |
|
70 |
private final String server = PluginServices.getText(this, "server"); |
|
71 |
private final String server_type = PluginServices.getText(this, "server_type"); |
|
72 |
private final String server_abstract = PluginServices.getText(this, "server_abstract"); |
|
73 |
private final String server_title = PluginServices.getText(this, "server_title"); |
|
74 |
private final String layers_title = PluginServices.getText(this, "selected_layers"); |
|
75 |
private final String layer_title = PluginServices.getText(this, "layer_title"); |
|
76 |
private final String layer_abstract = PluginServices.getText(this, "layer_abstract"); |
|
77 |
private final String selected_parameters = PluginServices.getText(this, "selected_parameters"); |
|
78 |
private final String time_title = PluginServices.getText(this, "time"); |
|
79 |
private final String format_title = PluginServices.getText(this, "format"); |
|
80 |
private final String srs_title = "CRS"; |
|
81 |
private final String properties = PluginServices.getText(this, "properties"); |
|
82 |
private final String layer_name = PluginServices.getText(this, "name"); |
|
83 |
private JEditorPane editor = null; |
|
84 |
|
|
85 |
|
|
86 |
/** |
|
87 |
* Creates a new instance of InfoPanel with double buffer and null layout |
|
88 |
* |
|
89 |
*/ |
|
90 |
public InfoPanel() { |
|
91 |
super(); |
|
92 |
setLayout(null); |
|
93 |
JScrollPane src = new JScrollPane(); |
|
94 |
src.setBounds(5, 5, 455, 375); |
|
95 |
add(src, null); |
|
96 |
src.setViewportView(getEditor()); |
|
97 |
} |
|
98 |
|
|
99 |
/** |
|
100 |
* This method initializes tblInfo |
|
101 |
* |
|
102 |
* @return javax.swing.JTable |
|
103 |
*/ |
|
104 |
private JEditorPane getEditor() { |
|
105 |
if (editor == null) { |
|
106 |
editor = new JEditorPane(); |
|
107 |
editor.setEditable(false); |
|
108 |
} |
|
109 |
return editor; |
|
110 |
} |
|
111 |
|
|
112 |
|
|
113 |
/** |
|
114 |
* Fills the text pane with a data table describing the service and the |
|
115 |
* selected settings. |
|
116 |
* |
|
117 |
* @param WCSWizardData dataSource: connection info |
|
118 |
* @param WCSLayer layer: the selected layer |
|
119 |
* @param String time: the time value. |
|
120 |
* @param String format: the format value |
|
121 |
* @param String crs: the CRS value |
|
122 |
* @param String parameters: comma-separated key-value string containing the values for the parameters |
|
123 |
*/ |
|
124 |
|
|
125 |
public void refresh(WFSWizardData dataSource) { |
|
126 |
|
|
127 |
String server_text = dataSource.getHost(); |
|
128 |
String server_type_text = dataSource.getServerType(); |
|
129 |
String server_title_text = dataSource.getTitle(); |
|
130 |
String server_abstract_text = dataSource.getAbstract(); |
|
131 |
String font = "Arial"; |
|
132 |
|
|
133 |
if (server_text == null) |
|
134 |
server_text = "-"; |
|
135 |
if (server_type_text == null) |
|
136 |
server_type_text = "-"; |
|
137 |
if (server_title_text == null) |
|
138 |
server_title_text = "-"; |
|
139 |
if (server_abstract_text == null) |
|
140 |
server_abstract_text = "-"; |
|
141 |
// |
|
142 |
// if (format == null) |
|
143 |
// format = PluginServices.getText(this, "none_selected"); |
|
144 |
// if (crs == null) |
|
145 |
// crs = PluginServices.getText(this, "none_selected"); |
|
146 |
// |
|
147 |
String layers_html = ""; |
|
148 |
// if (layer!=null) { |
|
149 |
// String layer_name_text = layer.getName(); |
|
150 |
//// String time_text = (time==null) ? PluginServices.getText(this, "not_available") : time;//((FMapWMSStyle) selectedStyles.get(i)).title; |
|
151 |
// String layer_abstract_text = layer.getDescription(); |
|
152 |
//String layer_title_text = layer.getTitle(); |
|
153 |
|
|
154 |
// if (layer_name_text ==null) |
|
155 |
// layer_name_text = "-"; |
|
156 |
//// if (time_text==null) |
|
157 |
//// time_text = "-"; |
|
158 |
// if (layer_abstract_text==null) |
|
159 |
// layer_abstract_text = "-"; |
|
160 |
// if (layer_title_text == null) |
|
161 |
// layer_title_text = "-"; |
|
162 |
// String layer_html = |
|
163 |
// " <tr valign=\"top\">" + |
|
164 |
// " <td bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"Arial\" size=\"3\" align=\"right\"><b>"+layer_name+"</b></font></td>" + |
|
165 |
// " <td bgcolor="+bgColor0+"><font face=\"Arial\" size=\"3\">"+layer_name_text+"</font></td>" + |
|
166 |
// " </tr>" + |
|
167 |
//// " <tr valign=\"top\">" + |
|
168 |
//// " <td width=\"119\" height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"Arial\" size=\"3\"><b>"+layer_title+"</b></font></td>" + |
|
169 |
//// " <td width=\"322\" height=\"18\" bgcolor="+bgColor1+"><font face=\"Arial\" size=\"3\">"+layer_title_text+"</font></td>" + |
|
170 |
//// " </tr>" + |
|
171 |
// " <tr valign=\"top\">" + |
|
172 |
// " <td bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"Arial\" size=\"3\" align=\"right\"><b>"+layer_abstract+"</b></font></td>" + |
|
173 |
// " <td bgcolor="+bgColor0+"><font face=\"Arial\" size=\"3\">"+layer_abstract_text+"</font></td>" + |
|
174 |
// " </tr>" + |
|
175 |
//// " <tr valign=\"top\">" + |
|
176 |
//// " <td bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"Arial\" size=\"3\" align=\"right\"><b>"+time_title+"</b></font></td>" + |
|
177 |
//// " <td bgcolor="+bgColor1+"><font face=\"Arial\" size=\"3\">"+time_text+"</font></td>" + |
|
178 |
//// " </tr>" + |
|
179 |
// " <tr>" + |
|
180 |
// " </tr>"; |
|
181 |
// layers_html += layer_html; |
|
182 |
// } |
|
183 |
// if (!layers_html.equals("")) |
|
184 |
// layers_html = |
|
185 |
// " <tr valign=\"top\" bgcolor=\"#FFFFFF\">" + |
|
186 |
// " <td width=\"92\" height=\"18\" bgcolor="+bgColor3+" colspan=\"2\"><font face=\""+font+"\" size=\"4\"><b>"+layers_title+"</font></b></td>" + |
|
187 |
// " </tr>" + layers_html; |
|
188 |
// String parameter_html = ""; |
|
189 |
// if (parameters!=null) { |
|
190 |
// boolean swap = false; |
|
191 |
// String[] myParameters = parameters.split("&"); |
|
192 |
// for (int i = 0; i < myParameters.length; i++) { |
|
193 |
// String color = swap ? bgColor0 : bgColor1; |
|
194 |
// String[] parameter = myParameters[i].split("="); |
|
195 |
// parameter_html += |
|
196 |
// " <tr valign=\"top\" bgcolor="+color+">" + |
|
197 |
// " <td width=\"120\" height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><b>"+parameter[0]+"</b></td>" + |
|
198 |
// " <td width=\"322\" height=\"18\">"+parameter[1]+"</td>" + |
|
199 |
// " </tr>"; |
|
200 |
// swap = !swap; |
|
201 |
// } |
|
202 |
// parameter_html += |
|
203 |
// " <tr>" + |
|
204 |
// " </tr>"; |
|
205 |
// } |
|
206 |
// if (!parameter_html.equals("")) |
|
207 |
// parameter_html = |
|
208 |
// " <tr valign=\"top\">" + |
|
209 |
// " <td width=\"92\" height=\"18\" bgcolor="+bgColor3+" colspan=\"2\"><font face=\""+font+"\" size=\"4\"><b>"+selected_parameters+"</font></b></td>" + |
|
210 |
// " </tr>" + parameter_html; |
|
211 |
// |
|
212 |
// String format_html = |
|
213 |
// " <tr valign=\"top\" bgcolor=\"#FFFFFF\">" + |
|
214 |
// " <td width=\"92\" height=\"18\" bgcolor="+bgColor3+" colspan=\"2\"><font face=\""+font+"\" size=\"4\"><b>"+properties+"</font></b></td>" + |
|
215 |
// " </tr>" + |
|
216 |
// " <tr valign=\"top\" bgcolor="+bgColor0+">" + |
|
217 |
// " <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\""+font+"\" size=\"3\"><b>"+format_title+"</b></font></td>" + |
|
218 |
// " <td><font face=\""+font+"\" size=\"3\"><font face=\""+font+"\" size=\"3\">"+format+"</font></td>" + |
|
219 |
// " </tr>" + |
|
220 |
// " <tr valign=\"top\" bgcolor="+bgColor1+">" + |
|
221 |
// " <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\""+font+"\" size=\"3\"><b>"+srs_title+"</font></b></td>" + |
|
222 |
// " <td><font face=\""+font+"\" size=\"3\">"+crs+"</font></td>" + |
|
223 |
// " </tr>"; |
|
224 |
// |
|
225 |
String html = |
|
226 |
"<html>" + |
|
227 |
"<body>" + |
|
228 |
"<table align=\"center\" width=\"437\" height=\"156\" border=\"0\" cellpadding=\"4\" cellspacing=\"4\">" + |
|
229 |
" <tr valign=\"top\" bgcolor=\"#FFFFFF\">" + |
|
230 |
" <td width=\"92\" height=\"18\" bgcolor="+bgColor3+" colspan=\"2\"><font face=\""+font+"\" size=\"4\"><b>"+service_title+"</font></b></td>" + |
|
231 |
" </tr>" + |
|
232 |
" <tr valign=\"top\" bgcolor="+bgColor0+">" + |
|
233 |
" <td width=\"92\" height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\""+font+"\" size=\"3\"><b>"+server+"</font></b></td>" + |
|
234 |
" <td width=\"268\"><font face=\""+font+"\" size=\"3\">"+server_text+"</font></td>" + |
|
235 |
" </tr>" + |
|
236 |
" <tr valign=\"top\" bgcolor="+bgColor1+">" + |
|
237 |
" <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\""+font+"\" size=\"3\"><b>"+server_type+"</b></font></td>" + |
|
238 |
" <td><font face=\""+font+"\" size=\"3\">"+server_type_text+"</font></td>" + |
|
239 |
" </tr>" + |
|
240 |
" <tr valign=\"top\" bgcolor="+bgColor0+">" + |
|
241 |
" <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\""+font+"\" size=\"3\"><b>"+server_title+"</b></font></td>" + |
|
242 |
" <td><font face=\""+font+"\" size=\"3\"><font face=\""+font+"\" size=\"3\">"+server_title_text+"</font></td>" + |
|
243 |
" </tr>" + |
|
244 |
" <tr valign=\"top\" bgcolor="+bgColor1+">" + |
|
245 |
" <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\""+font+"\" size=\"3\"><b>"+server_abstract+"</font></b></td>" + |
|
246 |
" <td><font face=\""+font+"\" size=\"3\">"+server_abstract_text+"</font></td>" + |
|
247 |
" </tr>" + |
|
248 |
|
|
249 |
" <tr>" + |
|
250 |
" </tr>" + |
|
251 |
// layers_html + |
|
252 |
// parameter_html + |
|
253 |
// format_html + |
|
254 |
"</table>" + |
|
255 |
"</body>" + |
|
256 |
"</html>"; |
|
257 |
|
|
258 |
getEditor().setContentType("text/html"); |
|
259 |
getEditor().setText(html); |
|
260 |
} |
|
261 |
} |
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/gui/panels/LayerTree.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
|
|
42 |
/* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id$ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.1 2006-04-19 12:50:16 jorpiell |
|
47 |
* Primer commit de la aplicaci?n. Se puede hacer un getCapabilities y ver el mensaje de vienvenida del servidor |
|
48 |
* |
|
49 |
* Revision 1.6 2006/03/27 15:10:06 jaume |
|
50 |
* images moved to libUI, and some code clean up |
|
51 |
* |
|
52 |
* Revision 1.5 2006/03/21 17:49:04 jaume |
|
53 |
* *** empty log message *** |
|
54 |
* |
|
55 |
* Revision 1.4 2006/02/28 15:25:14 jaume |
|
56 |
* *** empty log message *** |
|
57 |
* |
|
58 |
* Revision 1.2.2.4 2006/02/17 12:57:34 jaume |
|
59 |
* oculta/eXconde los nombres de las capas y adem?s corrige el error de selecci?n de varios styles si hay alguna capa seleccionada repetida |
|
60 |
* |
|
61 |
* Revision 1.2.2.3 2006/01/31 16:25:24 jaume |
|
62 |
* correcciones de bugs |
|
63 |
* |
|
64 |
* Revision 1.3 2006/01/26 16:07:14 jaume |
|
65 |
* *** empty log message *** |
|
66 |
* |
|
67 |
* Revision 1.2.2.1 2006/01/26 12:59:32 jaume |
|
68 |
* 0.5 |
|
69 |
* |
|
70 |
* Revision 1.2 2006/01/24 14:36:33 jaume |
|
71 |
* This is the new version |
|
72 |
* |
|
73 |
* Revision 1.1.2.1 2006/01/17 12:56:03 jaume |
|
74 |
* *** empty log message *** |
|
75 |
* |
|
76 |
* |
|
77 |
*/ |
|
78 |
/** |
|
79 |
* |
|
80 |
*/ |
|
81 |
package com.iver.cit.gvsig.gui.panels; |
|
82 |
|
|
83 |
import java.awt.Component; |
|
84 |
|
|
85 |
import javax.swing.JToolTip; |
|
86 |
import javax.swing.JTree; |
|
87 |
import javax.swing.ToolTipManager; |
|
88 |
import javax.swing.tree.DefaultTreeCellRenderer; |
|
89 |
|
|
90 |
import org.gvsig.gui.beans.controls.MultiLineToolTip; |
|
91 |
|
|
92 |
import com.iver.andami.PluginServices; |
|
93 |
import com.iver.cit.gvsig.fmap.layers.WFSLayerNode; |
|
94 |
|
|
95 |
/** |
|
96 |
* LayerTree extends the standard JTree class to allow use custom tooltips. |
|
97 |
* It is just JTree containing WMSLayerNode at its nodes. |
|
98 |
* |
|
99 |
* @author jaume |
|
100 |
* |
|
101 |
*/ |
|
102 |
public class LayerTree extends JTree { |
|
103 |
public boolean showLayerNames = false; |
|
104 |
private int count = 0; |
|
105 |
public LayerTree(){ |
|
106 |
super(); |
|
107 |
ToolTipManager.sharedInstance().registerComponent(this); |
|
108 |
ToolTipManager.sharedInstance().setDismissDelay(60*1000); |
|
109 |
setCellRenderer(new MyRenderer()); |
|
110 |
} |
|
111 |
|
|
112 |
/** |
|
113 |
* Layer tree specific renderer allowing to show multiple line |
|
114 |
* tooltips |
|
115 |
* @author jaume |
|
116 |
* |
|
117 |
*/ |
|
118 |
private class MyRenderer extends DefaultTreeCellRenderer { |
|
119 |
|
|
120 |
|
|
121 |
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { |
|
122 |
super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); |
|
123 |
if (value instanceof WFSLayerNode){ |
|
124 |
WFSLayerNode layer = (WFSLayerNode) value; |
|
125 |
|
|
126 |
// String myLatLonTxt = layer.getLatLonBox(); |
|
127 |
// if (myLatLonTxt == null) |
|
128 |
// myLatLonTxt = "-"; |
|
129 |
// |
|
130 |
String myAbstract = layer.getDescription(); |
|
131 |
|
|
132 |
if (myAbstract == null) |
|
133 |
myAbstract = "-"; |
|
134 |
else |
|
135 |
myAbstract = format(myAbstract.trim(), 100); |
|
136 |
|
|
137 |
String text = |
|
138 |
PluginServices.getText(this, "abstract") + ":\n" + myAbstract + |
|
139 |
"\n\n"; |
|
140 |
// PluginServices.getText(this, "covered_extension") + ":\n" + myLatLonTxt; |
|
141 |
|
|
142 |
setToolTipText(text); |
|
143 |
|
|
144 |
if (!showLayerNames) { |
|
145 |
if (layer.getName() != null || layer.getName() == "") { |
|
146 |
text = layer.toString(); |
|
147 |
text = text.substring(text.indexOf(']')+2, text.length()); |
|
148 |
setText(text); |
|
149 |
} |
|
150 |
} |
|
151 |
|
|
152 |
// Dimension sz = getPreferredSize(); |
|
153 |
// sz.setSize((sz.getWidth()+50) - (3*count), sz.getHeight()); |
|
154 |
// setPreferredSize(sz); |
|
155 |
// count++; |
|
156 |
|
|
157 |
} else { |
|
158 |
setToolTipText(null); |
|
159 |
} |
|
160 |
return this; |
|
161 |
} |
|
162 |
} |
|
163 |
|
|
164 |
|
|
165 |
/** |
|
166 |
* Cuts the message text to force its lines to be shorter or equal to |
|
167 |
* lineLength. |
|
168 |
* @param message, the message. |
|
169 |
* @param lineLength, the max line length in number of characters. |
|
170 |
* @return the formated message. |
|
171 |
*/ |
|
172 |
public static String format(String message, int lineLength){ |
|
173 |
if (message.length() <= lineLength) return message; |
|
174 |
String[] lines = message.split("\n"); |
|
175 |
String theMessage = ""; |
|
176 |
for (int i = 0; i < lines.length; i++) { |
|
177 |
String line = lines[i].trim(); |
|
178 |
if (line.length()<lineLength) |
|
179 |
theMessage += line+"\n"; |
|
180 |
else { |
|
181 |
String[] chunks = line.split(" "); |
|
182 |
String newLine = ""; |
|
183 |
for (int j = 0; j < chunks.length; j++) { |
|
184 |
int currentLength = newLine.length(); |
|
185 |
chunks[j] = chunks[j].trim(); |
|
186 |
if (chunks[j].length()==0) |
|
187 |
continue; |
|
188 |
if ((currentLength + chunks[j].length() + " ".length()) <= lineLength) |
|
189 |
newLine += chunks[j] + " "; |
|
190 |
else { |
|
191 |
newLine += "\n"+chunks[j]+" "; |
|
192 |
theMessage += newLine; |
|
193 |
newLine = ""; |
|
194 |
} |
|
195 |
} |
|
196 |
} |
|
197 |
} |
|
198 |
return theMessage; |
|
199 |
} |
|
200 |
|
|
201 |
public JToolTip createToolTip() { |
|
202 |
MultiLineToolTip tip = new MultiLineToolTip(); |
|
203 |
tip.setComponent(this); |
|
204 |
return tip; |
|
205 |
} |
|
206 |
} |
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/gui/panels/WFSInfoPanel.java | ||
---|---|---|
1 |
package com.iver.cit.gvsig.gui.panels; |
|
2 |
|
|
3 |
import javax.swing.JEditorPane; |
|
4 |
import javax.swing.JPanel; |
|
5 |
import javax.swing.JScrollPane; |
|
6 |
|
|
7 |
import com.iver.andami.PluginServices; |
|
8 |
import com.iver.cit.gvsig.fmap.layers.WFSLayerNode; |
|
9 |
import com.iver.cit.gvsig.gui.wizards.WFSWizardData; |
|
10 |
|
|
11 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
12 |
* |
|
13 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
14 |
* |
|
15 |
* This program is free software; you can redistribute it and/or |
|
16 |
* modify it under the terms of the GNU General Public License |
|
17 |
* as published by the Free Software Foundation; either version 2 |
|
18 |
* of the License, or (at your option) any later version. |
|
19 |
* |
|
20 |
* This program is distributed in the hope that it will be useful, |
|
21 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
22 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
23 |
* GNU General Public License for more details. |
|
24 |
* |
|
25 |
* You should have received a copy of the GNU General Public License |
|
26 |
* along with this program; if not, write to the Free Software |
|
27 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
28 |
* |
|
29 |
* For more information, contact: |
|
30 |
* |
|
31 |
* Generalitat Valenciana |
|
32 |
* Conselleria d'Infraestructures i Transport |
|
33 |
* Av. Blasco Ib??ez, 50 |
|
34 |
* 46010 VALENCIA |
|
35 |
* SPAIN |
|
36 |
* |
|
37 |
* +34 963862235 |
|
38 |
* gvsig@gva.es |
|
39 |
* www.gvsig.gva.es |
|
40 |
* |
|
41 |
* or |
|
42 |
* |
|
43 |
* IVER T.I. S.A |
|
44 |
* Salamanca 50 |
|
45 |
* 46005 Valencia |
|
46 |
* Spain |
|
47 |
* |
|
48 |
* +34 963163400 |
|
49 |
* dac@iver.es |
|
50 |
*/ |
|
51 |
/* CVS MESSAGES: |
|
52 |
* |
|
53 |
* $Id$ |
|
54 |
* $Log$ |
|
55 |
* Revision 1.1 2006-04-20 16:38:24 jorpiell |
|
56 |
* Ahora mismo ya se puede hacer un getCapabilities y un getDescribeType de la capa seleccionada para ver los atributos a dibujar. Queda implementar el panel de opciones y hacer el getFeature(). |
|
57 |
* |
|
58 |
* Revision 1.1 2006/04/19 12:50:16 jorpiell |
|
59 |
* Primer commit de la aplicaci?n. Se puede hacer un getCapabilities y ver el mensaje de vienvenida del servidor |
|
60 |
* |
|
61 |
* |
|
62 |
*/ |
|
63 |
/** |
|
64 |
* @author Jorge Piera Llodr? (piera_jor@gva.es) |
|
65 |
*/ |
|
66 |
public class WFSInfoPanel extends JPanel { |
|
67 |
private final String bgColor0 = "\"#FEEDD6\""; // light salmon |
|
68 |
private final String bgColor1 = "\"#EAEAEA\""; // light grey |
|
69 |
private final String bgColor2 = "\"#F2FEFF\""; // light blue |
|
70 |
private final String bgColor3 = "\"#FBFFE1\""; // light yellow |
|
71 |
|
|
72 |
private final String service_title = PluginServices.getText(this, "service_info"); |
|
73 |
private final String server = PluginServices.getText(this, "server"); |
|
74 |
private final String server_type = PluginServices.getText(this, "server_type"); |
|
75 |
private final String server_abstract = PluginServices.getText(this, "server_abstract"); |
|
76 |
private final String server_title = PluginServices.getText(this, "server_title"); |
|
77 |
private final String layers_title = PluginServices.getText(this, "selected_layers"); |
|
78 |
private final String layer_title = PluginServices.getText(this, "layer_title"); |
|
79 |
private final String layer_abstract = PluginServices.getText(this, "layer_abstract"); |
|
80 |
private final String selected_parameters = PluginServices.getText(this, "selected_parameters"); |
|
81 |
private final String time_title = PluginServices.getText(this, "time"); |
|
82 |
private final String format_title = PluginServices.getText(this, "format"); |
|
83 |
private final String srs_title = "CRS"; |
|
84 |
private final String properties = PluginServices.getText(this, "properties"); |
|
85 |
private final String layer_name = PluginServices.getText(this, "name"); |
|
86 |
private JEditorPane editor = null; |
|
87 |
|
|
88 |
|
|
89 |
/** |
|
90 |
* Creates a new instance of InfoPanel with double buffer and null layout |
|
91 |
* |
|
92 |
*/ |
|
93 |
public WFSInfoPanel() { |
|
94 |
super(); |
|
95 |
setLayout(null); |
|
96 |
JScrollPane src = new JScrollPane(); |
|
97 |
src.setBounds(5, 5, 455, 375); |
|
98 |
add(src, null); |
|
99 |
src.setViewportView(getEditor()); |
|
100 |
} |
|
101 |
|
|
102 |
/** |
|
103 |
* This method initializes tblInfo |
|
104 |
* |
|
105 |
* @return javax.swing.JTable |
|
106 |
*/ |
|
107 |
private JEditorPane getEditor() { |
|
108 |
if (editor == null) { |
|
109 |
editor = new JEditorPane(); |
|
110 |
editor.setEditable(false); |
|
111 |
} |
|
112 |
return editor; |
|
113 |
} |
|
114 |
|
|
115 |
|
|
116 |
/** |
|
117 |
* Fills the text pane with a data table describing the |
|
118 |
* service and the selected settings. |
|
119 |
* |
|
120 |
* @param WFSWizardData dataSource: connection info |
|
121 |
* @param WFSLayer layer: the selected layer |
|
122 |
*/ |
|
123 |
|
|
124 |
public void refresh(WFSWizardData dataSource,WFSLayerNode layer) { |
|
125 |
|
|
126 |
String server_text = dataSource.getHost(); |
|
127 |
String server_type_text = dataSource.getServerType(); |
|
128 |
String server_title_text = dataSource.getTitle(); |
|
129 |
String server_abstract_text = dataSource.getAbstract(); |
|
130 |
String font = "Arial"; |
|
131 |
|
|
132 |
if (server_text == null) |
|
133 |
server_text = "-"; |
|
134 |
if (server_type_text == null) |
|
135 |
server_type_text = "-"; |
|
136 |
if (server_title_text == null) |
|
137 |
server_title_text = "-"; |
|
138 |
if (server_abstract_text == null) |
|
139 |
server_abstract_text = "-"; |
|
140 |
|
|
141 |
String layers_html = ""; |
|
142 |
if (layer!=null) { |
|
143 |
String layer_name_text = layer.getName(); |
|
144 |
String layer_abstract_text = layer.getAbstract(); |
|
145 |
String layer_title_text = layer.getTitle(); |
|
146 |
|
|
147 |
if (layer_name_text ==null) |
|
148 |
layer_name_text = "-"; |
|
149 |
if (layer_abstract_text==null) |
|
150 |
layer_abstract_text = "-"; |
|
151 |
if (layer_title_text == null) |
|
152 |
layer_title_text = "-"; |
|
153 |
String layer_html = |
|
154 |
" <tr valign=\"top\">" + |
|
155 |
" <td bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"Arial\" size=\"3\" align=\"right\"><b>"+layer_name+"</b></font></td>" + |
|
156 |
" <td bgcolor="+bgColor0+"><font face=\"Arial\" size=\"3\">"+layer_name_text+"</font></td>" + |
|
157 |
" </tr>" + |
|
158 |
" <tr valign=\"top\">" + |
|
159 |
" <td width=\"119\" height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"Arial\" size=\"3\"><b>"+layer_title+"</b></font></td>" + |
|
160 |
" <td width=\"322\" height=\"18\" bgcolor="+bgColor1+"><font face=\"Arial\" size=\"3\">"+layer_title_text+"</font></td>" + |
|
161 |
" </tr>" + |
|
162 |
" <tr valign=\"top\">" + |
|
163 |
" <td bgcolor=\"#D6D6D6\" align=\"right\"><font face=\"Arial\" size=\"3\" align=\"right\"><b>"+layer_abstract+"</b></font></td>" + |
|
164 |
" <td bgcolor="+bgColor0+"><font face=\"Arial\" size=\"3\">"+layer_abstract_text+"</font></td>" + |
|
165 |
" </tr>" + |
|
166 |
" <tr>" + |
|
167 |
" </tr>"; |
|
168 |
layers_html += layer_html; |
|
169 |
} |
|
170 |
if (!layers_html.equals("")) |
|
171 |
layers_html = |
|
172 |
" <tr valign=\"top\" bgcolor=\"#FFFFFF\">" + |
|
173 |
" <td width=\"92\" height=\"18\" bgcolor="+bgColor3+" colspan=\"2\"><font face=\""+font+"\" size=\"4\"><b>"+layers_title+"</font></b></td>" + |
|
174 |
" </tr>" + layers_html; |
|
175 |
// String parameter_html = ""; |
|
176 |
// if (parameters!=null) { |
|
177 |
// boolean swap = false; |
|
178 |
// String[] myParameters = parameters.split("&"); |
|
179 |
// for (int i = 0; i < myParameters.length; i++) { |
|
180 |
// String color = swap ? bgColor0 : bgColor1; |
|
181 |
// String[] parameter = myParameters[i].split("="); |
|
182 |
// parameter_html += |
|
183 |
// " <tr valign=\"top\" bgcolor="+color+">" + |
|
184 |
// " <td width=\"120\" height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><b>"+parameter[0]+"</b></td>" + |
|
185 |
// " <td width=\"322\" height=\"18\">"+parameter[1]+"</td>" + |
|
186 |
// " </tr>"; |
|
187 |
// swap = !swap; |
|
188 |
// } |
|
189 |
// parameter_html += |
|
190 |
// " <tr>" + |
|
191 |
// " </tr>"; |
|
192 |
// } |
|
193 |
// if (!parameter_html.equals("")) |
|
194 |
// parameter_html = |
|
195 |
// " <tr valign=\"top\">" + |
|
196 |
// " <td width=\"92\" height=\"18\" bgcolor="+bgColor3+" colspan=\"2\"><font face=\""+font+"\" size=\"4\"><b>"+selected_parameters+"</font></b></td>" + |
|
197 |
// " </tr>" + parameter_html; |
|
198 |
// |
|
199 |
// String format_html = |
|
200 |
// " <tr valign=\"top\" bgcolor=\"#FFFFFF\">" + |
|
201 |
// " <td width=\"92\" height=\"18\" bgcolor="+bgColor3+" colspan=\"2\"><font face=\""+font+"\" size=\"4\"><b>"+properties+"</font></b></td>" + |
|
202 |
// " </tr>" + |
|
203 |
// " <tr valign=\"top\" bgcolor="+bgColor0+">" + |
|
204 |
// " <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\""+font+"\" size=\"3\"><b>"+format_title+"</b></font></td>" + |
|
205 |
// " <td><font face=\""+font+"\" size=\"3\"><font face=\""+font+"\" size=\"3\">"+format+"</font></td>" + |
|
206 |
// " </tr>" + |
|
207 |
// " <tr valign=\"top\" bgcolor="+bgColor1+">" + |
|
208 |
// " <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\""+font+"\" size=\"3\"><b>"+srs_title+"</font></b></td>" + |
|
209 |
// " <td><font face=\""+font+"\" size=\"3\">"+crs+"</font></td>" + |
|
210 |
// " </tr>"; |
|
211 |
// |
|
212 |
String html = |
|
213 |
"<html>" + |
|
214 |
"<body>" + |
|
215 |
"<table align=\"center\" width=\"437\" height=\"156\" border=\"0\" cellpadding=\"4\" cellspacing=\"4\">" + |
|
216 |
" <tr valign=\"top\" bgcolor=\"#FFFFFF\">" + |
|
217 |
" <td width=\"92\" height=\"18\" bgcolor="+bgColor3+" colspan=\"2\"><font face=\""+font+"\" size=\"4\"><b>"+service_title+"</font></b></td>" + |
|
218 |
" </tr>" + |
|
219 |
" <tr valign=\"top\" bgcolor="+bgColor0+">" + |
|
220 |
" <td width=\"92\" height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\""+font+"\" size=\"3\"><b>"+server+"</font></b></td>" + |
|
221 |
" <td width=\"268\"><font face=\""+font+"\" size=\"3\">"+server_text+"</font></td>" + |
|
222 |
" </tr>" + |
|
223 |
" <tr valign=\"top\" bgcolor="+bgColor1+">" + |
|
224 |
" <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\""+font+"\" size=\"3\"><b>"+server_type+"</b></font></td>" + |
|
225 |
" <td><font face=\""+font+"\" size=\"3\">"+server_type_text+"</font></td>" + |
|
226 |
" </tr>" + |
|
227 |
" <tr valign=\"top\" bgcolor="+bgColor0+">" + |
|
228 |
" <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\""+font+"\" size=\"3\"><b>"+server_title+"</b></font></td>" + |
|
229 |
" <td><font face=\""+font+"\" size=\"3\"><font face=\""+font+"\" size=\"3\">"+server_title_text+"</font></td>" + |
|
230 |
" </tr>" + |
|
231 |
" <tr valign=\"top\" bgcolor="+bgColor1+">" + |
|
232 |
" <td height=\"18\" bgcolor=\"#D6D6D6\" align=\"right\"><font face=\""+font+"\" size=\"3\"><b>"+server_abstract+"</font></b></td>" + |
|
233 |
" <td><font face=\""+font+"\" size=\"3\">"+server_abstract_text+"</font></td>" + |
|
234 |
" </tr>" + |
|
235 |
|
|
236 |
" <tr>" + |
|
237 |
" </tr>" + |
|
238 |
layers_html + |
|
239 |
// parameter_html + |
|
240 |
// format_html + |
|
241 |
"</table>" + |
|
242 |
"</body>" + |
|
243 |
"</html>"; |
|
244 |
|
|
245 |
getEditor().setContentType("text/html"); |
|
246 |
getEditor().setText(html); |
|
247 |
} |
|
248 |
} |
|
0 | 249 |
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/gui/panels/WFSOptionsPanel.java | ||
---|---|---|
1 |
package com.iver.cit.gvsig.gui.panels; |
|
2 |
|
|
3 |
import javax.swing.JPanel; |
|
4 |
|
|
5 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
6 |
* |
|
7 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
22 |
* |
|
23 |
* For more information, contact: |
|
24 |
* |
|
25 |
* Generalitat Valenciana |
|
26 |
* Conselleria d'Infraestructures i Transport |
|
27 |
* Av. Blasco Ib??ez, 50 |
|
28 |
* 46010 VALENCIA |
|
29 |
* SPAIN |
|
30 |
* |
|
31 |
* +34 963862235 |
|
32 |
* gvsig@gva.es |
|
33 |
* www.gvsig.gva.es |
|
34 |
* |
|
35 |
* or |
|
36 |
* |
|
37 |
* IVER T.I. S.A |
|
38 |
* Salamanca 50 |
|
39 |
* 46005 Valencia |
|
40 |
* Spain |
|
41 |
* |
|
42 |
* +34 963163400 |
|
43 |
* dac@iver.es |
|
44 |
*/ |
|
45 |
/* CVS MESSAGES: |
|
46 |
* |
|
47 |
* $Id$ |
|
48 |
* $Log$ |
|
49 |
* Revision 1.1 2006-04-20 16:38:24 jorpiell |
|
50 |
* Ahora mismo ya se puede hacer un getCapabilities y un getDescribeType de la capa seleccionada para ver los atributos a dibujar. Queda implementar el panel de opciones y hacer el getFeature(). |
|
51 |
* |
|
52 |
* |
|
53 |
*/ |
|
54 |
/** |
|
55 |
* @author Jorge Piera Llodr? (piera_jor@gva.es) |
|
56 |
*/ |
|
57 |
public class WFSOptionsPanel extends JPanel{ |
|
58 |
|
|
59 |
} |
|
0 | 60 |
trunk/extensions/extWFS2/src/com/iver/cit/gvsig/gui/panels/WFSSelectFeaturePanel.java | ||
---|---|---|
1 | 1 |
package com.iver.cit.gvsig.gui.panels; |
2 | 2 |
|
3 |
import java.awt.event.MouseAdapter; |
|
4 |
import java.awt.event.MouseEvent; |
|
5 |
|
|
6 |
import javax.swing.ImageIcon; |
|
7 |
import javax.swing.JButton; |
|
8 | 3 |
import javax.swing.JCheckBox; |
4 |
import javax.swing.JLabel; |
|
9 | 5 |
import javax.swing.JPanel; |
10 | 6 |
import javax.swing.JScrollPane; |
11 | 7 |
import javax.swing.JTextField; |
12 | 8 |
|
13 |
import org.gvsig.gui.beans.controls.dnd.JDnDListModel; |
|
14 |
|
|
15 | 9 |
import com.iver.andami.PluginServices; |
16 |
import com.iver.cit.gvsig.gui.wizards.FormatListModel; |
|
17 |
import com.iver.cit.gvsig.gui.wizards.LayerTreeModel; |
|
10 |
import com.iver.cit.gvsig.fmap.layers.WFSLayerNode; |
|
18 | 11 |
import com.iver.cit.gvsig.gui.wizards.WFSWizardData; |
19 | 12 |
|
20 | 13 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
... | ... | |
61 | 54 |
* |
62 | 55 |
* $Id$ |
63 | 56 |
* $Log$ |
64 |
* Revision 1.1 2006-04-19 12:50:16 jorpiell
|
|
65 |
* Primer commit de la aplicaci?n. Se puede hacer un getCapabilities y ver el mensaje de vienvenida del servidor
|
|
57 |
* Revision 1.2 2006-04-20 16:38:24 jorpiell
|
|
58 |
* Ahora mismo ya se puede hacer un getCapabilities y un getDescribeType de la capa seleccionada para ver los atributos a dibujar. Queda implementar el panel de opciones y hacer el getFeature().
|
|
66 | 59 |
* |
67 | 60 |
* |
68 | 61 |
*/ |
69 | 62 |
/** |
70 | 63 |
* @author Jorge Piera Llodr? (piera_jor@gva.es) |
71 | 64 |
*/ |
72 |
public class WFSSelectFeaturePanel extends JPanel{ |
|
73 |
|
|
74 |
private JPanel layerNamePanel = null; |
|
75 |
private JPanel selectionPanel = null; |
|
76 |
private JTextField jTxtNomCapa = null; |
|
65 |
public class WFSSelectFeaturePanel extends JPanel { |
|
66 |
private JPanel coveragesListPanel = null; |
|
67 |
private JScrollPane jScrollPane = null; |
|
68 |
private LayerList lstFeatures = null; |
|
69 |
private JTextField txtName = null; |
|
70 |
private JLabel jLabel = null; |
|
77 | 71 |
private JCheckBox chkExtendedNames = null; |
78 |
private JScrollPane jScrollPane1 = null; |
|
79 |
private LayerTree treeLayers = null; |
|
80 |
private JButton btnDel = null; |
|
81 |
private JButton btnAdd = null; |
|
82 |
private JButton btnUp = null; |
|
83 |
private JScrollPane jScrollPane5 = null; |
|
84 |
private JButton btnDown = null; |
|
85 |
private JCheckBox chkDisagregate = null; |
|
86 |
private LayerList lstSelectedLayers = null; |
|
87 | 72 |
private WFSWizardData data = null; |
73 |
private WFSParamsPanel parent = null; |
|
88 | 74 |
|
89 | 75 |
/** |
90 | 76 |
* This method initializes |
91 | 77 |
* |
92 | 78 |
*/ |
93 |
public WFSSelectFeaturePanel() { |
|
79 |
public WFSSelectFeaturePanel(WFSParamsPanel parent) {
|
|
94 | 80 |
super(); |
81 |
this.parent = parent; |
|
95 | 82 |
initialize(); |
96 | 83 |
} |
97 | 84 |
|
... | ... | |
100 | 87 |
* |
101 | 88 |
*/ |
102 | 89 |
private void initialize() { |
90 |
jLabel = new JLabel(); |
|
103 | 91 |
this.setLayout(null); |
104 |
this.add(getLayerNamePanel(), null); |
|
105 |
this.add(getSelectionPanel(), null); |
|
92 |
this.setBounds(10, 5, 481, 427); |
|
93 |
jLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); |
|
94 |
jLabel.setBounds(7, 5, 130, 22); |
|
95 |
jLabel.setText(PluginServices.getText(this, "nombre_feature")); |
|
96 |
|
|
97 |
this.add(getCoveragesListPanel(), null); |
|
98 |
this.add(getTxtName(), null); |
|
99 |
this.add(jLabel, null); |
|
100 |
this.add(getChkExtendedNames(), null); |
|
106 | 101 |
|
107 | 102 |
} |
108 |
|
|
109 | 103 |
|
110 | 104 |
/** |
111 |
* This method initializes layerNamePanel
|
|
105 |
* This method initializes coveragesListPanel
|
|
112 | 106 |
* |
113 | 107 |
* @return javax.swing.JPanel |
114 | 108 |
*/ |
115 |
private JPanel getLayerNamePanel() { |
|
116 |
if (layerNamePanel == null) { |
|
117 |
layerNamePanel = new JPanel(); |
|
118 |
layerNamePanel.setLayout(null); |
|
119 |
layerNamePanel.setBorder(javax.swing.BorderFactory.createTitledBorder( |
|
120 |
null, PluginServices.getText(this, "layer_name"), |
|
121 |
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, |
|
122 |
javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
|
123 |
layerNamePanel.setBounds(4, 8, 457, 49); |
|
124 |
layerNamePanel.add(getJTxtNomCapa(), null); |
|
125 |
|
|
109 |
private JPanel getCoveragesListPanel() { |
|
110 |
if (coveragesListPanel == null) { |
|
111 |
coveragesListPanel = new JPanel(); |
|
112 |
coveragesListPanel.setLayout(null); |
|
113 |
coveragesListPanel.setBounds(7, 33, 460, 328); |
|
114 |
coveragesListPanel.add(getJScrollPane(), null); |
|
115 |
coveragesListPanel.setBorder(javax.swing.BorderFactory.createTitledBorder( |
|
116 |
null, PluginServices.getText(this, "select_features"), |
|
117 |
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, |
|
118 |
javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
|
126 | 119 |
} |
127 |
return layerNamePanel;
|
|
120 |
return coveragesListPanel;
|
|
128 | 121 |
} |
129 | 122 |
|
130 | 123 |
/** |
131 |
* This method initializes jTextField |
|
132 |
* |
|
133 |
* @return javax.swing.JTextField |
|
134 |
*/ |
|
135 |
public JTextField getJTxtNomCapa() { |
|
136 |
if (jTxtNomCapa == null) { |
|
137 |
jTxtNomCapa = new JTextField(); |
|
138 |
jTxtNomCapa.setBounds(10, 19, 437, 20); |
|
139 |
jTxtNomCapa.setText(PluginServices.getText(this, "WFSLayer")); |
|
140 |
jTxtNomCapa.addKeyListener(new java.awt.event.KeyAdapter() { |
|
141 |
public void keyTyped(java.awt.event.KeyEvent e) { |
|
142 |
// fireWizardComplete(isCorrectlyConfigured()); |
|
124 |
* This method initializes jScrollPane |
|
125 |
* |
|
126 |
* @return javax.swing.JScrollPane |
|
127 |
*/ |
|
128 |
private JScrollPane getJScrollPane() { |
|
129 |
if (jScrollPane == null) { |
|
130 |
jScrollPane = new JScrollPane(); |
|
131 |
jScrollPane.setBounds(6, 17, 446, 306); |
|
132 |
jScrollPane.setViewportView(getLstFeatures()); |
|
133 |
} |
|
134 |
return jScrollPane; |
|
135 |
} |
|
136 |
|
|
137 |
/** |
|
138 |
* This method initializes jList1 |
|
139 |
* |
|
140 |
* @return javax.swing.JList |
|
141 |
*/ |
|
142 |
public LayerList getLstFeatures() { |
|
143 |
if (lstFeatures == null) { |
|
144 |
lstFeatures = new LayerList(); |
|
145 |
lstFeatures.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); |
|
146 |
lstFeatures.addListSelectionListener(new javax.swing.event.ListSelectionListener() { |
|
147 |
public void valueChanged(javax.swing.event.ListSelectionEvent e) { |
|
148 |
refreshData(); |
|
143 | 149 |
} |
144 | 150 |
}); |
145 | 151 |
} |
146 |
|
|
147 |
return jTxtNomCapa; |
|
152 |
return lstFeatures; |
|
148 | 153 |
} |
149 |
|
|
154 |
|
|
150 | 155 |
/** |
151 |
* This method initializes selectionPanel
|
|
156 |
* This method initializes jTextField
|
|
152 | 157 |
* |
153 |
* @return javax.swing.JPanel |
|
154 |
*/ |
|
155 |
private JPanel getSelectionPanel() { |
|
156 |
if (selectionPanel == null) { |
|
157 |
selectionPanel = new javax.swing.JPanel(); |
|
158 |
selectionPanel.setLayout(null); |
|
159 |
selectionPanel.setBounds(4, 59, 457, 328); |
|
160 |
selectionPanel.setBorder(javax.swing.BorderFactory.createTitledBorder( |
|
161 |
null, PluginServices.getText(this, "select_layers"), |
|
162 |
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, |
|
163 |
javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
|
164 |
selectionPanel.add(getChkExtendedNames(), null); |
|
165 |
selectionPanel.add(getJScrollPane1(), null); |
|
166 |
selectionPanel.add(getBtnDel(), null); |
|
167 |
selectionPanel.add(getBtnAdd(), null); |
|
168 |
selectionPanel.add(getJScrollPane5(), null); |
|
169 |
selectionPanel.add(getBtnUp(), null); |
|
170 |
selectionPanel.add(getBtnDown(), null); |
|
171 |
selectionPanel.add(getChkDisagregate(), null); |
|
158 |
* @return javax.swing.JTextField |
|
159 |
*/ |
|
160 |
public JTextField getTxtName() { |
|
161 |
if (txtName == null) { |
|
162 |
txtName = new JTextField(); |
|
163 |
txtName.setBounds(141, 6, 326, 21); |
|
172 | 164 |
} |
173 |
return selectionPanel;
|
|
165 |
return txtName;
|
|
174 | 166 |
} |
175 |
|
|
176 | 167 |
/** |
177 | 168 |
* This method initializes chkExtendedNames |
178 | 169 |
* |
... | ... | |
184 | 175 |
chkExtendedNames.setText(PluginServices.getText(this, "show_layer_names")); |
185 | 176 |
chkExtendedNames.addItemListener(new java.awt.event.ItemListener() { |
186 | 177 |
public void itemStateChanged(java.awt.event.ItemEvent e) { |
187 |
// boolean b = chkExtendedNames.isSelected(); |
|
188 |
// getTreeLayers().showLayerNames = b; |
|
189 |
// getTreeLayers().repaint(); |
|
190 |
// getLstSelectedLayers().showLayerNames = b; |
|
191 |
// getLstSelectedLayers().repaint(); |
|
192 |
// getStyleTree().showLayerNames = b; |
|
178 |
boolean b = chkExtendedNames.isSelected(); |
|
179 |
getLstFeatures().showLayerNames = b; |
|
180 |
getLstFeatures().repaint(); |
|
193 | 181 |
} |
194 | 182 |
}); |
195 | 183 |
chkExtendedNames.addActionListener(new java.awt.event.ActionListener() { |
... | ... | |
197 | 185 |
// fPrefs.putBoolean("show_layer_names", chkExtendedNames.isSelected()); |
198 | 186 |
} |
199 | 187 |
}); |
200 |
chkExtendedNames.setBounds(46, 300, 150, 20);
|
|
188 |
chkExtendedNames.setBounds(10, 368, 150, 20);
|
|
201 | 189 |
// chkExtendedNames.setSelected(fPrefs.getBoolean("show_layer_names", false)); |
202 | 190 |
|
203 | 191 |
} |
... | ... | |
205 | 193 |
} |
206 | 194 |
|
Also available in: Unified diff