root / tags / v1_0_2_Build_909 / libraries / libFMap / src / com / iver / cit / gvsig / fmap / layers / DefaultDelayedDriverListener.java @ 11150
History | View | Annotate | Download (901 Bytes)
1 | 10401 | fjp | package com.iver.cit.gvsig.fmap.layers; |
---|---|---|---|
2 | |||
3 | import java.awt.Image; |
||
4 | |||
5 | import javax.swing.ImageIcon; |
||
6 | |||
7 | import com.hardcode.driverManager.DriverEvent; |
||
8 | import com.hardcode.driverManager.DriverEventListener; |
||
9 | import com.iver.cit.gvsig.fmap.MapControl; |
||
10 | |||
11 | public class DefaultDelayedDriverListener implements DriverEventListener { |
||
12 | private final Image driverLoading = new ImageIcon(MapControl.class.getResource( |
||
13 | "images/waiting_ovr.gif")).getImage();
|
||
14 | private FLyrVect _lyr;
|
||
15 | |||
16 | public DefaultDelayedDriverListener(FLyrVect lyr) {
|
||
17 | _lyr = lyr; |
||
18 | // _lyr.setCachingDrawnLayers(true);
|
||
19 | _lyr.getFLayerStatus().setDriverLoaded(false);
|
||
20 | _lyr.setTocStatusImage(driverLoading); |
||
21 | |||
22 | } |
||
23 | |||
24 | public void driverNotification(DriverEvent event) { |
||
25 | _lyr.getFLayerStatus().setDriverLoaded(true);
|
||
26 | _lyr.setTocStatusImage(null);
|
||
27 | // _lyr.setCachingDrawnLayers(false);
|
||
28 | _lyr.setDirty(true);
|
||
29 | _lyr.getMapContext().redraw(); |
||
30 | |||
31 | } |
||
32 | |||
33 | } |