gvsig-3d / 1.10 / trunk / libraries / lib3DMap / src / org / gvsig / gvsig3d / map3d / MapControl3D.java @ 76
History | View | Annotate | Download (1.14 KB)
1 | 5 | jzarzoso | package org.gvsig.gvsig3d.map3d; |
---|---|---|---|
2 | |||
3 | import java.awt.Component; |
||
4 | |||
5 | import org.gvsig.gvsig3d.navigation.NavigationMode; |
||
6 | import org.gvsig.osgvp.terrain.TerrainCameraManipulator; |
||
7 | |||
8 | import com.iver.cit.gvsig.fmap.MapControl; |
||
9 | import com.iver.cit.gvsig.fmap.tools.Behavior.Behavior; |
||
10 | import com.iver.cit.gvsig.project.documents.view.gui.BaseView; |
||
11 | |||
12 | public class MapControl3D extends MapControl { |
||
13 | |||
14 | BaseView _view3D; |
||
15 | |||
16 | |||
17 | public MapControl3D(BaseView view) {
|
||
18 | super();
|
||
19 | _view3D = view; |
||
20 | } |
||
21 | |||
22 | public void setTool(String toolName) { |
||
23 | prevTool = getCurrentTool(); |
||
24 | Behavior mapTool = (Behavior) namesMapTools.get(toolName); |
||
25 | currentMapTool = mapTool; |
||
26 | currentTool = toolName; |
||
27 | |||
28 | // Getting viewer component
|
||
29 | Component viewer = (Component) ((MapContext3D) this.getMapContext()) |
||
30 | .getCanvas3d(); |
||
31 | // Setting cursor
|
||
32 | viewer.setCursor(mapTool.getCursor()); |
||
33 | |||
34 | // Getting the custom terrain manipulator
|
||
35 | TerrainCameraManipulator ctm = (TerrainCameraManipulator) ((MapContext3D)this.getMapContext()).getCanvas3d().getOSGViewer().getCameraManipulator();
|
||
36 | // Disabling All Navigation modes
|
||
37 | NavigationMode.removeAllNavigationModes(ctm); |
||
38 | } |
||
39 | |||
40 | } |