Revision 30580 branches/v2_0_0_prep/libraries/libFMap_controls/src/org/gvsig/fmap/mapcontrol/impl/DefaultMapControlLibrary.java

View differences:

DefaultMapControlLibrary.java
29 29

  
30 30
import org.gvsig.fmap.mapcontrol.MapControlLocator;
31 31
import org.gvsig.fmap.mapcontrol.MapControlManager;
32
import org.gvsig.fmap.mapcontrol.MapControlLibrary;
33
import org.gvsig.tools.locator.BaseLibrary;
34
import org.gvsig.tools.locator.LocatorException;
32
import org.gvsig.tools.library.LibraryException;
33
import org.gvsig.tools.library.impl.BaseLibrary;
35 34
import org.gvsig.tools.locator.ReferenceNotRegisteredException;
36 35

  
37 36
/**
38 37
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
39 38
 */
40 39
public class DefaultMapControlLibrary extends BaseLibrary{
41

  
42
	/* (non-Javadoc)
43
	 * @see org.gvsig.fmap.mapcontrol.MapControlsLibrary#initialize()
44
	 */	
45
	public void initialize() throws ReferenceNotRegisteredException {
46
		super.initialize();
47
		
48
		//TODO Remove the condition where the library system is finished
49
		if (MapControlLocator.getMapControlManager() != null){
50
			MapControlLocator.registerMapControlManager(DefaultMapControlManager.class);
51
		}
40
	
41
	@Override
42
	protected void doInitialize() throws LibraryException {
43
		MapControlLocator.registerMapControlManager(DefaultMapControlManager.class);
52 44
	}
53 45

  
54
	/* (non-Javadoc)
55
	 * @see org.gvsig.fmap.mapcontrol.MapControlsLibrary#postInitialize()
56
	 */
57
	public synchronized void postInitialize() throws LocatorException {
58
		super.postInitialize();
59
		
46
	@Override
47
	protected void doPostInitialize() throws LibraryException {
60 48
		// Validate there is any implementation registered.
61 49
		MapControlManager mapControlManager = MapControlLocator.getMapControlManager();
62 50
		if (mapControlManager == null) {
......
69 57
		//the 2D MapControlDrawer.
70 58
		mapControlManager.registerDefaultMapControlDrawer(MapControlDrawer2D.class);
71 59
	}
72

  
73 60
}
74 61

  

Also available in: Unified diff