Revision 58
org.gvsig.webmap/trunk/org.gvsig.webmap/org.gvsig.webmap.app/org.gvsig.webmap.app.mainplugin/src/main/java/org/gvsig/webmap/app/mainplugin/AddWebMapLayerWizard.java | ||
---|---|---|
28 | 28 |
import java.awt.event.MouseEvent; |
29 | 29 |
import java.awt.event.MouseListener; |
30 | 30 |
import java.util.HashMap; |
31 |
import java.util.Iterator; |
|
31 | 32 |
import java.util.List; |
32 | 33 |
import java.util.Map; |
34 |
import java.util.Map.Entry; |
|
35 |
import java.util.Set; |
|
33 | 36 |
|
34 | 37 |
import javax.swing.JLabel; |
35 | 38 |
import javax.swing.JOptionPane; |
... | ... | |
39 | 42 |
import org.gvsig.app.gui.WizardPanel; |
40 | 43 |
import org.gvsig.app.gui.wizards.WizardListener; |
41 | 44 |
import org.gvsig.app.gui.wizards.WizardListenerSupport; |
45 |
import org.gvsig.fmap.crs.CRSFactory; |
|
42 | 46 |
import org.gvsig.fmap.dal.DataStoreParameters; |
43 | 47 |
import org.gvsig.fmap.dal.exception.InitializeException; |
44 | 48 |
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException; |
45 | 49 |
import org.gvsig.fmap.mapcontext.MapContext; |
46 | 50 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
51 |
import org.gvsig.fmap.mapcontrol.MapControl; |
|
47 | 52 |
import org.gvsig.tools.ToolsLocator; |
48 | 53 |
import org.gvsig.tools.i18n.I18nManager; |
49 | 54 |
import org.gvsig.tools.swing.api.Component; |
... | ... | |
51 | 56 |
import org.gvsig.webmap.lib.api.WebMapService; |
52 | 57 |
import org.gvsig.webmap.lib.api.WebMapServiceFactory; |
53 | 58 |
import org.gvsig.webmap.lib.api.exceptions.WebMapInvalidParamsException; |
59 |
|
|
60 |
import org.cresques.cts.IProjection; |
|
54 | 61 |
import org.slf4j.Logger; |
55 | 62 |
import org.slf4j.LoggerFactory; |
56 | 63 |
|
... | ... | |
71 | 78 |
*/ |
72 | 79 |
public AddWebMapLayerWizard() { |
73 | 80 |
super(); |
74 |
initialize(); |
|
75 | 81 |
} |
76 | 82 |
|
77 | 83 |
/** |
... | ... | |
94 | 100 |
}else{ |
95 | 101 |
for (WebMapServiceFactory serviceFactory:serviceFactories){ |
96 | 102 |
WebMapService webMapService= serviceFactory.create(); |
103 |
webMapService.setMapCtrl(getMapCtrl()); |
|
97 | 104 |
services.put(webMapService.getLabel(), webMapService); |
98 |
apiUI.add(webMapService.getLabel(), webMapService.getParametersPanel().asJComponent()); |
|
105 |
Component parametersPanel = webMapService.getParametersPanel(); |
|
106 |
apiUI.add(webMapService.getLabel(), parametersPanel.asJComponent()); |
|
99 | 107 |
} |
100 | 108 |
} |
101 | 109 |
apiUI.addMouseListener(this); |
... | ... | |
217 | 225 |
|
218 | 226 |
@Override |
219 | 227 |
public void initWizard() { |
220 |
|
|
228 |
initialize(); |
|
221 | 229 |
} |
222 | 230 |
|
223 | 231 |
public void mouseClicked(MouseEvent e) { |
org.gvsig.webmap/trunk/org.gvsig.webmap/org.gvsig.webmap.lib/org.gvsig.webmap.lib.api/src/main/java/org/gvsig/webmap/lib/api/WebMapService.java | ||
---|---|---|
26 | 26 |
import org.gvsig.fmap.dal.exception.InitializeException; |
27 | 27 |
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException; |
28 | 28 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
29 |
import org.gvsig.fmap.mapcontrol.MapControl; |
|
29 | 30 |
import org.gvsig.tools.swing.api.Component; |
30 | 31 |
import org.gvsig.webmap.lib.api.exceptions.WebMapInvalidParamsException; |
31 | 32 |
|
... | ... | |
71 | 72 |
*/ |
72 | 73 |
boolean isValid() throws WebMapInvalidParamsException; |
73 | 74 |
|
75 |
/** |
|
76 |
* Sets the mapControl |
|
77 |
* @param mapControl |
|
78 |
*/ |
|
79 |
void setMapCtrl(MapControl mapControl); |
|
80 |
|
|
74 | 81 |
} |
org.gvsig.webmap/trunk/org.gvsig.webmap/org.gvsig.webmap.lib/org.gvsig.webmap.lib.api/pom.xml | ||
---|---|---|
48 | 48 |
<groupId>org.gvsig</groupId> |
49 | 49 |
<artifactId>org.gvsig.fmap.mapcontext.api</artifactId> |
50 | 50 |
</dependency> |
51 |
<dependency> |
|
52 |
<groupId>org.gvsig</groupId> |
|
53 |
<artifactId>org.gvsig.fmap.control</artifactId> |
|
54 |
</dependency> |
|
51 | 55 |
</dependencies> |
52 | 56 |
<properties> |
53 | 57 |
</properties> |
org.gvsig.googlemaps/trunk/org.gvsig.googlemaps/pom.xml | ||
---|---|---|
60 | 60 |
<dependency> |
61 | 61 |
<groupId>org.gvsig</groupId> |
62 | 62 |
<artifactId>org.gvsig.webmap.lib.api</artifactId> |
63 |
<version>1.0.0</version>
|
|
63 |
<version>1.0.3</version>
|
|
64 | 64 |
</dependency> |
65 | 65 |
<dependency> |
66 | 66 |
<groupId>org.gvsig</groupId> |
org.gvsig.googlemaps/trunk/org.gvsig.googlemaps/org.gvsig.googlemaps.app/org.gvsig.googlemaps.app.mainplugin/src/main/java/org/gvsig/googlemaps/app/mainplugin/GoogleMapsService.java | ||
---|---|---|
22 | 22 |
*/ |
23 | 23 |
package org.gvsig.googlemaps.app.mainplugin; |
24 | 24 |
|
25 |
import org.cresques.cts.IProjection; |
|
25 | 26 |
import org.slf4j.Logger; |
26 | 27 |
import org.slf4j.LoggerFactory; |
27 | 28 |
|
28 | 29 |
import org.gvsig.andami.PluginServices; |
29 | 30 |
import org.gvsig.andami.PluginsLocator; |
30 | 31 |
import org.gvsig.andami.PluginsManager; |
32 |
import org.gvsig.fmap.crs.CRSFactory; |
|
31 | 33 |
import org.gvsig.fmap.dal.DataStoreParameters; |
32 | 34 |
import org.gvsig.fmap.dal.exception.InitializeException; |
33 | 35 |
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException; |
34 | 36 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
37 |
import org.gvsig.fmap.mapcontrol.MapControl; |
|
35 | 38 |
import org.gvsig.googlemaps.swing.api.GoogleMapsConfigDataParameters; |
36 | 39 |
import org.gvsig.googlemaps.swing.api.GoogleMapsParametersPanel; |
37 | 40 |
import org.gvsig.googlemaps.swing.api.GoogleMapsSwingLocator; |
... | ... | |
53 | 56 |
private static final String PANELNAME = "_google_maps"; |
54 | 57 |
private Logger log = LoggerFactory.getLogger(GoogleMapsService.class); |
55 | 58 |
private GoogleMapsParametersPanel parametersPanel; |
59 |
private MapControl mapCtrl; |
|
56 | 60 |
|
57 | 61 |
/** |
58 | 62 |
* Default constructor |
... | ... | |
72 | 76 |
if (parametersPanel==null){ |
73 | 77 |
GoogleMapsConfigDataParameters configParams= getGoogleMapsConfigDataParameters(); |
74 | 78 |
parametersPanel=GoogleMapsSwingLocator.getManager().createGoogleMapsParametersPanel(configParams); |
79 |
IProjection googleMapsProjection = CRSFactory.getCRS("EPSG:3857"); |
|
80 |
if(mapCtrl!=null && !(mapCtrl.getProjection().equals(googleMapsProjection))){ |
|
81 |
parametersPanel.showCrsWarning(true); |
|
82 |
} |
|
75 | 83 |
} |
76 | 84 |
return parametersPanel; |
77 | 85 |
} |
... | ... | |
109 | 117 |
return panelParams; |
110 | 118 |
} |
111 | 119 |
|
120 |
/* (non-Javadoc) |
|
121 |
* @see org.gvsig.webmap.lib.api.WebMapService#setMapCtrl(org.gvsig.fmap.mapcontrol.MapControl) |
|
122 |
*/ |
|
123 |
@Override |
|
124 |
public void setMapCtrl(MapControl mapControl) { |
|
125 |
this.mapCtrl = mapControl; |
|
126 |
IProjection googleMapsProjection = CRSFactory.getCRS("EPSG:3857"); |
|
127 |
if(mapCtrl!=null && !(mapCtrl.getProjection().equals(googleMapsProjection))){ |
|
128 |
((GoogleMapsParametersPanel)getParametersPanel()).showCrsWarning(true); |
|
129 |
} |
|
130 |
} |
|
131 |
|
|
112 | 132 |
} |
org.gvsig.googlemaps/trunk/org.gvsig.googlemaps/org.gvsig.googlemaps.app/org.gvsig.googlemaps.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
15 | 15 |
_zoom_lvl_not_valid=Nivel de zoom no v\u00e1lido |
16 | 16 |
_api_key_needed=La clave del API es necesaria |
17 | 17 |
_google_maps_disclaimer=<html>Esta herramienta hace uso de la API de mapas est\u00e1ticos de Google Maps.<br> Es posible que para realizar un uso correcto de ella deba de solicitar una clave de acceso a Google.<br> Puede encontrar m\u00e1s informaci\u00f3n sobre los t\u00e9rminos de uso en: <br><a href="https://developers.google.com/maps/terms#1-your-relationship-with-google">https://developers.google.com/maps/</a></html> |
18 |
|
|
19 |
_crs_warning=La proyecci\u00f3n de la vista no es la adecuada para cargar capas de este servicio. |
org.gvsig.googlemaps/trunk/org.gvsig.googlemaps/org.gvsig.googlemaps.app/org.gvsig.googlemaps.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
15 | 15 |
_zoom_lvl_not_valid=Not valid zoom level |
16 | 16 |
_api_key_needed=An API key is needed |
17 | 17 |
_google_maps_disclaimer=<html>This tool uses Google Static Maps API.<br> For its proper use, an API key should be requested to Google.<br> More information about its terms of use can be found at: <br><a href="https://developers.google.com/maps/terms#1-your-relationship-with-google">https://developers.google.com/maps/</a></html> |
18 |
|
|
19 |
_crs_warning=The projection of the view is not appropriate to load layers of this service. |
org.gvsig.googlemaps/trunk/org.gvsig.googlemaps/org.gvsig.googlemaps.swing/org.gvsig.googlemaps.swing.impl/src/main/java/org/gvsig/googlemaps/swing/impl/DefaultGoogleMapsParametersPanelController.java | ||
---|---|---|
27 | 27 |
import java.net.URI; |
28 | 28 |
import java.net.URISyntaxException; |
29 | 29 |
import java.net.URL; |
30 |
import java.nio.file.attribute.AclEntry.Builder; |
|
30 | 31 |
|
31 | 32 |
import javax.swing.ComboBoxModel; |
32 | 33 |
import javax.swing.DefaultComboBoxModel; |
... | ... | |
46 | 47 |
import org.gvsig.googlemaps.swing.api.GoogleMapsParametersPanel; |
47 | 48 |
import org.gvsig.tools.ToolsLocator; |
48 | 49 |
import org.gvsig.tools.i18n.I18nManager; |
50 |
|
|
49 | 51 |
import org.slf4j.Logger; |
50 | 52 |
import org.slf4j.LoggerFactory; |
51 | 53 |
|
... | ... | |
65 | 67 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
66 | 68 |
GoogleMapsManager googleMapsManager=GoogleMapsLocator.getManager(); |
67 | 69 |
DefaultGoogleMapsConfigDataParameters params; |
70 |
private boolean showCrsWarning = false; |
|
68 | 71 |
|
69 | 72 |
/** |
70 | 73 |
* creates a DefaultGoogleMapsParametersPanelController |
... | ... | |
89 | 92 |
lblZoomLvl.setToolTipText(i18nManager.getTranslation(lblZoomLvl.getToolTipText())); |
90 | 93 |
//txtDisclaimer.setText(i18nManager.getTranslation(txtDisclaimer.getText())); |
91 | 94 |
txtDisclaimer.setText(i18nManager.getTranslation("_google_maps_disclaimer")); |
95 |
if(showCrsWarning){ |
|
96 |
StringBuilder builder = new StringBuilder(); |
|
97 |
builder.append("<html><font color=\"red\">"); |
|
98 |
builder.append(i18nManager.getTranslation("_crs_warning")); |
|
99 |
builder.append("</font></body></html>"); |
|
100 |
txtCrsWarning.setText(builder.toString()); |
|
101 |
} else { |
|
102 |
txtCrsWarning.setText(""); |
|
103 |
} |
|
92 | 104 |
} |
93 | 105 |
|
94 | 106 |
private void initComponents() { |
... | ... | |
205 | 217 |
return NAME; |
206 | 218 |
} |
207 | 219 |
|
220 |
/* (non-Javadoc) |
|
221 |
* @see org.gvsig.googlemaps.swing.api.GoogleMapsParametersPanel#showCrsWarning(boolean) |
|
222 |
*/ |
|
223 |
@Override |
|
224 |
public void showCrsWarning(boolean showCrsWarning) { |
|
225 |
this.showCrsWarning = showCrsWarning; |
|
226 |
translate(); |
|
227 |
} |
|
228 |
|
|
208 | 229 |
} |
org.gvsig.googlemaps/trunk/org.gvsig.googlemaps/org.gvsig.googlemaps.swing/org.gvsig.googlemaps.swing.impl/src/main/java/org/gvsig/googlemaps/swing/impl/DefaultGoogleMapsParametersPanelView.xml | ||
---|---|---|
24 | 24 |
</at> |
25 | 25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
26 | 26 |
</super> |
27 |
<at name="id">/home/daniel/projects/svn/desig-lote1-gvsig.desig-lote1_gvsig/fuentes/ENT-56308/org.gvsig.googlemaps/org.gvsig.googlemaps.swing/org.gvsig.googlemaps.swing.impl/src/main/java/org/gvsig/googlemaps/swing/impl/DefaultGoogleMapsParametersPanelView.xml</at>
|
|
28 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE</at> |
|
27 |
<at name="id">/home/paco/projects/externals/gvsig-desktop/gvSIG_v2.1/org.gvsig.googlemaps/org.gvsig.googlemaps.swing/org.gvsig.googlemaps.swing.impl/src/main/java/org/gvsig/googlemaps/swing/impl/DefaultGoogleMapsParametersPanelView.xml</at>
|
|
28 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
|
|
29 | 29 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE</at> |
30 | 30 |
<at name="components"> |
31 | 31 |
<object classname="java.util.LinkedList"> |
... | ... | |
192 | 192 |
</object> |
193 | 193 |
</at> |
194 | 194 |
<at name="name">txtAPIKey</at> |
195 |
<at name="width">547</at>
|
|
195 |
<at name="width">914</at>
|
|
196 | 196 |
<at name="toolTipText">_api_key</at> |
197 | 197 |
<at name="height">20</at> |
198 | 198 |
</object> |
... | ... | |
413 | 413 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
414 | 414 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
415 | 415 |
<at name="name">border</at> |
416 |
<at name="title"></at> |
|
417 | 416 |
</super> |
418 | 417 |
<at name="top">0</at> |
419 | 418 |
<at name="left">0</at> |
... | ... | |
426 | 425 |
</at> |
427 | 426 |
</object> |
428 | 427 |
</at> |
429 |
<at name="selectionStart">12</at>
|
|
428 |
<at name="selectionStart">24</at>
|
|
430 | 429 |
<at name="autoscrolls">false</at> |
431 | 430 |
<at name="opaque">false</at> |
432 | 431 |
<at name="editable">false</at> |
433 | 432 |
<at name="name">txtDisclaimer</at> |
434 |
<at name="width">547</at>
|
|
435 |
<at name="selectionEnd">12</at>
|
|
433 |
<at name="width">914</at>
|
|
434 |
<at name="selectionEnd">24</at>
|
|
436 | 435 |
<at name="text"><html> |
437 | 436 |
<head> |
438 |
|
|
437 |
|
|
439 | 438 |
</head> |
440 | 439 |
<body> |
441 | 440 |
_google_maps_disclaimer |
... | ... | |
448 | 447 |
<at name="name">scollBars</at> |
449 | 448 |
<at name="verticalpolicy">21</at> |
450 | 449 |
<at name="horizontalpolicy">31</at> |
451 |
<at name="scrollname"></at> |
|
452 | 450 |
<at name="border"> |
453 | 451 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
454 | 452 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
... | ... | |
479 | 477 |
</object> |
480 | 478 |
</at> |
481 | 479 |
</item> |
480 |
<item > |
|
481 |
<at name="value"> |
|
482 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
483 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
484 |
<at name="cellconstraints"> |
|
485 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
486 |
<at name="column">2</at> |
|
487 |
<at name="row">12</at> |
|
488 |
<at name="colspan">5</at> |
|
489 |
<at name="rowspan">1</at> |
|
490 |
<at name="halign">default</at> |
|
491 |
<at name="valign">default</at> |
|
492 |
<at name="insets" object="insets">0,0,0,0</at> |
|
493 |
</object> |
|
494 |
</at> |
|
495 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
496 |
</super> |
|
497 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
498 |
<at name="beanclass">javax.swing.JEditorPane</at> |
|
499 |
<at name="beanproperties"> |
|
500 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
501 |
<at name="classname">javax.swing.JEditorPane</at> |
|
502 |
<at name="properties"> |
|
503 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
504 |
<at name="border"> |
|
505 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
506 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
507 |
<at name="name">border</at> |
|
508 |
</super> |
|
509 |
<at name="borders"> |
|
510 |
<object classname="java.util.LinkedList"> |
|
511 |
<item > |
|
512 |
<at name="value"> |
|
513 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
514 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
515 |
<at name="name">border</at> |
|
516 |
</super> |
|
517 |
<at name="top">0</at> |
|
518 |
<at name="left">0</at> |
|
519 |
<at name="bottom">0</at> |
|
520 |
<at name="right">0</at> |
|
521 |
</object> |
|
522 |
</at> |
|
523 |
</item> |
|
524 |
</object> |
|
525 |
</at> |
|
526 |
</object> |
|
527 |
</at> |
|
528 |
<at name="selectionStart">13</at> |
|
529 |
<at name="autoscrolls">false</at> |
|
530 |
<at name="opaque">false</at> |
|
531 |
<at name="editable">false</at> |
|
532 |
<at name="selectionEnd">13</at> |
|
533 |
<at name="foreground" object="color">255,0,0</at> |
|
534 |
<at name="name">txtCrsWarning</at> |
|
535 |
<at name="width">914</at> |
|
536 |
<at name="text"><html> |
|
537 |
<head> |
|
538 |
|
|
539 |
</head> |
|
540 |
<body> |
|
541 |
<font color="red">_crs_warning</font> |
|
542 |
</body> |
|
543 |
</html> |
|
544 |
</at> |
|
545 |
<at name="contentType">text/html</at> |
|
546 |
<at name="scollBars"> |
|
547 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
548 |
<at name="name">scollBars</at> |
|
549 |
<at name="verticalpolicy">21</at> |
|
550 |
<at name="horizontalpolicy">31</at> |
|
551 |
<at name="border"> |
|
552 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
553 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
554 |
<at name="name">border</at> |
|
555 |
</super> |
|
556 |
<at name="borders"> |
|
557 |
<object classname="java.util.LinkedList"> |
|
558 |
<item > |
|
559 |
<at name="value"> |
|
560 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
561 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
562 |
<at name="name">border</at> |
|
563 |
</super> |
|
564 |
</object> |
|
565 |
</at> |
|
566 |
</item> |
|
567 |
</object> |
|
568 |
</at> |
|
569 |
</object> |
|
570 |
</at> |
|
571 |
</object> |
|
572 |
</at> |
|
573 |
<at name="height">17</at> |
|
574 |
</object> |
|
575 |
</at> |
|
576 |
</object> |
|
577 |
</at> |
|
578 |
</object> |
|
579 |
</at> |
|
580 |
</item> |
|
482 | 581 |
</object> |
483 | 582 |
</at> |
484 | 583 |
<at name="properties"> |
... | ... | |
496 | 595 |
</at> |
497 | 596 |
</object> |
498 | 597 |
</at> |
499 |
<at name="name"></at>
|
|
598 |
<at name="name"/>
|
|
500 | 599 |
<at name="fill"> |
501 | 600 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
502 | 601 |
<at name="name">fill</at> |
... | ... | |
536 | 635 |
<at name="cellpainters"> |
537 | 636 |
<object classname="com.jeta.forms.store.support.Matrix"> |
538 | 637 |
<at name="rows"> |
539 |
<object classname="[Ljava.lang.Object;" size="11">
|
|
638 |
<object classname="[Ljava.lang.Object;" size="13">
|
|
540 | 639 |
<at name="item" index="0"> |
541 | 640 |
<object classname="[Ljava.lang.Object;" size="7"/> |
542 | 641 |
</at> |
... | ... | |
570 | 669 |
<at name="item" index="10"> |
571 | 670 |
<object classname="[Ljava.lang.Object;" size="7"/> |
572 | 671 |
</at> |
672 |
<at name="item" index="11"> |
|
673 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
674 |
</at> |
|
675 |
<at name="item" index="12"> |
|
676 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
677 |
</at> |
|
573 | 678 |
</object> |
574 | 679 |
</at> |
575 | 680 |
</object> |
org.gvsig.googlemaps/trunk/org.gvsig.googlemaps/org.gvsig.googlemaps.swing/org.gvsig.googlemaps.swing.impl/src/main/java/org/gvsig/googlemaps/swing/impl/DefaultGoogleMapsParametersPanelView.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2016 gvSIG Association |
|
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., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 | 1 |
package org.gvsig.googlemaps.swing.impl; |
24 | 2 |
|
25 | 3 |
import com.jgoodies.forms.layout.CellConstraints; |
26 | 4 |
import com.jgoodies.forms.layout.FormLayout; |
27 | 5 |
import java.awt.BorderLayout; |
6 |
import java.awt.Color; |
|
28 | 7 |
import java.awt.ComponentOrientation; |
29 | 8 |
import java.awt.Container; |
30 | 9 |
import java.awt.Dimension; |
... | ... | |
49 | 28 |
JComboBox cboMapTypes = new JComboBox(); |
50 | 29 |
JTextField txtZoomLvl = new JTextField(); |
51 | 30 |
JEditorPane txtDisclaimer = new JEditorPane(); |
31 |
JEditorPane txtCrsWarning = new JEditorPane(); |
|
52 | 32 |
|
53 | 33 |
/** |
54 | 34 |
* Default constructor |
... | ... | |
140 | 120 |
public JPanel createPanel() |
141 | 121 |
{ |
142 | 122 |
JPanel jpanel1 = new JPanel(); |
143 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
|
123 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
|
|
144 | 124 |
CellConstraints cc = new CellConstraints(); |
145 | 125 |
jpanel1.setLayout(formlayout1); |
146 | 126 |
|
... | ... | |
152 | 132 |
chkboxUseAPIKey.setActionCommand("use_api_key"); |
153 | 133 |
chkboxUseAPIKey.setName("chkboxUseAPIKey"); |
154 | 134 |
chkboxUseAPIKey.setText("_use_api_key"); |
155 |
chkboxUseAPIKey.setToolTipText("_google_static_maps_use_api_key_tooltip");
|
|
135 |
chkboxUseAPIKey.setToolTipText("_use_api_key_tooltip"); |
|
156 | 136 |
jpanel1.add(chkboxUseAPIKey,cc.xy(2,4)); |
157 | 137 |
|
158 | 138 |
txtAPIKey.setName("txtAPIKey"); |
... | ... | |
176 | 156 |
txtDisclaimer.setEditable(false); |
177 | 157 |
txtDisclaimer.setName("txtDisclaimer"); |
178 | 158 |
txtDisclaimer.setOpaque(false); |
179 |
txtDisclaimer.setSelectionEnd(12);
|
|
180 |
txtDisclaimer.setSelectionStart(12);
|
|
159 |
txtDisclaimer.setSelectionEnd(24);
|
|
160 |
txtDisclaimer.setSelectionStart(24);
|
|
181 | 161 |
txtDisclaimer.setText("<html>\n <head>\n \n </head>\n <body>\n _google_maps_disclaimer\n </body>\n</html>\n"); |
182 | 162 |
EmptyBorder emptyborder1 = new EmptyBorder(0,0,0,0); |
183 | 163 |
txtDisclaimer.setBorder(emptyborder1); |
184 | 164 |
jpanel1.add(txtDisclaimer,cc.xywh(2,10,5,1)); |
185 | 165 |
|
186 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11 }); |
|
166 |
txtCrsWarning.setAutoscrolls(false); |
|
167 |
txtCrsWarning.setContentType("text/html"); |
|
168 |
txtCrsWarning.setEditable(false); |
|
169 |
txtCrsWarning.setForeground(new Color(255,0,0)); |
|
170 |
txtCrsWarning.setName("txtCrsWarning"); |
|
171 |
txtCrsWarning.setOpaque(false); |
|
172 |
txtCrsWarning.setSelectionEnd(13); |
|
173 |
txtCrsWarning.setSelectionStart(13); |
|
174 |
txtCrsWarning.setText("<html>\n <head>\n \n </head>\n <body>\n <font color=\"red\">_crs_warning</font>\n </body>\n</html>\n"); |
|
175 |
EmptyBorder emptyborder2 = new EmptyBorder(0,0,0,0); |
|
176 |
txtCrsWarning.setBorder(emptyborder2); |
|
177 |
jpanel1.add(txtCrsWarning,cc.xywh(2,12,5,1)); |
|
178 |
|
|
179 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13 }); |
|
187 | 180 |
return jpanel1; |
188 | 181 |
} |
189 | 182 |
|
org.gvsig.googlemaps/trunk/org.gvsig.googlemaps/org.gvsig.googlemaps.swing/org.gvsig.googlemaps.swing.api/src/main/java/org/gvsig/googlemaps/swing/api/GoogleMapsParametersPanel.java | ||
---|---|---|
46 | 46 |
* @return boolean |
47 | 47 |
*/ |
48 | 48 |
boolean areSettingsValid(); |
49 |
|
|
50 |
/** |
|
51 |
* Shows the crs warning. |
|
52 |
* |
|
53 |
* @param showCrsWarning |
|
54 |
*/ |
|
55 |
void showCrsWarning(boolean showCrsWarning); |
|
49 | 56 |
} |
org.gvsig.bingmaps/trunk/org.gvsig.bingmaps/org.gvsig.bingmaps.swing/org.gvsig.bingmaps.swing.api/src/main/java/org/gvsig/bingmaps/swing/api/BingMapsParametersPanel.java | ||
---|---|---|
46 | 46 |
* @return boolean |
47 | 47 |
*/ |
48 | 48 |
boolean areSettingsValid(); |
49 |
|
|
50 |
/** |
|
51 |
* Shows the crs warning. |
|
52 |
* |
|
53 |
* @param showCrsWarning |
|
54 |
*/ |
|
55 |
void showCrsWarning(boolean showCrsWarning); |
|
49 | 56 |
} |
org.gvsig.bingmaps/trunk/org.gvsig.bingmaps/org.gvsig.bingmaps.swing/org.gvsig.bingmaps.swing.impl/src/main/java/org/gvsig/bingmaps/swing/impl/DefaultBingMapsParametersPanelView.xml | ||
---|---|---|
24 | 24 |
</at> |
25 | 25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
26 | 26 |
</super> |
27 |
<at name="id">/home/daniel/projects/svn/desig-lote1-gvsig.desig-lote1_gvsig/fuentes/ENT-56308/org.gvsig.bingmaps/org.gvsig.bingmaps.swing/org.gvsig.bingmaps.swing.impl/src/main/java/org/gvsig/bingmaps/swing/impl/DefaultBingMapsParametersPanelView.xml</at>
|
|
28 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE</at> |
|
27 |
<at name="id">/home/paco/projects/externals/gvsig-desktop/gvSIG_v2.1/org.gvsig.bingmaps/org.gvsig.bingmaps.swing/org.gvsig.bingmaps.swing.impl/src/main/java/org/gvsig/bingmaps/swing/impl/DefaultBingMapsParametersPanelView.xml</at>
|
|
28 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
|
|
29 | 29 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE</at> |
30 | 30 |
<at name="components"> |
31 | 31 |
<object classname="java.util.LinkedList"> |
... | ... | |
310 | 310 |
</at> |
311 | 311 |
</object> |
312 | 312 |
</at> |
313 |
<at name="selectionStart">12</at>
|
|
313 |
<at name="selectionStart">13</at>
|
|
314 | 314 |
<at name="autoscrolls">false</at> |
315 | 315 |
<at name="opaque">false</at> |
316 | 316 |
<at name="editable">false</at> |
317 | 317 |
<at name="name">txtDisclaimer</at> |
318 | 318 |
<at name="width">914</at> |
319 |
<at name="selectionEnd">12</at>
|
|
319 |
<at name="selectionEnd">13</at>
|
|
320 | 320 |
<at name="text"><html> |
321 | 321 |
<head> |
322 |
|
|
322 |
|
|
323 | 323 |
</head> |
324 | 324 |
<body> |
325 |
_bing_maps_disclaimer
|
|
325 |
<font color="red">_crs_warning</font>
|
|
326 | 326 |
</body> |
327 | 327 |
</html> |
328 | 328 |
</at> |
... | ... | |
362 | 362 |
</object> |
363 | 363 |
</at> |
364 | 364 |
</item> |
365 |
<item > |
|
366 |
<at name="value"> |
|
367 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
368 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
369 |
<at name="cellconstraints"> |
|
370 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
371 |
<at name="column">2</at> |
|
372 |
<at name="row">10</at> |
|
373 |
<at name="colspan">5</at> |
|
374 |
<at name="rowspan">1</at> |
|
375 |
<at name="halign">default</at> |
|
376 |
<at name="valign">default</at> |
|
377 |
<at name="insets" object="insets">0,0,0,0</at> |
|
378 |
</object> |
|
379 |
</at> |
|
380 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
381 |
</super> |
|
382 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
383 |
<at name="beanclass">javax.swing.JEditorPane</at> |
|
384 |
<at name="beanproperties"> |
|
385 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
386 |
<at name="classname">javax.swing.JEditorPane</at> |
|
387 |
<at name="properties"> |
|
388 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
389 |
<at name="border"> |
|
390 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
391 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
392 |
<at name="name">border</at> |
|
393 |
</super> |
|
394 |
<at name="borders"> |
|
395 |
<object classname="java.util.LinkedList"> |
|
396 |
<item > |
|
397 |
<at name="value"> |
|
398 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
399 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
400 |
<at name="name">border</at> |
|
401 |
<at name="title"></at> |
|
402 |
</super> |
|
403 |
<at name="top">0</at> |
|
404 |
<at name="left">0</at> |
|
405 |
<at name="bottom">0</at> |
|
406 |
<at name="right">0</at> |
|
407 |
</object> |
|
408 |
</at> |
|
409 |
</item> |
|
410 |
</object> |
|
411 |
</at> |
|
412 |
</object> |
|
413 |
</at> |
|
414 |
<at name="selectionStart">13</at> |
|
415 |
<at name="autoscrolls">false</at> |
|
416 |
<at name="opaque">false</at> |
|
417 |
<at name="editable">false</at> |
|
418 |
<at name="selectionEnd">13</at> |
|
419 |
<at name="foreground" object="color">255,0,0</at> |
|
420 |
<at name="name">txtCrsWarning</at> |
|
421 |
<at name="width">914</at> |
|
422 |
<at name="text"><html> |
|
423 |
<head> |
|
424 |
|
|
425 |
</head> |
|
426 |
<body> |
|
427 |
<font color="red">_crs_warning</font> |
|
428 |
</body> |
|
429 |
</html> |
|
430 |
</at> |
|
431 |
<at name="contentType">text/html</at> |
|
432 |
<at name="scollBars"> |
|
433 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
434 |
<at name="name">scollBars</at> |
|
435 |
<at name="verticalpolicy">21</at> |
|
436 |
<at name="horizontalpolicy">31</at> |
|
437 |
<at name="scrollname"></at> |
|
438 |
<at name="border"> |
|
439 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
440 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
441 |
<at name="name">border</at> |
|
442 |
</super> |
|
443 |
<at name="borders"> |
|
444 |
<object classname="java.util.LinkedList"> |
|
445 |
<item > |
|
446 |
<at name="value"> |
|
447 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
448 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
449 |
<at name="name">border</at> |
|
450 |
<at name="title"></at> |
|
451 |
</super> |
|
452 |
<at name="top">0</at> |
|
453 |
<at name="left">0</at> |
|
454 |
<at name="bottom">0</at> |
|
455 |
<at name="right">0</at> |
|
456 |
</object> |
|
457 |
</at> |
|
458 |
</item> |
|
459 |
</object> |
|
460 |
</at> |
|
461 |
</object> |
|
462 |
</at> |
|
463 |
</object> |
|
464 |
</at> |
|
465 |
<at name="height">17</at> |
|
466 |
</object> |
|
467 |
</at> |
|
468 |
</object> |
|
469 |
</at> |
|
470 |
</object> |
|
471 |
</at> |
|
472 |
</item> |
|
365 | 473 |
</object> |
366 | 474 |
</at> |
367 | 475 |
<at name="properties"> |
... | ... | |
419 | 527 |
<at name="cellpainters"> |
420 | 528 |
<object classname="com.jeta.forms.store.support.Matrix"> |
421 | 529 |
<at name="rows"> |
422 |
<object classname="[Ljava.lang.Object;" size="9">
|
|
530 |
<object classname="[Ljava.lang.Object;" size="11">
|
|
423 | 531 |
<at name="item" index="0"> |
424 | 532 |
<object classname="[Ljava.lang.Object;" size="7"/> |
425 | 533 |
</at> |
... | ... | |
447 | 555 |
<at name="item" index="8"> |
448 | 556 |
<object classname="[Ljava.lang.Object;" size="7"/> |
449 | 557 |
</at> |
558 |
<at name="item" index="9"> |
|
559 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
560 |
</at> |
|
561 |
<at name="item" index="10"> |
|
562 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
563 |
</at> |
|
450 | 564 |
</object> |
451 | 565 |
</at> |
452 | 566 |
</object> |
org.gvsig.bingmaps/trunk/org.gvsig.bingmaps/org.gvsig.bingmaps.swing/org.gvsig.bingmaps.swing.impl/src/main/java/org/gvsig/bingmaps/swing/impl/DefaultBingMapsParametersPanelView.java | ||
---|---|---|
3 | 3 |
import com.jgoodies.forms.layout.CellConstraints; |
4 | 4 |
import com.jgoodies.forms.layout.FormLayout; |
5 | 5 |
import java.awt.BorderLayout; |
6 |
import java.awt.Color; |
|
6 | 7 |
import java.awt.ComponentOrientation; |
7 | 8 |
import java.awt.Container; |
8 | 9 |
import java.awt.Dimension; |
... | ... | |
25 | 26 |
JTextField txtAPIKey = new JTextField(); |
26 | 27 |
JComboBox cboMapTypes = new JComboBox(); |
27 | 28 |
JEditorPane txtDisclaimer = new JEditorPane(); |
29 |
JEditorPane txtCrsWarning = new JEditorPane(); |
|
28 | 30 |
|
29 | 31 |
/** |
30 | 32 |
* Default constructor |
... | ... | |
116 | 118 |
public JPanel createPanel() |
117 | 119 |
{ |
118 | 120 |
JPanel jpanel1 = new JPanel(); |
119 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
|
121 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
|
|
120 | 122 |
CellConstraints cc = new CellConstraints(); |
121 | 123 |
jpanel1.setLayout(formlayout1); |
122 | 124 |
|
... | ... | |
144 | 146 |
txtDisclaimer.setEditable(false); |
145 | 147 |
txtDisclaimer.setName("txtDisclaimer"); |
146 | 148 |
txtDisclaimer.setOpaque(false); |
147 |
txtDisclaimer.setSelectionEnd(12);
|
|
148 |
txtDisclaimer.setSelectionStart(12);
|
|
149 |
txtDisclaimer.setText("<html>\n <head>\n \n </head>\n <body>\n _bing_maps_disclaimer\n </body>\n</html>\n");
|
|
149 |
txtDisclaimer.setSelectionEnd(13);
|
|
150 |
txtDisclaimer.setSelectionStart(13);
|
|
151 |
txtDisclaimer.setText("<html>\n <head>\n \n </head>\n <body>\n <font color=\"red\">_crs_warning</font>\n </body>\n</html>\n");
|
|
150 | 152 |
EmptyBorder emptyborder1 = new EmptyBorder(0,0,0,0); |
151 | 153 |
txtDisclaimer.setBorder(emptyborder1); |
152 | 154 |
jpanel1.add(txtDisclaimer,cc.xywh(2,8,5,1)); |
153 | 155 |
|
154 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9 }); |
|
156 |
txtCrsWarning.setAutoscrolls(false); |
|
157 |
txtCrsWarning.setContentType("text/html"); |
|
158 |
txtCrsWarning.setEditable(false); |
|
159 |
txtCrsWarning.setForeground(new Color(255,0,0)); |
|
160 |
txtCrsWarning.setName("txtCrsWarning"); |
|
161 |
txtCrsWarning.setOpaque(false); |
|
162 |
txtCrsWarning.setSelectionEnd(13); |
|
163 |
txtCrsWarning.setSelectionStart(13); |
|
164 |
txtCrsWarning.setText("<html>\n <head>\n \n </head>\n <body>\n <font color=\"red\">_crs_warning</font>\n </body>\n</html>\n"); |
|
165 |
EmptyBorder emptyborder2 = new EmptyBorder(0,0,0,0); |
|
166 |
txtCrsWarning.setBorder(emptyborder2); |
|
167 |
jpanel1.add(txtCrsWarning,cc.xywh(2,10,5,1)); |
|
168 |
|
|
169 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11 }); |
|
155 | 170 |
return jpanel1; |
156 | 171 |
} |
157 | 172 |
|
org.gvsig.bingmaps/trunk/org.gvsig.bingmaps/org.gvsig.bingmaps.swing/org.gvsig.bingmaps.swing.impl/src/main/java/org/gvsig/bingmaps/swing/impl/DefaultBingMapsParametersPanelController.java | ||
---|---|---|
30 | 30 |
import javax.swing.JComponent; |
31 | 31 |
|
32 | 32 |
import org.apache.commons.lang3.StringUtils; |
33 |
|
|
33 | 34 |
import org.gvsig.bingmaps.lib.api.BingMapsLocator; |
34 | 35 |
import org.gvsig.bingmaps.lib.api.BingMapsManager; |
35 | 36 |
import org.gvsig.bingmaps.lib.api.MapTypes; |
... | ... | |
45 | 46 |
import org.gvsig.fmap.dal.spi.DataManagerProviderServices; |
46 | 47 |
import org.gvsig.tools.ToolsLocator; |
47 | 48 |
import org.gvsig.tools.i18n.I18nManager; |
49 |
|
|
48 | 50 |
import org.slf4j.Logger; |
49 | 51 |
import org.slf4j.LoggerFactory; |
50 | 52 |
|
... | ... | |
64 | 66 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
65 | 67 |
BingMapsManager bingMapsManager=BingMapsLocator.getManager(); |
66 | 68 |
BingMapsConfigDataParameters configParams; |
69 |
private boolean showCrsWarning = false; |
|
67 | 70 |
|
71 |
|
|
68 | 72 |
/** |
69 | 73 |
* creates a DefaultBingMapsParametersPanelController |
70 | 74 |
* @param configParams DefaultBingMapsParametersPanelController |
... | ... | |
85 | 89 |
cboMapTypes.setToolTipText(i18nManager.getTranslation(cboMapTypes.getToolTipText())); |
86 | 90 |
txtAPIKey.setToolTipText(i18nManager.getTranslation(txtAPIKey.getToolTipText())); |
87 | 91 |
txtDisclaimer.setText(i18nManager.getTranslation("_bing_maps_disclaimer")); |
92 |
if(showCrsWarning){ |
|
93 |
StringBuilder builder = new StringBuilder(); |
|
94 |
builder.append("<html><font color=\"red\">"); |
|
95 |
builder.append(i18nManager.getTranslation("_crs_warning")); |
|
96 |
builder.append("</font></body></html>"); |
|
97 |
txtCrsWarning.setText(builder.toString()); |
|
98 |
} else { |
|
99 |
txtCrsWarning.setText(""); |
|
100 |
} |
|
88 | 101 |
} |
89 | 102 |
|
90 | 103 |
private void initComponents() { |
... | ... | |
168 | 181 |
return NAME; |
169 | 182 |
} |
170 | 183 |
|
184 |
|
|
185 |
/* (non-Javadoc) |
|
186 |
* @see org.gvsig.googlemaps.swing.api.GoogleMapsParametersPanel#showCrsWarning(boolean) |
|
187 |
*/ |
|
188 |
@Override |
|
189 |
public void showCrsWarning(boolean showCrsWarning) { |
|
190 |
this.showCrsWarning = showCrsWarning; |
|
191 |
translate(); |
|
192 |
} |
|
171 | 193 |
} |
org.gvsig.bingmaps/trunk/org.gvsig.bingmaps/pom.xml | ||
---|---|---|
60 | 60 |
<dependency> |
61 | 61 |
<groupId>org.gvsig</groupId> |
62 | 62 |
<artifactId>org.gvsig.webmap.lib.api</artifactId> |
63 |
<version>1.0.0</version>
|
|
63 |
<version>1.0.3</version>
|
|
64 | 64 |
</dependency> |
65 | 65 |
<dependency> |
66 | 66 |
<groupId>org.gvsig</groupId> |
org.gvsig.bingmaps/trunk/org.gvsig.bingmaps/org.gvsig.bingmaps.app/org.gvsig.bingmaps.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
16 | 16 |
_aerial=A\u00e9reo |
17 | 17 |
_aerialwithlabels=A\u00e9reo con etiquetas |
18 | 18 |
_road=Carretera |
19 |
|
|
20 |
_crs_warning=La proyecci\u00f3n de la vista no es la adecuada para cargar capas de este servicio. |
org.gvsig.bingmaps/trunk/org.gvsig.bingmaps/org.gvsig.bingmaps.app/org.gvsig.bingmaps.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
16 | 16 |
_aerial=Aerial |
17 | 17 |
_aerialwithlabels=Aerial with labels |
18 | 18 |
_road=Road |
19 |
|
|
20 |
_crs_warning=The projection of the view is not appropriate to load layers of this service. |
org.gvsig.bingmaps/trunk/org.gvsig.bingmaps/org.gvsig.bingmaps.app/org.gvsig.bingmaps.app.mainplugin/src/main/java/org/gvsig/bingmaps/app/mainplugin/BingMapsService.java | ||
---|---|---|
29 | 29 |
import java.util.Properties; |
30 | 30 |
|
31 | 31 |
import org.apache.commons.io.IOUtils; |
32 |
import org.cresques.cts.IProjection; |
|
33 |
|
|
32 | 34 |
import org.gvsig.andami.PluginServices; |
33 | 35 |
import org.gvsig.andami.PluginsLocator; |
34 | 36 |
import org.gvsig.andami.PluginsManager; |
... | ... | |
36 | 38 |
import org.gvsig.bingmaps.swing.api.BingMapsParametersPanel; |
37 | 39 |
import org.gvsig.bingmaps.swing.api.BingMapsSwingLocator; |
38 | 40 |
import org.gvsig.bingmaps.swing.api.BingMapsSwingManager; |
41 |
import org.gvsig.fmap.crs.CRSFactory; |
|
39 | 42 |
import org.gvsig.fmap.dal.DataStoreParameters; |
40 | 43 |
import org.gvsig.fmap.dal.exception.InitializeException; |
41 | 44 |
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException; |
42 | 45 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
46 |
import org.gvsig.fmap.mapcontrol.MapControl; |
|
43 | 47 |
import org.gvsig.tools.ToolsLocator; |
44 | 48 |
import org.gvsig.tools.dynobject.DynObject; |
45 | 49 |
import org.gvsig.tools.i18n.I18nManager; |
46 | 50 |
import org.gvsig.tools.swing.api.Component; |
47 | 51 |
import org.gvsig.webmap.lib.api.WebMapService; |
48 | 52 |
import org.gvsig.webmap.lib.api.exceptions.WebMapInvalidParamsException; |
53 |
|
|
49 | 54 |
import org.slf4j.Logger; |
50 | 55 |
import org.slf4j.LoggerFactory; |
51 | 56 |
|
... | ... | |
60 | 65 |
private static final String defaultPropertiesFilename = "defaultConfig.properties"; |
61 | 66 |
private Logger log = LoggerFactory.getLogger(BingMapsService.class); |
62 | 67 |
private BingMapsParametersPanel parametersPanel; |
68 |
private MapControl mapCtrl; |
|
63 | 69 |
|
64 | 70 |
/** |
65 | 71 |
* Default Constructor |
... | ... | |
79 | 85 |
if (parametersPanel==null){ |
80 | 86 |
BingMapsConfigDataParameters configParams= getBingMapsConfigDataParameters(); |
81 | 87 |
parametersPanel=BingMapsSwingLocator.getManager().createBingMapsParametersPanel(configParams); |
88 |
IProjection bingMapsProjection = CRSFactory.getCRS("EPSG:3857"); |
|
89 |
if(mapCtrl!=null && !(mapCtrl.getProjection().equals(bingMapsProjection))){ |
|
90 |
parametersPanel.showCrsWarning(true); |
|
91 |
} |
|
92 |
|
|
82 | 93 |
} |
83 | 94 |
return parametersPanel; |
84 | 95 |
} |
... | ... | |
117 | 128 |
return panelParams; |
118 | 129 |
} |
119 | 130 |
|
131 |
/* (non-Javadoc) |
|
132 |
* @see org.gvsig.webmap.lib.api.WebMapService#setMapCtrl(org.gvsig.fmap.mapcontrol.MapControl) |
|
133 |
*/ |
|
134 |
@Override |
|
135 |
public void setMapCtrl(MapControl mapControl) { |
|
136 |
this.mapCtrl = mapControl; |
|
137 |
IProjection googleMapsProjection = CRSFactory.getCRS("EPSG:3857"); |
|
138 |
if(mapCtrl!=null && !(mapCtrl.getProjection().equals(googleMapsProjection))){ |
|
139 |
((BingMapsParametersPanel)getParametersPanel()).showCrsWarning(true); |
|
140 |
} |
|
141 |
} |
|
120 | 142 |
|
121 | 143 |
|
144 |
|
|
122 | 145 |
} |
Also available in: Unified diff