Revision 14135 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/geolocation/ui/GeoLocationDialog.java
GeoLocationDialog.java | ||
---|---|---|
54 | 54 |
private int posWindowX = 0; |
55 | 55 |
private int posWindowY = 0; |
56 | 56 |
|
57 |
private int widthWindow = 245;
|
|
58 |
private int heightWindow = 135;
|
|
57 |
private int widthWindow = 260;
|
|
58 |
private int heightWindow = 140;
|
|
59 | 59 |
|
60 | 60 |
private String lastTool = null; |
61 | 61 |
|
... | ... | |
63 | 63 |
|
64 | 64 |
|
65 | 65 |
/** |
66 |
* Crea la ventana del histograma con un ancho y alto. |
|
67 |
* @param width Ancho de la ventana |
|
68 |
* @param height Alto de la ventana |
|
69 |
*/ |
|
66 |
* Constructor |
|
67 |
*/ |
|
70 | 68 |
public GeoLocationDialog() { |
71 | 69 |
BorderLayout bl = new BorderLayout(5, 5); |
72 | 70 |
this.setLayout(bl); |
... | ... | |
75 | 73 |
} |
76 | 74 |
|
77 | 75 |
/** |
76 |
* Constructor. Asigna la capa raster. |
|
77 |
* |
|
78 |
*/ |
|
79 |
public GeoLocationDialog(FLyrRasterSE lyr) { |
|
80 |
BorderLayout bl = new BorderLayout(5, 5); |
|
81 |
this.setLayout(bl); |
|
82 |
|
|
83 |
this.add(getGeoLocationPanel()); |
|
84 |
getGeoLocationPanel().setLayer(lyr); |
|
85 |
} |
|
86 |
|
|
87 |
/** |
|
78 | 88 |
* Calculo de la posici?n de la ventana |
79 | 89 |
*/ |
80 | 90 |
public void calcPosition() { |
... | ... | |
93 | 103 |
* |
94 | 104 |
*/ |
95 | 105 |
private void loadLayer() { |
106 |
if(getGeoLocationPanel().getLayer() != null) |
|
107 |
return; |
|
108 |
//Este c?digo es para poder lanzar la funcionalidad desde la barra de herramientas y no desde el TOC |
|
96 | 109 |
FLayers flyrs = getGeoLocationPanel().getMapCtrl().getMapContext().getLayers(); |
97 | 110 |
FLayer[] actives = flyrs.getActives(); |
98 | 111 |
for (int i = 0; i < actives.length; i++) { |
... | ... | |
162 | 175 |
* @see com.iver.andami.ui.mdiManager.IWindow#getWindowInfo() |
163 | 176 |
*/ |
164 | 177 |
public WindowInfo getWindowInfo() { |
165 |
WindowInfo m_viewinfo=new WindowInfo(WindowInfo.RESIZABLE); |
|
178 |
WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODELESSDIALOG | WindowInfo.RESIZABLE);
|
|
166 | 179 |
m_viewinfo.setHeight(heightWindow); |
167 | 180 |
m_viewinfo.setWidth(widthWindow); |
168 | 181 |
m_viewinfo.setX(posWindowX); |
... | ... | |
206 | 219 |
//Restauramos la tool que hab?a antes de de activar la actual |
207 | 220 |
if(lastTool != null) |
208 | 221 |
getGeoLocationPanel().getMapCtrl().setTool(lastTool); |
222 |
|
|
223 |
//TODO: Si queremos usar la funcionalidad de geolocalizaci?n desde la barra de herramientas deberemos |
|
224 |
//, al cerrar la ventana, asignar la capa raster de GeoRasterBehevior a null ya que sino se aplicar?n las |
|
225 |
//transformaciones sobre la ?ltima capa que se abri? desde el men? del TOC |
|
209 | 226 |
} |
210 | 227 |
} |
Also available in: Unified diff