Statistics
| Revision:

gvsig-raster / org.gvsig.raster / branches / org.gvsig.raster.2.4 / org.gvsig.wms / org.gvsig.wms.app / org.gvsig.wms.app.mainplugin / src / main / java / org / gvsig / wms / app / mainplugin / WMSExtension.java @ 8690

History | View | Annotate | Download (2.56 KB)

1
/* gvSIG. Desktop Geographic Information System.
2
 *
3
 * Copyright ? 2007-2016 gvSIG Association
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
 * MA  02110-1301, USA.
19
 *
20
 * For any additional information, do not hesitate to contact us
21
 * at info AT gvsig.com, or visit our website www.gvsig.com.
22
 */
23

    
24
package org.gvsig.wms.app.mainplugin;
25

    
26
import org.slf4j.Logger;
27
import org.slf4j.LoggerFactory;
28

    
29
import org.gvsig.andami.IconThemeHelper;
30
import org.gvsig.andami.plugins.Extension;
31
import org.gvsig.app.extension.AddLayer;
32
import org.gvsig.fmap.mapcontext.MapContextLocator;
33
import org.gvsig.wms.provider.WMSRasterProvider;
34

    
35
/**
36
 * @author fdiaz
37
 *
38
 */
39
public class WMSExtension extends Extension {
40
    private Logger log = LoggerFactory.getLogger(WMSExtension.class);
41

    
42

    
43
    @Override
44
    public void initialize() {
45
        // TODO Auto-generated method stub
46

    
47
    }
48

    
49
    public void postInitialize() {
50
        initializeIcons();
51
        AddLayer.addWizard(WMSAddLayerPanel.class);
52
    }
53

    
54

    
55
    @Override
56
    public void execute(String actionCommand) {
57
        // TODO Auto-generated method stub
58

    
59
    }
60

    
61
    @Override
62
    public boolean isEnabled() {
63
        return true;
64
    }
65

    
66
    @Override
67
    public boolean isVisible() {
68
        return true;
69
    }
70

    
71
    void initializeIcons(){
72

    
73
        MapContextLocator.getMapContextManager().registerIconLayer(WMSRasterProvider.NAME, "layer-icon-wms");
74

    
75
        IconThemeHelper.registerIcon("wms", "add-layer-icon", this);
76
        IconThemeHelper.registerIcon("wms", "remove-layer-icon", this);
77
        IconThemeHelper.registerIcon("wms", "up-layer-icon", this);
78
        IconThemeHelper.registerIcon("wms", "down-layer-icon", this);
79

    
80
        IconThemeHelper.registerIcon("wms", "first-value-icon", this);
81
        IconThemeHelper.registerIcon("wms", "previous-value-icon", this);
82
        IconThemeHelper.registerIcon("wms", "next-value-icon", this);
83
        IconThemeHelper.registerIcon("wms", "last-value-icon", this);
84

    
85
    }
86

    
87

    
88
}