Revision 45523 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/impl/SingleSymbolLegend.java

View differences:

SingleSymbolLegend.java
32 32
import org.gvsig.fmap.mapcontext.rendering.legend.ISingleSymbolLegend;
33 33
import org.gvsig.fmap.mapcontext.rendering.legend.events.SymbolLegendEvent;
34 34
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
35
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol;
35 36
import org.gvsig.tools.ToolsLocator;
36 37
import org.gvsig.tools.dynobject.DynStruct;
37 38
import org.gvsig.tools.persistence.PersistenceManager;
......
119 120
        LOGGER.warn("TODO: SingleSymbolLegend.useDefaultSymbol");
120 121
    }
121 122

  
122
    public String[] getUsedFields() {
123
        return new String[0];
124
    }
125

  
126 123
    @Override
127 124
    public boolean isUseDefaultSymbol() {
128 125
        return true;
......
143 140
    }
144 141

  
145 142
    @Override
146
    protected String[] getRequiredFeatureAttributeNames(
147
            FeatureStore featureStore) throws DataException {
148
        // We only need the default Geometry to draw
143
    protected String[] getRequiredFeatureAttributeNames(FeatureStore featureStore) 
144
            throws DataException 
145
        {
146
        if( defaultSymbol instanceof AbstractSymbol ) {
147
            return ((AbstractSymbol)defaultSymbol).getRequiredFeatureAttributeNames(featureStore);
148
        }
149 149
        return new String[]{featureStore.getDefaultFeatureType().getDefaultGeometryAttributeName()};
150 150
    }
151 151

  

Also available in: Unified diff