Statistics
| Revision:

gvsig-sldtools / org.gvsig.sld / org.gvsig.sld.app / org.gvsig.sld.app.mainplugin / src / main / java / org / gvsig / sldconverter / SLDConverterExtension.java @ 46

History | View | Annotate | Download (1.91 KB)

1
package org.gvsig.sldconverter;
2

    
3
import org.gvsig.andami.plugins.Extension;
4
import org.gvsig.fmap.mapcontext.MapContextLocator;
5
import org.gvsig.fmap.mapcontext.MapContextManager;
6
import org.gvsig.fmap.mapcontext.rendering.legend.ISingleSymbolLegend;
7
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorialIntervalLegend;
8
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend;
9
import org.gvsig.sldconverter.legend.driver.LegendFromSLDReader;
10
import org.gvsig.sldconverter.legend.driver.LegendToSLDWriter;
11
import org.gvsig.sldsupport.SLDSupportManager;
12

    
13

    
14
public class SLDConverterExtension extends Extension {
15

    
16
    
17
    public void initialize() {
18
    }
19
    
20
    public void postInitialize() {
21
        /*
22
         * Registering Legend readers/writers
23
         */
24
        // ======================================
25
        MapContextManager mcoman = MapContextLocator.getMapContextManager();
26
        // ===================
27
        mcoman.registerLegendReader(
28
            SLDSupportManager.FILE_EXTENSION,
29
            LegendFromSLDReader.class);
30
        // ===================
31
        mcoman.registerLegendWriter(
32
            ISingleSymbolLegend.class,
33
            SLDSupportManager.FILE_EXTENSION,
34
            LegendToSLDWriter.class);
35
        mcoman.registerLegendWriter(
36
            IVectorialUniqueValueLegend.class,
37
            SLDSupportManager.FILE_EXTENSION,
38
            LegendToSLDWriter.class);
39
        mcoman.registerLegendWriter(
40
            IVectorialIntervalLegend.class,
41
            SLDSupportManager.FILE_EXTENSION,
42
            LegendToSLDWriter.class);
43
        // ======================================
44
        
45
    }
46

    
47
    
48
    public void execute(String actionCommand) {
49
        /*
50
         * No commands
51
         */
52
    }
53

    
54
    public boolean isEnabled() {
55
        return true;
56
    }
57

    
58
    public boolean isVisible() {
59
        return false;
60
    }
61

    
62
}