Revision 16326 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/geolocation/ui/GeoLocationDialog.java
GeoLocationDialog.java | ||
---|---|---|
33 | 33 |
import com.iver.andami.ui.mdiManager.IWindowListener; |
34 | 34 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
35 | 35 |
import com.iver.cit.gvsig.fmap.MapControl; |
36 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
36 | 37 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
37 | 38 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
38 | 39 |
import com.iver.cit.gvsig.project.documents.view.gui.IView; |
... | ... | |
55 | 56 |
private int posWindowY = 0; |
56 | 57 |
|
57 | 58 |
private int widthWindow = 260; |
58 |
private int heightWindow = 145;
|
|
59 |
private int heightWindow = 155;
|
|
59 | 60 |
|
60 | 61 |
private String lastTool = null; |
61 | 62 |
|
62 |
//private FLyrRasterSE lyr = null; |
|
63 |
|
|
64 |
|
|
65 | 63 |
/** |
66 | 64 |
* Constructor |
67 | 65 |
*/ |
... | ... | |
76 | 74 |
* Constructor. Asigna la capa raster. |
77 | 75 |
* |
78 | 76 |
*/ |
79 |
public GeoLocationDialog(FLyrRasterSE lyr) { |
|
77 |
public GeoLocationDialog(FLyrRasterSE lyr, ViewPort vp) {
|
|
80 | 78 |
BorderLayout bl = new BorderLayout(5, 5); |
81 | 79 |
this.setLayout(bl); |
82 | 80 |
|
83 | 81 |
this.add(getGeoLocationPanel()); |
84 |
getGeoLocationPanel().setLayer(lyr);
|
|
82 |
getGeoLocationPanel().setParams(lyr, vp);
|
|
85 | 83 |
} |
86 | 84 |
|
87 | 85 |
/** |
... | ... | |
102 | 100 |
* Referencia la capa que est? seleccionada |
103 | 101 |
* |
104 | 102 |
*/ |
105 |
private void loadLayer() { |
|
103 |
private void loadLayer(ViewPort vp) {
|
|
106 | 104 |
if(getGeoLocationPanel().getLayer() != null) |
107 | 105 |
return; |
108 | 106 |
//Este c?digo es para poder lanzar la funcionalidad desde la barra de herramientas y no desde el TOC |
... | ... | |
110 | 108 |
FLayer[] actives = flyrs.getActives(); |
111 | 109 |
for (int i = 0; i < actives.length; i++) { |
112 | 110 |
if(actives[i] instanceof FLyrRasterSE) { |
113 |
getGeoLocationPanel().setLayer(((FLyrRasterSE)actives[i]));
|
|
111 |
getGeoLocationPanel().setParams(((FLyrRasterSE)actives[i]), vp);
|
|
114 | 112 |
break; |
115 | 113 |
} |
116 | 114 |
} |
... | ... | |
123 | 121 |
public void init(MapControl mapCtrl) { |
124 | 122 |
geolocationPanel.setMapCtrl(mapCtrl); |
125 | 123 |
lastTool = mapCtrl.getCurrentTool(); |
126 |
loadLayer(); |
|
124 |
loadLayer(mapCtrl.getViewPort());
|
|
127 | 125 |
FLyrRasterSE lyr = getGeoLocationPanel().getLayer(); |
128 | 126 |
if(lyr != null) { |
129 | 127 |
lyr.getAffineTransformHistorical().clear(); |
Also available in: Unified diff