Revision 1855

View differences:

org.gvsig.legend.proportionalsymbols.app.mainplugin/trunk/org.gvsig.legend.proportionalsymbols.app.mainplugin/src/main/java/org/gvsig/symbology/fmap/rendering/ProportionalSymbolsLegend.java
45 45

  
46 46
import org.gvsig.fmap.dal.feature.Feature;
47 47
import org.gvsig.fmap.geom.Geometry;
48
import org.gvsig.fmap.geom.GeometryLocator;
49
import org.gvsig.fmap.geom.GeometryManager;
48 50
import org.gvsig.fmap.mapcontext.MapContextLocator;
49 51
import org.gvsig.fmap.mapcontext.MapContextManager;
50 52
import org.gvsig.fmap.mapcontext.rendering.legend.ILegend;
......
196 198

  
197 199
	}
198 200

  
199
	public static boolean isPolygonal(int ty) {
200
        if (ty == Geometry.TYPES.MULTISURFACE
201
            || ty == Geometry.TYPES.SURFACE
202
            ) {
203
            return true;
204
        } else {
205
            return false;
206
        }
207
	}
201
    public static boolean isPolygonal(int ty) {
202
        GeometryManager geomManager = GeometryLocator.getGeometryManager();
203
        return geomManager.isSubtype(Geometry.TYPES.MULTISURFACE, ty) || 
204
            geomManager.isSubtype(Geometry.TYPES.SURFACE, ty);
205
    }
208 206

  
209

  
210
	public static boolean isLinear(int ty) {
211
        if (ty == Geometry.TYPES.CIRCLE
212
            || ty == Geometry.TYPES.ARC
213
            || ty == Geometry.TYPES.CURVE
214
            || ty == Geometry.TYPES.ELLIPSE
215
            || ty == Geometry.TYPES.ELLIPTICARC
216
            || ty == Geometry.TYPES.SPLINE
217
            || ty == Geometry.TYPES.MULTICURVE
218
            ) {
219
            return true;
220
        } else {
221
            return false;
222
        }
223
	}
224

  
225
	public static boolean isPoint(int ty) {
226
        if (ty == Geometry.TYPES.POINT
227
            || ty == Geometry.TYPES.MULTIPOINT
228
            ) {
229
            return true;
230
        } else {
231
            return false;
232
        }
207
    public static boolean isLinear(int ty) {
208
        GeometryManager geomManager = GeometryLocator.getGeometryManager();
209
        return geomManager.isSubtype(Geometry.TYPES.MULTICURVE, ty) || 
210
            geomManager.isSubtype(Geometry.TYPES.CURVE, ty);
233 211
    }
212
    
213
    public static boolean isPoint(int ty) {
214
        GeometryManager geomManager = GeometryLocator.getGeometryManager();
215
        return geomManager.isSubtype(Geometry.TYPES.MULTIPOINT, ty) || 
216
            geomManager.isSubtype(Geometry.TYPES.POINT, ty);
217
    }
234 218

  
235

  
236

  
237 219
	/**
238 220
	 * Gets the background symbol which only can appear when the shapetype of the layer
239 221
	 * is polygonal
240 222

  

Also available in: Unified diff