Revision 9153 branches/v10/extensions/extWFS2/src/com/iver/cit/gvsig/gui/panels/WFSSelectAttributesPanel.java

View differences:

WFSSelectAttributesPanel.java
1 1
package com.iver.cit.gvsig.gui.panels;
2 2

  
3
import java.beans.PropertyChangeEvent;
4
import java.beans.PropertyChangeListener;
3 5
import java.io.File;
4 6
import java.util.Vector;
5 7

  
......
63 65
 *
64 66
 * $Id$
65 67
 * $Log$
66
 * Revision 1.7.2.3  2006-11-17 11:28:45  ppiqueras
67
 * Corregidos bugs y añadida nueva funcionalidad.
68
 * Revision 1.7.2.4  2006-12-04 09:39:34  ppiqueras
69
 * 1 Bug corregido
68 70
 *
71
 * Revision 1.16  2006/12/04 08:59:47  ppiqueras
72
 * Algunos bugs corregidos. A cambio hay 2 bugs relacionados que todavía no han sido corregidos (ver PHPCollab) (los tiene asignados Jorge).
73
 *
69 74
 * Revision 1.15  2006/11/01 17:29:08  jorpiell
70 75
 * Se ha elimiado el nodo virtual de la raiz. Adem?s ya se cargan los valores de un campo complejo en la pesta?a del filtro
71 76
 *
......
136 141
	private AttributesTreeTableModel model = null;
137 142
	private WFSParamsPanel parent = null;
138 143
	private JPanel treeTablePanel = null;
144
	private boolean attributesSelectedOfSameLayerHasChanged;
139 145

  
140 146
	public WFSSelectAttributesPanel(WFSParamsPanel parent){
141 147
		super();
......
147 153
		this.setLayout(null);
148 154
		this.setBounds(10, 5, 481, 427);		
149 155
		this.add(getTreeTablePanel(), null);
156
		attributesSelectedOfSameLayerHasChanged = false;
150 157
	}
151 158

  
152 159
	/**
......
175 182
			attributesTreeTable = new AttributesTreeTable(model,this);
176 183
			attributesTreeTable.setLocation(new java.awt.Point(7,4));
177 184
			attributesTreeTable.setSize(new java.awt.Dimension(482,302));
185
			
186
			// If user has changed the attributes selection in the same layer
187
			attributesTreeTable.addPropertyChangeListener(new PropertyChangeListener() {
188
				/*
189
				 *  (non-Javadoc)
190
				 * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
191
				 */
192
				public void propertyChange(PropertyChangeEvent evt) {
193
					if (evt.getPropertyName().compareTo("tableCellEditor") == 0) // If the selection of the attributes of the layer has changed
194
						attributesSelectedOfSameLayerHasChanged = true;					
195
					else if (evt.getPropertyName().compareTo("selectionModel") == 0) // If the layer has changed
196
						attributesSelectedOfSameLayerHasChanged = false;
197
				}
198
			});
178 199
		}
179 200
		return attributesTreeTable;
180 201
	}
......
227 248
	}
228 249
	
229 250
	/**
251
	 * Returns true if user has changed the selection of some attribute of the same layer; else returns false
252
	 * 
253
	 * @return A boolean value
254
	 */
255
	public boolean getAttributesSelectedOfSameLayerHasChanged() {
256
		return this.attributesSelectedOfSameLayerHasChanged;
257
	}
258
	
259
	/**
230 260
	 * @param updated The updated to set.
231 261
	 */
232 262
	public void setUpdated(boolean updated) {
233 263
		parent.isApplicable(updated);
234 264
	}
265

  
266
	/**
267
	 * Resets the value of the attribute 'attributesSelectedOfSameLayerHasChanged'
268
	 * 
269
	 * @return A boolean value
270
	 */
271
	public void resetAttributesSelectedOfSameLayerHasChanged() {
272
		this.attributesSelectedOfSameLayerHasChanged = false;
273
	}
235 274
}  //  @jve:decl-index=0:visual-constraint="10,22"

Also available in: Unified diff