Revision 30580 branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/MapContextLibrary.java
MapContextLibrary.java | ||
---|---|---|
28 | 28 |
|
29 | 29 |
import org.gvsig.fmap.dal.DataTypes; |
30 | 30 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
31 |
import org.gvsig.fmap.geom.GeometryLibrary; |
|
32 | 31 |
import org.gvsig.fmap.mapcontext.impl.DefaultMapContextDrawer; |
33 | 32 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
34 | 33 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
... | ... | |
40 | 39 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVectLinkProperties; |
41 | 40 |
import org.gvsig.fmap.mapcontext.layers.vectorial.ReprojectDefaultGeometry; |
42 | 41 |
import org.gvsig.fmap.mapcontext.rendering.legend.DummyVectorLegend; |
43 |
import org.gvsig.tools.ToolsLibrary; |
|
44 | 42 |
import org.gvsig.tools.ToolsLocator; |
45 | 43 |
import org.gvsig.tools.dynobject.DynClass; |
46 | 44 |
import org.gvsig.tools.dynobject.DynField; |
47 | 45 |
import org.gvsig.tools.dynobject.DynObjectManager; |
48 |
import org.gvsig.tools.locator.BaseLibrary; |
|
49 |
import org.gvsig.tools.locator.LibraryException; |
|
50 |
import org.gvsig.tools.locator.LocatorException; |
|
46 |
import org.gvsig.tools.library.LibraryException; |
|
47 |
import org.gvsig.tools.library.impl.BaseLibrary; |
|
51 | 48 |
import org.gvsig.tools.locator.ReferenceNotRegisteredException; |
52 | 49 |
|
53 | 50 |
/** |
... | ... | |
56 | 53 |
*/ |
57 | 54 |
public class MapContextLibrary extends BaseLibrary { |
58 | 55 |
|
59 |
private ToolsLibrary toolsLib; |
|
60 |
private GeometryLibrary geomLibrary; |
|
61 |
|
|
62 |
public void initialize() throws LocatorException { |
|
63 |
super.initialize(); |
|
64 |
toolsLib = new ToolsLibrary(); |
|
65 |
|
|
66 |
toolsLib.initialize(); |
|
67 |
|
|
68 |
geomLibrary = new GeometryLibrary(); |
|
69 |
|
|
70 |
geomLibrary.initialize(); |
|
71 |
|
|
56 |
protected void doInitialize() throws LibraryException { |
|
72 | 57 |
LayerFactory.getInstance().registerLayerToUseForStore( |
73 | 58 |
FeatureStore.class, FLyrVect.class); |
74 |
|
|
75 | 59 |
} |
76 | 60 |
|
77 |
public void postInitialize() throws LocatorException { |
|
78 |
super.postInitialize(); |
|
79 |
|
|
80 |
toolsLib.postInitialize(); |
|
81 |
geomLibrary.postInitialize(); |
|
82 |
|
|
61 |
protected void doPostInitialize() throws LibraryException { |
|
83 | 62 |
DynObjectManager dynManager = ToolsLocator.getDynObjectManager(); |
84 | 63 |
|
85 | 64 |
DynField field; |
... | ... | |
105 | 84 |
try { |
106 | 85 |
manager.setDefaultMapContextDrawer(DefaultMapContextDrawer.class); |
107 | 86 |
} catch (MapContextException ex) { |
108 |
throw new LibraryException(ex); |
|
87 |
throw new LibraryException(getClass().getName(), ex);
|
|
109 | 88 |
} |
110 | 89 |
|
111 | 90 |
// persistent classes |
Also available in: Unified diff