Revision 27464 branches/v2_0_0_prep/extensions/extGeocoding/src/org/gvsig/geocoding/utils/GeocoUtils.java

View differences:

GeocoUtils.java
148 148
			double oldCenterY = oldExtent.getCenter(1);
149 149
			double movX = x - oldCenterX;
150 150
			double movY = y - oldCenterY;
151
			double upperLeftCornerX = oldExtent.getMinimum(0) + movX;
152
			double upperLeftCornerY = oldExtent.getMinimum(0) + movY;
151
			double minX = oldExtent.getMinimum(0) + movX;
152
			double minY = oldExtent.getMinimum(1) + movY;
153 153
			double width = oldExtent.getLength(0);
154 154
			double height = oldExtent.getLength(1);
155
			Envelope enve = new DefaultEnvelope(upperLeftCornerX,
156
					upperLeftCornerY, width, height);
155
			Envelope enve = new DefaultEnvelope(minX, minY, minX + width, minY
156
					+ height);
157 157
			mapControl.getViewPort().setEnvelope(enve);
158 158
			// draw point
159 159
			GraphicLayer grphclyr = mapControl.getMapContext()
......
173 173
		}
174 174

  
175 175
	}
176
	
176

  
177 177
	/**
178 178
	 * Clear all rows of the TableModel
179
	 * 
179 180
	 * @param model
180 181
	 */
181
	public static void clearTableModel(DefaultTableModel model){
182
	public static void clearTableModel(DefaultTableModel model) {
182 183
		int n = model.getRowCount();
183 184
		for (int i = n - 1; i > -1; i--) {
184
			model.removeRow(i);			
185
		}		
185
			model.removeRow(i);
186
		}
186 187
	}
187
	
188

  
188 189
	/**
189 190
	 * Put combos in cells of the one table
191
	 * 
190 192
	 * @param table
191 193
	 * @param descs
192 194
	 */
193
	public static void putCombosInTable(JTable table, List<FeatureAttributeDescriptor> descs, int col){
194
		TableColumn column = table.getColumnModel().getColumn(col);		
195
	public static void putCombosInTable(JTable table,
196
			List<FeatureAttributeDescriptor> descs, int col) {
197
		TableColumn column = table.getColumnModel().getColumn(col);
195 198
		JComboBox combo = new JComboBox();
196 199
		DefaultComboBoxModel modelcombo = new DefaultComboBoxModel();
197 200
		for (FeatureAttributeDescriptor desc : descs) {
......
203 206
		dce.setClickCountToStart(2);
204 207
		column.setCellEditor(dce);
205 208
	}
206
	
207
	
209

  
208 210
	/**
209 211
	 * This method gets the FLyrVect list of the View
210 212
	 * 
......
232 234
		}
233 235
		return layers;
234 236
	}
235
	
237

  
236 238
	/**
237 239
	 * Get a list gvSIG Project tables
238 240
	 * 
......
262 264

  
263 265
		return tables;
264 266
	}
265
	
266 267

  
267 268
}

Also available in: Unified diff