Revision 6761
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java | ||
---|---|---|
139 | 139 |
private boolean bHasJoin = false; |
140 | 140 |
|
141 | 141 |
private XMLEntity orgXMLEntity = null; |
142 |
|
|
143 |
private XMLEntity loadSelection = null; |
|
144 |
private VectorialLegend loadLegend = null; |
|
145 |
|
|
142 | 146 |
|
143 | 147 |
/** |
144 | 148 |
* A?ade un SelectionListener a la lista de listeners. |
... | ... | |
717 | 721 |
* @see com.iver.cit.gvsig.fmap.layers.FLayer#getProperties() |
718 | 722 |
*/ |
719 | 723 |
public XMLEntity getXMLEntity() throws XMLException { |
720 |
if (this.orgXMLEntity != null) { |
|
724 |
if (!this.isAvailable() && this.orgXMLEntity != null) {
|
|
721 | 725 |
return this.orgXMLEntity; |
722 | 726 |
} |
723 | 727 |
XMLEntity xml = super.getXMLEntity(); |
... | ... | |
844 | 848 |
VectorialLegend leg = LegendFactory.createFromXML(xml.getChild(0)); |
845 | 849 |
try { |
846 | 850 |
getRecordset().getSelectionSupport().setXMLEntity(xml.getChild(1)); |
851 |
/* JMVIVO |
|
852 |
this.setLoadSelection(xml.getChild(1)); |
|
853 |
*/ |
|
854 |
// JMVIVO: Esto sirve para algo???? |
|
847 | 855 |
String recordsetName = xml.getStringProperty("recordset-name"); |
848 | 856 |
|
849 | 857 |
LayerFactory.getDataSourceFactory().changeDataSourceName( |
... | ... | |
877 | 885 |
setIsJoined(true); |
878 | 886 |
PostProcessSupport.addToPostProcess(this, "setLegend", leg, 1); |
879 | 887 |
} else { |
888 |
/* |
|
889 |
JMVIVO |
|
890 |
this.setLoadLegend(leg); |
|
891 |
*/ |
|
880 | 892 |
try { |
881 | 893 |
// legend.setDataSource(getRecordset()); |
882 | 894 |
setLegend(leg); |
... | ... | |
1204 | 1216 |
} |
1205 | 1217 |
|
1206 | 1218 |
} |
1219 |
|
|
1220 |
protected void setLoadSelection(XMLEntity xml) { |
|
1221 |
this.loadSelection = xml; |
|
1222 |
} |
|
1207 | 1223 |
|
1224 |
protected void setLoadLegend(VectorialLegend legend) { |
|
1225 |
this.loadLegend = legend; |
|
1226 |
} |
|
1208 | 1227 |
|
1228 |
protected void putLoadSelection() throws XMLException { |
|
1229 |
if (this.loadSelection == null) return; |
|
1230 |
try { |
|
1231 |
this.getRecordset().getSelectionSupport().setXMLEntity(this.loadSelection); |
|
1232 |
} catch (DriverException e) { |
|
1233 |
throw new XMLException(e); |
|
1234 |
} |
|
1235 |
this.loadSelection = null; |
|
1236 |
|
|
1237 |
} |
|
1238 |
protected void putLoadLegend() throws FieldNotFoundException, DriverException { |
|
1239 |
if (this.loadLegend == null) return; |
|
1240 |
|
|
1241 |
this.setLegend(this.loadLegend); |
|
1242 |
|
|
1243 |
this.loadLegend = null; |
|
1244 |
|
|
1245 |
} |
|
1246 |
|
|
1247 |
protected void cleanLoadOptions() { |
|
1248 |
this.loadLegend = null; |
|
1249 |
this.loadSelection = null; |
|
1250 |
} |
|
1251 |
|
|
1209 | 1252 |
} |
Also available in: Unified diff