Revision 11199 trunk/extensions/extJDBC/src/com/iver/cit/gvsig/fmap/layers/FLayerJDBCVectorial.java

View differences:

FLayerJDBCVectorial.java
12 12
import com.iver.cit.gvsig.exceptions.layers.XMLLayerException;
13 13
import com.iver.cit.gvsig.fmap.crs.CRSFactory;
14 14
import com.iver.cit.gvsig.fmap.drivers.DefaultDBDriver;
15
import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
16 15
import com.iver.cit.gvsig.fmap.drivers.VectorialDatabaseDriver;
17 16
import com.iver.cit.gvsig.fmap.drivers.WithDefaultLegend;
18 17
import com.iver.cit.gvsig.fmap.rendering.LegendFactory;
19 18
import com.iver.cit.gvsig.fmap.rendering.VectorialLegend;
19
import com.iver.cit.gvsig.fmap.rendering.styling.AttrInTableLabeling;
20
import com.iver.cit.gvsig.fmap.rendering.styling.ILabelingStrategy;
20 21
import com.iver.utiles.XMLEntity;
21 22

  
22 23
public class FLayerJDBCVectorial  extends FLyrVect {
......
128 129
            if (this.getRecordset().getDriver() instanceof WithDefaultLegend) {
129 130
                WithDefaultLegend aux = (WithDefaultLegend) this.getRecordset().getDriver();
130 131
                this.setLegend((VectorialLegend) aux.getDefaultLegend());
132

  
133
                ILabelingStrategy labeler = aux.getDefaultLabelingStrategy();
134
                if (labeler instanceof AttrInTableLabeling) {
135
                	((AttrInTableLabeling) labeler).setLayer(this);
136
                }
137

  
138
                this.setLabelingStrategy(labeler);
139

  
131 140
            } else {
132 141
                this.setLegend(LegendFactory.createSingleSymbolLegend(
133 142
                        this.getShapeType()));

Also available in: Unified diff