Revision 6490 trunk/extensions/extGeoProcessing/src/com/iver/cit/gvsig/geoprocess/manager/GeoprocessManager.java

View differences:

GeoprocessManager.java
45 45
 *
46 46
 * $Id$
47 47
 * $Log$
48
 * Revision 1.4  2006-07-04 16:42:37  azabala
48
 * Revision 1.5  2006-07-21 09:32:01  azabala
49
 * fixed bug 644: disabling ok button untill user select a geoprocess
50
 *
51
 * Revision 1.4  2006/07/04 16:42:37  azabala
49 52
 * *** empty log message ***
50 53
 *
51 54
 * Revision 1.3  2006/06/27 16:16:49  azabala
......
92 95
import com.iver.cit.gvsig.geoprocess.core.gui.IGeoprocessPanel;
93 96
import com.iver.cit.gvsig.geoprocess.manager.GeoprocessTree.GeoprocessTreeDirectory;
94 97

  
98
/**
99
 * Main panel of the Geoprocess Manager gui component.
100
 * 
101
 * It has a tree where shows all geoprocesses structure, and
102
 * buttons to open geoprocess' panel, and to close itself.
103
 * 
104
 * It also listens for tree selection events.
105
 * 
106
 * @author azabala
107
 *
108
 */
95 109
public class GeoprocessManager extends JPanel 
96 110
	implements View, TreeSelectionListener {
97 111
	
......
284 298
			getText(this, "Error_seleccionar_gp_desc");
285 299
			JOptionPane.showMessageDialog(this, errorDescription, error,
286 300
					JOptionPane.ERROR_MESSAGE);
301
			return;
287 302
		}
288 303
		IGeoprocessPanel panel = 
289 304
			geoprocess.getGeoprocessPanel();
......
307 322
					openGeoprocessPanel();
308 323
				}
309 324
			});
325
			//it will be disabled until user select a geoprocess
326
			//in the tree
327
			openGeoprocess.setEnabled(false);
310 328
		}
311 329
		return openGeoprocess;
312 330
	}
......
329 347
	}
330 348
	
331 349
	
332

  
333

  
350
	
351
	/**
352
	 * processes tree selection events.
353
	 */
334 354
	public void valueChanged(TreeSelectionEvent event) {
335 355
		DefaultMutableTreeNode selectedNode =
336 356
			(DefaultMutableTreeNode) event.getPath().
......
344 364
			} catch (IOException e) {
345 365
				htmlPane.setText("<p>Descripcion no disponible</p>");
346 366
			}
367
			getJButtonOpenGeop().setEnabled(true);
347 368
		}else{
348 369
			GeoprocessTreeDirectory directory =
349 370
				(GeoprocessTreeDirectory)userObject;
350 371
			htmlPane.setText("<p>"+
351 372
					directory.getDescription()+
352 373
					"</p>");
374
			getJButtonOpenGeop().setEnabled(false);
353 375
		}
354 376
	}
355 377

  

Also available in: Unified diff