Revision 6256 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/Table.java
Table.java | ||
---|---|---|
1081 | 1081 |
private IEditableSource des; |
1082 | 1082 |
private String[] aliases; |
1083 | 1083 |
private int[] mapping; |
1084 |
private boolean failed=false; |
|
1085 | 1084 |
|
1086 | 1085 |
/** |
1087 | 1086 |
* Crea un nuevo DataSourceDataModel. |
... | ... | |
1109 | 1108 |
* @return Name of field |
1110 | 1109 |
*/ |
1111 | 1110 |
public String getColumnName(int col) { |
1112 |
return aliases[mapping[col]]; |
|
1111 |
if (col==0) |
|
1112 |
return " "; |
|
1113 |
col--; |
|
1114 |
int i=mapping[col]; |
|
1115 |
return aliases[i+1]; |
|
1113 | 1116 |
} |
1114 | 1117 |
|
1115 | 1118 |
/** |
... | ... | |
1208 | 1211 |
try { |
1209 | 1212 |
v = ValueFactory.createValueByType(aValue.toString(), |
1210 | 1213 |
des.getRecordset().getFieldType(columnIndex)); |
1211 |
failed=false; |
|
1212 | 1214 |
IRowEdited row = des.getRow(numRow); //.getAttribute(columnIndex); |
1213 | 1215 |
Value[] values = row.getAttributes(); |
1214 | 1216 |
values[columnIndex] = v; |
... | ... | |
1227 | 1229 |
throw new RuntimeException(e1); |
1228 | 1230 |
} catch (ParseException e) { |
1229 | 1231 |
JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(),"formato_del_campo_incorrecto"); |
1230 |
failed=true; |
|
1231 |
return; |
|
1232 |
return; |
|
1232 | 1233 |
} catch (DriverLoadException e) { |
1233 | 1234 |
throw new RuntimeException(e); |
1234 | 1235 |
} catch (DriverIOException e) { |
... | ... | |
1245 | 1246 |
} |
1246 | 1247 |
public class ColumnModel extends DefaultTableColumnModel{ |
1247 | 1248 |
private ProjectTable pt; |
1249 |
private int[] mapping; |
|
1248 | 1250 |
public ColumnModel() { |
1249 | 1251 |
} |
1250 | 1252 |
|
1251 | 1253 |
public void setDataModel(ProjectTable model) { |
1252 | 1254 |
this.pt=model; |
1255 |
this.mapping=pt.getMapping(); |
|
1253 | 1256 |
} |
1254 | 1257 |
|
1255 | 1258 |
public void addColumn(TableColumn tc) { |
Also available in: Unified diff