Revision 5339 trunk/extensions/extWFS2/src/com/iver/cit/gvsig/gui/panels/WFSParamsPanel.java

View differences:

WFSParamsPanel.java
59 59
 *
60 60
 * $Id$
61 61
 * $Log$
62
 * Revision 1.3  2006-05-19 12:57:08  jorpiell
62
 * Revision 1.4  2006-05-23 08:09:39  jorpiell
63
 * Se ha cambiado la forma en la que se leian los valores seleccionados en los paneles y se ha cambiado el comportamiento de los botones
64
 *
65
 * Revision 1.3  2006/05/19 12:57:08  jorpiell
63 66
 * Modificados algunos paneles
64 67
 *
65 68
 * Revision 1.2  2006/04/20 16:38:24  jorpiell
......
83 86
	private WizardListenerSupport listenerSupport;
84 87
	public	static Preferences fPrefs = Preferences.userRoot().node( "gvsig.wcs-wizard" );
85 88
	private WFSInfoPanel infoPanel;
86
	private int indInfo;
87
	private int indFeature;
88 89
	private int indFields;
89
	private int indOptions;
90

  
90
	
91 91
	/**
92 92
	 * This method initializes jTabbedPane	
93 93
	 * 	
......
170 170
			infoPanel = new WFSInfoPanel();
171 171
			infoPanel.addFocusListener(new FocusListener() {
172 172
				public void focusGained(java.awt.event.FocusEvent e) {
173
//					refreshInfo();
173
					refreshInfo();
174 174
				}
175 175

  
176
				private void refreshInfo() {
177
					WFSLayerNode selectedNode = featurePanel.getSelectedFeature();
178
					selectedNode.setFields(fieldsPanel.getSelectedFields());
179
					data.setUserName(optionsPanel.getUserName());
180
					data.setBuffer(optionsPanel.getBuffer());
181
					data.setTimeOut(optionsPanel.getTimeout());
182
					infoPanel.refresh(data,selectedNode);
183
				}
184

  
176 185
				public void focusLost(FocusEvent e) {
177 186
					
178 187
				}
......
241 250
	 * @return boolean
242 251
	 */
243 252
	public boolean isCorretlyConfigured() {
244
				
245
		
246
		/* 
247
		 * Seg?n el est?ndar WCS, si se especifica bounding box el par?metro TIME
248
		 * no es necesario. ?ste es el caso de gvSIG, que siempre especifica BBOX
249
		 * As? que, en teor?a, no deber?amos comprobar si se ha seleccionado algo
250
		 * o no. Pero en las pruebas, el servidor que us?bamos respond?a con una
251
		 * cobertura en blanco (negro) as? que se ha optado por evitar que se pueda
252
		 * consultar sin ninguna posici?n para el tiempo (siempre que la cobertura
253
		 * especifique posiciones para el tiempo).
254
		 * 
255
		 * En cualquier caso con comentarizar la l?nea basta.
256
		 */
257

  
258
		
259
		return true;
253
		if (featurePanel.getSelectedFeature()!= null){
254
			return true;
255
		}else{
256
			return false;
257
		}
260 258
	}		
261 259

  
262

  
263 260
	/**
264 261
	 * Cleans up the wizard's components but the server's layers list.
265 262
	 * 
......
281 278
	 * Selected feature
282 279
	 */
283 280
	public void refreshData(WFSLayerNode feature){
284
		infoPanel.refresh(data,feature);
285 281
		feature = (WFSLayerNode)data.getFeatureInfo(feature.getName());
286 282
		fieldsPanel.setFields(feature);
287
		jTabbedPane.setEnabledAt(indFields,true);		
283
		jTabbedPane.setEnabledAt(indFields,true);
284
		listenerSupport.callStateChanged(isCorretlyConfigured());
285
		
288 286
	}
289 287

  
290 288
	/**
......
296 294
	 */
297 295
	public void setWizardData(WFSWizardData data) {
298 296
		this.data = data;
297
		WFSLayerNode selectedNode = (WFSLayerNode)featurePanel.getSelectedFeature();
299 298
		featurePanel.setWizardData(data);
300
		infoPanel.refresh(data,null);
299
		data.setBuffer(optionsPanel.getBuffer());
300
		data.setTimeOut(optionsPanel.getTimeout());
301
		infoPanel.refresh(data,selectedNode);
301 302
	}
302 303
	
303 304
	/**

Also available in: Unified diff