Revision 22264 trunk/extensions/ext3Dgui/src/org/gvsig/gvsig3dgui/import3D/MenuImport3D.java

View differences:

MenuImport3D.java
16 16
	
17 17
	
18 18
	private ControlImport3D controlImport;
19
	
19 20

  
20 21
	public void postInitialize() {
22
		
21 23

  
22 24
	}
23 25
	
24 26
	public void execute(String actionCommand) {
25 27
		int tipoObjeto = 0;
26 28
		
27
		if (actionCommand.equals("OBJECT_NO_GIS"))
28
				tipoObjeto = 0;
29
			else if( actionCommand.equals("OBJECT_GIS_VECTORIAL") )
30
				tipoObjeto = 1;
31
		
32
		
33
		System.err.println("TIPO DE OBJETO: " + tipoObjeto);
29
		if (actionCommand.equals("CREARCAPA")) {
30
			//System.out.println("crear capa");
34 31
			
35
			this.controlImport=new ControlImport3D(tipoObjeto);
36
            PluginServices.getMDIManager().addWindow(controlImport);
32
		}else if (actionCommand.equals("SALVARCAPA")) {
33
			//System.out.println("salvar capa");
34
			
35
		}else
36
			{
37
				if (actionCommand.equals("OBJECT_NO_GIS"))
38
				
39
					tipoObjeto = 0;
40
				else if( actionCommand.equals("OBJECT_GIS_VECTORIAL") )
41
					tipoObjeto = 1;
42
			
43
				this.controlImport = new ControlImport3D(tipoObjeto);
44
	            PluginServices.getMDIManager().addWindow(controlImport);
45
            
46
			}
37 47
		
38 48
	}
39 49

  
......
51 61
			return false;
52 62
		}
53 63
		
54
		// Only isVisible = true, where the view have layers.
64
		// Only isVisible = true, where the view has a view3D.
55 65
		if (f instanceof View3D) {
56 66
			return true;
57 67
		}
......
60 70
	}
61 71

  
62 72
	public boolean isVisible() {
63
		// TODO Auto-generated method stub
64
		return true;
73
		com.iver.andami.ui.mdiManager.IWindow f = PluginServices
74
		.getMDIManager().getActiveWindow();
75

  
76
		if (f == null) {
77
			return false;
78
		}
79
		
80
		// Only isVisible = true, where the view has a view3D.
81
		if (f instanceof View3D) {
82
			return true;
83
		}
84
		return false;
65 85
	}
66 86
}
67 87

  
88

  

Also available in: Unified diff