gvsig-3d / 2.0 / trunk / org.gvsig.gvsig3d.app / org.gvsig.gvsig3d.app.extension / src / main / java / org / gvsig / gvsig3d / app / extension / Gvsig3DExtension.java @ 307
History | View | Annotate | Download (2.9 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.tools.ToolsLocator; |
30 |
import org.gvsig.tools.extensionpoint.ExtensionPoint; |
31 |
import org.gvsig.tools.library.LibraryException; |
32 |
import org.gvsig.tools.util.Caller; |
33 |
import org.gvsig.tools.util.impl.DefaultCaller; |
34 |
import org.slf4j.Logger; |
35 |
import org.slf4j.LoggerFactory; |
36 |
|
37 |
/**
|
38 |
* Andami extension to show Gvsig3D in the application.
|
39 |
*
|
40 |
* @author AI2
|
41 |
* @version $Id$
|
42 |
*/
|
43 |
public class Gvsig3DExtension extends Extension { |
44 |
|
45 |
// private Gvsig3DManager manager;
|
46 |
// private Gvsig3DSwingManager swingManager;
|
47 |
|
48 |
private static final Logger LOG = LoggerFactory |
49 |
.getLogger(Gvsig3DExtension.class); |
50 |
|
51 |
public void initialize() { |
52 |
|
53 |
View3DManager.register(); |
54 |
ExtensionPoint exPoint = ToolsLocator.getExtensionPointManager().get( |
55 |
"View_TocActions");
|
56 |
exPoint.append("Layer_Refresh", "", new TocRefreshLayer()); |
57 |
exPoint.append("Layer_Transparency", " ", new TocTransparencyPanel()); |
58 |
|
59 |
// Register other classes persistence with the Caller
|
60 |
Caller caller = new DefaultCaller();
|
61 |
|
62 |
caller.add(new DefaultView3DDocument.RegisterPersistence());
|
63 |
caller.add(new ProjectCamera.RegisterPersistence());
|
64 |
|
65 |
/*
|
66 |
* Do register of all
|
67 |
*/
|
68 |
if (!caller.call()) {
|
69 |
throw new LibraryException(Gvsig3DExtension.class, |
70 |
caller.getExceptions()); |
71 |
} |
72 |
|
73 |
} |
74 |
|
75 |
@Override
|
76 |
public void postInitialize() { |
77 |
// super.postInitialize();
|
78 |
// manager = Gvsig3DLocator.getManager();
|
79 |
// // Asignamos el locator e iniciamos la instancia
|
80 |
// swingManager = Gvsig3DSwingLocator.getSwingManager();
|
81 |
// swingManager.registerWindowManager(new GvSIGGvsig3DWindowManager());
|
82 |
|
83 |
} |
84 |
|
85 |
public void execute(String actionCommand) { |
86 |
|
87 |
} |
88 |
|
89 |
public void showGvsig3D(Gvsig3DManager manager) { |
90 |
|
91 |
} |
92 |
|
93 |
public boolean isEnabled() { |
94 |
return true; |
95 |
} |
96 |
|
97 |
public boolean isVisible() { |
98 |
return true; |
99 |
} |
100 |
|
101 |
} |