Revision 3379 org.gvsig.raster.roimask/trunk/org.gvsig.raster.roimask/org.gvsig.raster.roimask.app/org.gvsig.raster.roimask.app.client/src/main/java/org/gvsig/raster/roimask/app/ROIMaskExtension.java
ROIMaskExtension.java | ||
---|---|---|
120 | 120 |
|
121 | 121 |
/** |
122 | 122 |
* Creates and initializes the main panel |
123 |
*
|
|
123 |
* |
|
124 | 124 |
* @throws ReadException |
125 | 125 |
* @throws ROIException |
126 | 126 |
*/ |
... | ... | |
145 | 145 |
|
146 | 146 |
/** |
147 | 147 |
* Loads the main panel with the data |
148 |
*
|
|
148 |
* |
|
149 | 149 |
* @throws NotInitializeException |
150 | 150 |
* @throws ROIException |
151 | 151 |
*/ |
... | ... | |
212 | 212 |
|
213 | 213 |
/** |
214 | 214 |
* Gets the list of layers from the gvSIG view |
215 |
*
|
|
215 |
* |
|
216 | 216 |
* @return |
217 | 217 |
*/ |
218 | 218 |
private FLayers getLayers() { |
... | ... | |
230 | 230 |
|
231 | 231 |
/** |
232 | 232 |
* Gets the selected layer |
233 |
*
|
|
233 |
* |
|
234 | 234 |
* @return |
235 | 235 |
*/ |
236 |
private FLyrRaster getSelectedLayer() { |
|
237 |
FLayers lyrs = getLayers(); |
|
238 |
for (int i = 0; i < lyrs.getLayersCount(); i++) { |
|
239 |
FLayer lyr = lyrs.getLayer(i); |
|
240 |
if (lyr.isActive() && lyr instanceof FLyrRaster) return (FLyrRaster) lyr; |
|
236 |
private FLyrRaster getSelectedLayer() { |
|
237 |
FLayers lyrs = getLayers(); |
|
238 |
if (lyrs != null) { |
|
239 |
for (int i = 0; i < lyrs.getLayersCount(); i++) { |
|
240 |
FLayer lyr = lyrs.getLayer(i); |
|
241 |
if (lyr.isActive() && lyr instanceof FLyrRaster) |
|
242 |
return (FLyrRaster) lyr; |
|
243 |
} |
|
244 |
} |
|
245 |
return null; |
|
241 | 246 |
} |
242 |
return null; |
|
243 |
} |
|
244 | 247 |
|
245 | 248 |
public boolean isEnabled() { |
246 | 249 |
FLyrRaster selectedLayer = getSelectedLayer(); |
... | ... | |
272 | 275 |
|
273 | 276 |
/** |
274 | 277 |
* Gets the {@link ROIMaskPanel} |
275 |
*
|
|
278 |
* |
|
276 | 279 |
* @return {@link ROIMaskPanel} |
277 | 280 |
*/ |
278 | 281 |
private CreateNewLayerPanel getNewLayerPanel() { |
... | ... | |
284 | 287 |
|
285 | 288 |
/** |
286 | 289 |
* Gets the {@link PreviewPanel} |
287 |
*
|
|
290 |
* |
|
288 | 291 |
* @return {@link PreviewPanel} |
289 | 292 |
*/ |
290 | 293 |
private PreviewPanel getPreviewPanel() { |
... | ... | |
296 | 299 |
|
297 | 300 |
/** |
298 | 301 |
* Gets the {@link ROIMaskPreview} |
299 |
*
|
|
302 |
* |
|
300 | 303 |
* @return {@link ROIMaskPreview} |
301 | 304 |
*/ |
302 | 305 |
private ROIMaskPreview getDataSourcePreview() { |
... | ... | |
309 | 312 |
|
310 | 313 |
/** |
311 | 314 |
* Gets the {@link ROIMaskPanel} |
312 |
*
|
|
315 |
* |
|
313 | 316 |
* @return {@link ROIMaskPanel} |
314 | 317 |
*/ |
315 | 318 |
private ROIMaskPanel getROIMaskPanel() { |
Also available in: Unified diff