Revision 1848 org.gvsig.legend.aggregate/trunk/org.gvsig.legend.aggregate/org.gvsig.legend.aggregate.lib/org.gvsig.legend.aggregate.lib.impl/src/main/java/org/gvsig/legend/aggregate/lib/impl/AggregateLegendLibraryImpl.java
AggregateLegendLibraryImpl.java | ||
---|---|---|
29 | 29 |
import org.gvsig.fmap.mapcontext.MapContextManager; |
30 | 30 |
import org.gvsig.legend.aggregate.lib.api.AggregateLegendLibrary; |
31 | 31 |
import org.gvsig.legend.aggregate.lib.api.AggregateLegendLocator; |
32 |
import org.gvsig.symbology.impl.SymbologyDefaultImplLibrary; |
|
33 |
import org.gvsig.tools.ToolsLocator; |
|
32 | 34 |
import org.gvsig.tools.library.AbstractLibrary; |
33 | 35 |
import org.gvsig.tools.library.LibraryException; |
36 |
import org.gvsig.tools.persistence.PersistenceManager; |
|
34 | 37 |
|
35 | 38 |
public class AggregateLegendLibraryImpl extends AbstractLibrary { |
36 | 39 |
|
... | ... | |
38 | 41 |
public void doRegistration() { |
39 | 42 |
registerAsImplementationOf(AggregateLegendLibrary.class); |
40 | 43 |
this.require(MapContextLibrary.class); |
44 |
this.require(SymbologyDefaultImplLibrary.class); |
|
41 | 45 |
} |
42 | 46 |
|
43 | 47 |
@Override |
44 | 48 |
protected void doInitialize() throws LibraryException { |
45 | 49 |
AggregateLegendLocator.registerAggregateLegendManager(DefaultAggregateLegendManager.class); |
50 |
|
|
46 | 51 |
MapContextManager mcmanager = MapContextLocator.getMapContextManager(); |
47 | 52 |
mcmanager.registerLegend("AggregateLegend", DefaultAggregateLegend.class); |
48 | 53 |
} |
49 | 54 |
|
50 | 55 |
@Override |
51 | 56 |
protected void doPostInitialize() throws LibraryException { |
57 |
PersistenceManager persistenceManager = ToolsLocator.getPersistenceManager(); |
|
58 |
persistenceManager.registerFactory(new OperationPersistenceFactory()); |
|
59 |
persistenceManager.addDefinition( |
|
60 |
DefaultAggregateLegend.class, |
|
61 |
"DefaultAggregateLegend", |
|
62 |
"/org/gvsig/legend/aggregate/lib/impl/DefaultAggregateLegend.persistence.xml" |
|
63 |
); |
|
52 | 64 |
} |
53 | 65 |
|
54 | 66 |
} |
Also available in: Unified diff