Revision 21150

View differences:

trunk/extensions/extRemoteSensing/src/org/gvsig/remotesensing/ProfileImageExtension.java
4 4

  
5 5
import org.gvsig.fmap.raster.layers.FLyrRasterSE;
6 6
import org.gvsig.fmap.raster.layers.ILayerState;
7
import org.gvsig.raster.grid.GridException;
7 8
import org.gvsig.raster.gui.IGenericToolBarMenuItem;
8 9
import org.gvsig.remotesensing.profiles.gui.ProfileDialog;
10
import org.gvsig.remotesensing.scatterplot.gui.ScatterPlotDialog;
9 11

  
10 12
import com.iver.andami.PluginServices;
11 13
import com.iver.cit.gvsig.fmap.MapContext;
......
33 35
	 * @see com.iver.andami.plugins.IExtension#initialize()
34 36
	 */
35 37
	public void initialize() {
36
//		PrincipalComponentListManager.register();
38

  
37 39
		ExtensionPoints extensionPoints = ExtensionPointsSingleton.getInstance();
38 40
		extensionPoints.add("GenericToolBarMenu", "profile", this);
39 41
	}
......
43 45
	 * @see com.iver.andami.plugins.IExtension#execute(java.lang.String)
44 46
	 */
45 47
	public void execute(String actionCommand) {
46
		if (actionCommand.equals("profile")){
48
		/*if (actionCommand.equals("profile")){
47 49
			com.iver.andami.ui.mdiManager.IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
48 50
			
49 51
			//si la ventana activa es de tipo Vista 
50 52
			if (activeWindow instanceof View) {
51 53
				ProfileDialog pcPanel = new ProfileDialog (520,350,((View)activeWindow));
54
				scatterPlotDialog.setLayer(selectedItems[0]);
52 55
				PluginServices.getMDIManager().addWindow(pcPanel);
53 56
				
54 57
			}
55
		}
58
		}*/
56 59
	}
57 60

  
58 61
	/*
......
101 104
	 * @see org.gvsig.raster.gui.IGenericToolBarMenuItem#execute(com.iver.cit.gvsig.project.documents.view.toc.ITocItem, com.iver.cit.gvsig.fmap.layers.FLayer[])
102 105
	 */
103 106
	public void execute(ITocItem item, FLayer[] selectedItems) {
104
		this.execute("profile");
107
		FLayer fLayer = null;
108
		com.iver.andami.ui.mdiManager.IWindow activeWindow = PluginServices.getMDIManager().getActiveWindow();
109
		if (selectedItems.length != 1)
110
			return;
111
		fLayer = selectedItems[0];
112

  
113
		if (!(fLayer instanceof FLyrRasterSE))
114
			return;
115
		ProfileDialog pcPanel = new ProfileDialog (520,350,((View)activeWindow),(FLyrRasterSE)fLayer);
116
		PluginServices.getMDIManager().addWindow(pcPanel);
105 117
	}
106 118

  
107 119
	/*

Also available in: Unified diff