Revision 20307

View differences:

trunk/extensions/extRemoteSensing/src/org/gvsig/remotesensing/profiles/gui/ProfilePanel.java
189 189
		if(e.getSource().equals(getTabbedPane())){
190 190
			
191 191
			if(nextActiveChart==PANELZPROFILE){
192
				nextActiveChart = PANELLINEPROFILE;
193
				getLineOptionsPanel().getNewButton().setSelected(false);	
192 194
				// Se actualizan las propiedades del gr?fico
193 195
				getPointOptionsPanel().getJPanelChart();
194
				getPointOptionsPanel().selectDrawRoiTool();
196
				GraphicLayer graphicLayer = mapControl.getMapContext().getGraphicsLayer();
195 197
				
196
				GraphicLayer graphicLayer = mapControl.getMapContext().getGraphicsLayer();
197 198
				// Se pintan todas las rois que existan en la tabla
198 199
				ArrayList roisArray = getPointOptionsPanel().getROIs();
199
	
200 200
				if (roisArray != null) {
201 201
					ISymbol symbol = null;
202 202
					FGraphic fGraphic = null;
......
217 217
					}
218 218
					getMapControl().drawGraphics();
219 219
				}
220
				// Asignaci?n del siguiente estado
221
				nextActiveChart = PANELLINEPROFILE;
220
				getPointOptionsPanel().getJPanelChart();
222 221
			}
222
			
223 223
			else if(nextActiveChart == PANELLINEPROFILE){
224
				//se actualizan las propiedades del gr?fico
225
				getLineOptionsPanel().getJPanelChart();
226
				getLineOptionsPanel().selectDrawRoiTool();
227
			
224
				
225
				nextActiveChart= PANELZPROFILE;	
226
				getPointOptionsPanel().getNewButton().setSelected(false);
228 227
				try {
228
					
229 229
					int selectedRow = getLineOptionsPanel().getTable().getSelectedRow();
230
					getLineOptionsPanel().getJPanelChart();
231
					
232
					if(selectedRow==-1)
233
						return;
234
					
230 235
					String roiName = (String)getLineOptionsPanel().getTable().getModel().getValueAt(selectedRow,0);
231 236
					VectorialROI roi = (VectorialROI)getLineOptionsPanel().getROI(roiName);
232 237
					roi.setBandToOperate(getLineOptionsPanel().getComboBands().getSelectedIndex());
......
236 241
					GraphicLayer graphicLayer = mapControl.getMapContext().getGraphicsLayer();
237 242
					// Se pintan las rois que existen en la tabla
238 243
					ArrayList roisArray = getLineOptionsPanel().getROIs();
239
					
240 244
					if (roisArray != null) {
245
						
241 246
						ISymbol symbol = null;
242 247
						FGraphic fGraphic = null;
243 248
						
......
259 264
						}
260 265
						getMapControl().drawGraphics();
261 266
					}
262
					
263 267
				} catch (NotInitializeException e1) {
264 268
					RasterToolsUtil.messageBoxError("tabla_no_inicializada", this, e1);
265 269
				}
266
				// Asignaci?n del siguiente estado
267
				nextActiveChart= PANELZPROFILE;	
268 270
			}
269 271
		}
270 272
	}
271 273

  
274
	
272 275
	/**
273 276
	 * @return entero que identifica el panel activo
274 277
	 * */

Also available in: Unified diff