Revision 43271
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/FLayers.java | ||
---|---|---|
223 | 223 |
*/ |
224 | 224 |
public void addLayer(int pos, FLayer layer) { |
225 | 225 |
try { |
226 |
//Notificamos a la capa que va a ser a?adida |
|
227 |
if (layer instanceof FLyrDefault) { |
|
228 |
((FLyrDefault) layer).wakeUp(); |
|
229 |
} |
|
230 |
|
|
231 | 226 |
if (layer instanceof FLayers) { |
232 | 227 |
FLayers layers = (FLayers) layer; |
233 | 228 |
if( fmap != null ) { |
... | ... | |
241 | 236 |
callLayerAdded(LayerCollectionEvent.createLayerAddedEvent(layer)); |
242 | 237 |
} catch (CancelationException e) { |
243 | 238 |
logger.warn(e.getMessage()); |
244 |
} catch (LoadLayerException e) { |
|
245 |
layer.setAvailable(false); |
|
246 |
layer.addError(e); |
|
247 | 239 |
} |
248 | 240 |
} |
249 | 241 |
|
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/layers/FLyrDefault.java | ||
---|---|---|
579 | 579 |
* <p>Method called by {@link FLayers FLayers} to notify this layer that is going to be added. |
580 | 580 |
* This previous notification is useful for the layers that need do something before being added. For |
581 | 581 |
* example, the raster needs reopen a file that could have been closed recently.</p> |
582 |
* @deprecated no deberia ser necesario llamar a esto, la capa debe comportarse correctamente sin necesidad de llamarlo. |
|
582 | 583 |
*/ |
583 | 584 |
public void wakeUp() throws LoadLayerException { |
584 | 585 |
} |
Also available in: Unified diff