Revision 10661 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/table/gui/DlgFieldManager.java

View differences:

DlgFieldManager.java
146 146
		public int getRowCount() {
147 147
			try {
148 148
				return myIes.getRecordset().getFieldCount();
149
			} catch (DriverLoadException e) {
150
				e.printStackTrace();
151 149
			} catch (ReadDriverException e) {
152 150
				e.printStackTrace();
153 151
			}
......
156 154

  
157 155
		public Object getValueAt(int rowIndex, int columnIndex) {
158 156
			FieldDescription[] myFields;
159
			try {
160
				myFields = myIes.getFieldsDescription();
161
				FieldDescription aux = myFields[rowIndex];
162
				switch (columnIndex) {
157
			myFields = myIes.getFieldsDescription();
158
			FieldDescription aux = myFields[rowIndex];
159
			switch (columnIndex) {
163 160
				case 0:
164 161
					return aux.getFieldAlias();
165 162
				case 1:
......
185 182
					return aux.getDefaultValue();
186 183

  
187 184
				}
188
			} catch (DriverLoadException e) {
189
				e.printStackTrace();
190
			}
191

  
192 185
			return null;
193 186
		}
194 187

  
......
252 245
						fDesc.setFieldDecimalCount(5);
253 246
					}
254 247
				}
255
			} catch (DriverLoadException e) {
256
				e.printStackTrace();
257 248
			} catch (ReadDriverException e) {
258 249
				e.printStackTrace();
259 250
			}
......
272 263
		initialize();
273 264
		// Add a new row
274 265
		TableModel tm;
275
		try {
276
			tm = new MyTableModel(ies);
277
			getJTableFields().setModel(tm);
278
			// Esto lo a?ado aqu? porque si no tiene registros, no hace caso.
279
			// (Por eso no
280
			// lo pongo en getJTable()
281
			TableColumn typeColumn = jTableFields.getColumnModel().getColumn(1);
282
			JComboBox comboBox = new JComboBox();
283
			comboBox.addItem("Boolean");
284
			comboBox.addItem("Date");
285
			comboBox.addItem("Integer");
286
			comboBox.addItem("Double");
287
			comboBox.addItem("String");
288
			typeColumn.setCellEditor(new DefaultCellEditor(comboBox));
266
		tm = new MyTableModel(ies);
267
		getJTableFields().setModel(tm);
268
		// Esto lo a?ado aqu? porque si no tiene registros, no hace caso.
269
		// (Por eso no
270
		// lo pongo en getJTable()
271
		TableColumn typeColumn = jTableFields.getColumnModel().getColumn(1);
272
		JComboBox comboBox = new JComboBox();
273
		comboBox.addItem("Boolean");
274
		comboBox.addItem("Date");
275
		comboBox.addItem("Integer");
276
		comboBox.addItem("Double");
277
		comboBox.addItem("String");
278
		typeColumn.setCellEditor(new DefaultCellEditor(comboBox));
289 279

  
290

  
291
		} catch (DriverLoadException e) {
292
			// TODO Auto-generated catch block
293
			e.printStackTrace();
294
		}
295

  
296 280
	}
297 281

  
298 282
	/**
......
477 461
								PluginServices.getMDIManager().closeWindow(panelNewField);
478 462
							} catch (ParseException e2) {
479 463
								NotificationManager.addError(e2);
480
							} catch (DriverLoadException e3) {
481
								NotificationManager.addError(e3);
482 464
							} catch (ReadDriverException e3) {
483 465
								NotificationManager.addError(e3);
484 466
							}
......
567 549

  
568 550

  
569 551
							edAdapter.renameField(fieldName, newName);
570
						} catch (DriverLoadException e1) {
571
							// TODO Auto-generated catch block
572
							e1.printStackTrace();
573 552
						} catch (ReadDriverException e1) {
574 553
							// TODO Auto-generated catch block
575 554
							e1.printStackTrace();

Also available in: Unified diff