Statistics
| Revision:

gvsig-3d / 2.0 / trunk / org.gvsig.gvsig3d.app / org.gvsig.gvsig3d.app.extension / src / main / java / org / gvsig / gvsig3d / app / extension / Gvsig3DExtension.java @ 306

History | View | Annotate | Download (2.97 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.gvsig3d.app.extension;
23

    
24
import org.gvsig.andami.plugins.Extension;
25
import org.gvsig.gvsig3d.Gvsig3DManager;
26
import org.gvsig.gvsig3d.app.camera.ProjectCamera;
27
import org.gvsig.gvsig3d.app.tocmenu.TocRefreshLayer;
28
import org.gvsig.gvsig3d.app.tocmenu.TocTransparencyPanel;
29
import org.gvsig.symbology.impl.SymbologyDefaultImplLibrary;
30
import org.gvsig.tools.ToolsLocator;
31
import org.gvsig.tools.extensionpoint.ExtensionPoint;
32
import org.gvsig.tools.library.LibraryException;
33
import org.gvsig.tools.util.Caller;
34
import org.gvsig.tools.util.impl.DefaultCaller;
35
import org.slf4j.Logger;
36
import org.slf4j.LoggerFactory;
37

    
38
/**
39
 * Andami extension to show Gvsig3D in the application.
40
 * 
41
 * @author AI2
42
 * @version $Id$
43
 */
44
public class Gvsig3DExtension extends Extension {
45

    
46
        // private Gvsig3DManager manager;
47
        // private Gvsig3DSwingManager swingManager;
48

    
49
        private static final Logger LOG = LoggerFactory
50
                        .getLogger(Gvsig3DExtension.class);
51

    
52
        public void initialize() {
53

    
54
                View3DManager.register();
55
                ExtensionPoint exPoint = ToolsLocator.getExtensionPointManager().get(
56
                                "View_TocActions");
57
                exPoint.append("Layer_Refresh", "", new TocRefreshLayer());
58
                exPoint.append("Layer_Transparency", " ", new TocTransparencyPanel());
59
                
60
                //Register other classes persistence with the Caller
61
                Caller caller = new DefaultCaller();
62
                
63
                caller.add(new DefaultView3DDocument.RegisterPersistence());
64
                caller.add(new ProjectCamera.RegisterPersistence());
65
                
66
                /*
67
                 * Do register of all
68
                 */
69
                if (!caller.call()) {
70
                        throw new LibraryException(Gvsig3DExtension.class,
71
                                        caller.getExceptions());
72
                }
73

    
74
        }
75

    
76
        @Override
77
        public void postInitialize() {
78
                // super.postInitialize();
79
                // manager = Gvsig3DLocator.getManager();
80
                // // Asignamos el locator e iniciamos la instancia
81
                // swingManager = Gvsig3DSwingLocator.getSwingManager();
82
                // swingManager.registerWindowManager(new GvSIGGvsig3DWindowManager());
83
                
84

    
85
        }
86

    
87
        public void execute(String actionCommand) {
88

    
89
        }
90

    
91
        public void showGvsig3D(Gvsig3DManager manager) {
92

    
93
        }
94

    
95
        public boolean isEnabled() {
96
                return true;
97
        }
98

    
99
        public boolean isVisible() {
100
                return true;
101
        }
102

    
103
}