Revision 6534
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java | ||
---|---|---|
65 | 65 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
66 | 66 |
import com.iver.cit.gvsig.fmap.drivers.VectorialDatabaseDriver; |
67 | 67 |
import com.iver.cit.gvsig.fmap.drivers.VectorialDriver; |
68 |
import com.iver.cit.gvsig.fmap.drivers.WithDefaultLegend; |
|
68 | 69 |
import com.iver.cit.gvsig.fmap.drivers.shp.IndexedShpDriver; |
69 | 70 |
import com.iver.cit.gvsig.fmap.edition.AnnotationEditableAdapter; |
70 | 71 |
import com.iver.cit.gvsig.fmap.edition.EditionEvent; |
... | ... | |
179 | 180 |
* @return VectorialAdapter. |
180 | 181 |
*/ |
181 | 182 |
public ReadableVectorial getSource() { |
182 |
if (this.isUnavailable()) return null;
|
|
183 |
if (!this.isAvialable()) return null;
|
|
183 | 184 |
return source; |
184 | 185 |
} |
185 | 186 |
|
... | ... | |
857 | 858 |
// sds.setSelectionSupport(selectionSupport); |
858 | 859 |
// ((EditableAdapter)getSource()).setRecordSet(sds); |
859 | 860 |
} catch (NoSuchTableException e1) { |
860 |
this.setUnavailable(true);
|
|
861 |
this.setAvailable(false);
|
|
861 | 862 |
throw new XMLException(e1); |
862 | 863 |
} catch (com.hardcode.gdbms.engine.data.driver.DriverException e1) { |
863 |
this.setUnavailable(true);
|
|
864 |
this.setAvailable(false);
|
|
864 | 865 |
throw new XMLException(e1); |
865 | 866 |
} catch (DriverLoadException e1) { |
866 |
this.setUnavailable(true);
|
|
867 |
this.setAvailable(false);
|
|
867 | 868 |
throw new XMLException(e1); |
868 | 869 |
} catch (DriverException e1) { |
869 |
this.setUnavailable(true);
|
|
870 |
this.setAvailable(false);
|
|
870 | 871 |
throw new XMLException(e1); |
871 | 872 |
} |
872 | 873 |
// Si tiene una uni?n, lo marcamos para que no se cree la leyenda hasta |
... | ... | |
887 | 888 |
} |
888 | 889 |
|
889 | 890 |
} catch (XMLException e) { |
890 |
this.setUnavailable(true);
|
|
891 |
this.setAvailable(false);
|
|
891 | 892 |
this.orgXMLEntity = xml; |
892 | 893 |
//throw e; |
893 | 894 |
} catch (Exception e) { |
894 |
this.setUnavailable(true);
|
|
895 |
this.setAvailable(false);
|
|
895 | 896 |
this.orgXMLEntity = xml; |
896 | 897 |
//throw new XMLException(e); |
897 | 898 |
} |
... | ... | |
1014 | 1015 |
* @see com.iver.cit.gvsig.fmap.layers.CommonOperations#getRecordset() |
1015 | 1016 |
*/ |
1016 | 1017 |
public SelectableDataSource getRecordset() throws DriverException { |
1017 |
if (this.isUnavailable()) return null;
|
|
1018 |
if (!this.isAvialable()) return null;
|
|
1018 | 1019 |
if (sds == null) { |
1019 | 1020 |
try { |
1020 | 1021 |
SelectableDataSource ds = source.getRecordset(); |
... | ... | |
1172 | 1173 |
public boolean isPropertiesMenuVisible(){ |
1173 | 1174 |
return true; |
1174 | 1175 |
} |
1176 |
|
|
1177 |
public void reload() throws DriverIOException { |
|
1178 |
super.reload(); |
|
1179 |
try { |
|
1180 |
this.source.getDriver().reload(); |
|
1181 |
//this.getRecordset().reload(); |
|
1182 |
if (this.getLegend() == null) { |
|
1183 |
if (this.getRecordset().getDriver() instanceof WithDefaultLegend) { |
|
1184 |
WithDefaultLegend aux = (WithDefaultLegend) this.getRecordset().getDriver(); |
|
1185 |
this.setLegend((VectorialLegend) aux.getDefaultLegend()); |
|
1186 |
} else { |
|
1187 |
this.setLegend(LegendFactory.createSingleSymbolLegend( |
|
1188 |
this.getShapeType())); |
|
1189 |
} |
|
1190 |
} |
|
1191 |
|
|
1192 |
} catch (com.hardcode.gdbms.engine.data.driver.DriverException e) { |
|
1193 |
this.setAvailable(false); |
|
1194 |
throw new DriverIOException(e); |
|
1195 |
} catch (IOException e) { |
|
1196 |
this.setAvailable(false); |
|
1197 |
throw new DriverIOException(e); |
|
1198 |
} catch (DriverException e) { |
|
1199 |
this.setAvailable(false); |
|
1200 |
throw new DriverIOException(e); |
|
1201 |
} catch (Exception e) { |
|
1202 |
this.setAvailable(false); |
|
1203 |
throw new DriverIOException(e); |
|
1204 |
} |
|
1205 |
|
|
1206 |
} |
|
1175 | 1207 |
|
1208 |
|
|
1176 | 1209 |
} |
Also available in: Unified diff