Revision 3450 org.gvsig.legend.vectorfilterexpression.app.mainplugin/trunk/org.gvsig.legend.vectorfilterexpression.app.mainplugin/src/main/java/org/gvsig/symbology/fmap/rendering/VectorFilterExpressionLegend.java
VectorFilterExpressionLegend.java | ||
---|---|---|
40 | 40 |
import org.gvsig.fmap.mapcontext.MapContextManager; |
41 | 41 |
import org.gvsig.fmap.mapcontext.rendering.legend.events.SymbolLegendEvent; |
42 | 42 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
43 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolManager; |
|
43 | 44 |
import org.gvsig.i18n.Messages; |
45 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.driver.impl.PersistenceBasedLegendWriter; |
|
44 | 46 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractClassifiedVectorLegend; |
45 | 47 |
import org.gvsig.tools.ToolsLocator; |
46 | 48 |
import org.gvsig.tools.dynobject.DynStruct; |
... | ... | |
50 | 52 |
import org.gvsig.tools.persistence.PersistentState; |
51 | 53 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
52 | 54 |
import org.gvsig.tools.util.Callable; |
55 |
import org.gvsig.tools.util.Caller; |
|
56 |
import org.gvsig.tools.util.impl.DefaultCaller; |
|
53 | 57 |
|
54 | 58 |
|
55 | 59 |
/** |
... | ... | |
525 | 529 |
} |
526 | 530 |
|
527 | 531 |
|
532 |
public static void selfRegister() { |
|
533 |
Caller caller = new DefaultCaller(); |
|
528 | 534 |
|
535 |
caller.add(new VectorFilterExpressionLegend.RegisterLegend()); |
|
536 |
caller.add(new VectorFilterExpressionLegend.RegisterPersistence()); |
|
537 |
|
|
538 |
if (!caller.call()) { |
|
539 |
throw new RuntimeException( |
|
540 |
"Can't register VectorFilterExpressionLegend", |
|
541 |
caller.getException() |
|
542 |
); |
|
543 |
} |
|
544 |
MapContextManager mcoman = MapContextLocator.getMapContextManager(); |
|
545 |
mcoman.registerLegendWriter( |
|
546 |
VectorFilterExpressionLegend.class, |
|
547 |
SymbolManager.LEGEND_FILE_EXTENSION.substring(1), |
|
548 |
PersistenceBasedLegendWriter.class); |
|
549 |
|
|
550 |
|
|
551 |
} |
|
552 |
|
|
529 | 553 |
} |
Also available in: Unified diff