Revision 40927 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/impl/SymbologyDefaultImplLibrary.java
SymbologyDefaultImplLibrary.java | ||
---|---|---|
27 | 27 |
*/ |
28 | 28 |
package org.gvsig.symbology.impl; |
29 | 29 |
|
30 |
import org.gvsig.fmap.mapcontext.MapContextLibrary; |
|
31 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
|
32 |
import org.gvsig.fmap.mapcontext.MapContextManager; |
|
33 |
import org.gvsig.fmap.mapcontext.rendering.legend.ISingleSymbolLegend; |
|
34 |
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorialIntervalLegend; |
|
35 |
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend; |
|
36 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolManager; |
|
30 | 37 |
import org.gvsig.symbology.SymbologyLibrary; |
38 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.driver.impl.PersistenceBasedLegendReader; |
|
39 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.driver.impl.PersistenceBasedLegendWriter; |
|
31 | 40 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractClassifiedVectorLegend; |
32 | 41 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractIntervalLegend; |
33 | 42 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractLegend; |
... | ... | |
83 | 92 |
@Override |
84 | 93 |
public void doRegistration() { |
85 | 94 |
registerAsImplementationOf(SymbologyLibrary.class); |
95 |
require(MapContextLibrary.class); |
|
86 | 96 |
} |
87 | 97 |
|
88 | 98 |
protected void doInitialize() throws LibraryException { |
... | ... | |
192 | 202 |
if( !caller.call() ) { |
193 | 203 |
throw new LibraryException(SymbologyDefaultImplLibrary.class, caller.getExceptions()); |
194 | 204 |
} |
195 |
|
|
205 |
|
|
206 |
// Registering persistence-based legend reader/writer |
|
207 |
// =============================================== |
|
208 |
MapContextManager mcoman = MapContextLocator.getMapContextManager(); |
|
209 |
// ================================= |
|
210 |
mcoman.registerLegendReader( |
|
211 |
// removing dot |
|
212 |
SymbolManager.LEGEND_FILE_EXTENSION.substring(1), |
|
213 |
PersistenceBasedLegendReader.class); |
|
214 |
// ================================= |
|
215 |
mcoman.registerLegendWriter( |
|
216 |
ISingleSymbolLegend.class, |
|
217 |
SymbolManager.LEGEND_FILE_EXTENSION.substring(1), |
|
218 |
PersistenceBasedLegendWriter.class); |
|
219 |
mcoman.registerLegendWriter( |
|
220 |
IVectorialUniqueValueLegend.class, |
|
221 |
SymbolManager.LEGEND_FILE_EXTENSION.substring(1), |
|
222 |
PersistenceBasedLegendWriter.class); |
|
223 |
mcoman.registerLegendWriter( |
|
224 |
IVectorialIntervalLegend.class, |
|
225 |
SymbolManager.LEGEND_FILE_EXTENSION.substring(1), |
|
226 |
PersistenceBasedLegendWriter.class); |
|
227 |
// =========================================================== |
|
196 | 228 |
} |
197 | 229 |
|
198 | 230 |
} |
Also available in: Unified diff