Revision 34679

View differences:

branches/v2_0_0_prep/libraries/libFMap_controls/src/org/gvsig/fmap/mapcontrol/tools/Behavior/Behavior.java
49 49
import java.awt.geom.Point2D;
50 50
import java.awt.image.BufferedImage;
51 51

  
52
import org.apache.log4j.Logger;
52
import org.slf4j.Logger;
53
import org.slf4j.LoggerFactory;
54

  
53 55
import org.gvsig.fmap.dal.feature.exception.CreateGeometryException;
56
import org.gvsig.fmap.geom.Geometry.SUBTYPES;
57
import org.gvsig.fmap.geom.Geometry.TYPES;
54 58
import org.gvsig.fmap.geom.GeometryLocator;
55 59
import org.gvsig.fmap.geom.GeometryManager;
56
import org.gvsig.fmap.geom.Geometry.SUBTYPES;
57
import org.gvsig.fmap.geom.Geometry.TYPES;
58 60
import org.gvsig.fmap.geom.primitive.Arc;
59 61
import org.gvsig.fmap.geom.primitive.Circle;
60 62
import org.gvsig.fmap.geom.primitive.Curve;
......
90 92
	 */
91 93
	private MapControl mapControl;
92 94
	
93
	protected static Logger logger = Logger.getLogger(Behavior.class
94
			.getName());
95
    private static final Logger LOG = LoggerFactory.getLogger(Behavior.class);
95 96

  
96 97
	protected GeometryManager geomManager = GeometryLocator.getGeometryManager();
97 98
	
......
203 204
			point.setX(x);
204 205
			point.setY(y);
205 206
		} catch (org.gvsig.fmap.geom.exception.CreateGeometryException e) {
206
			logger.error(new CreateGeometryException(TYPES.POINT, SUBTYPES.GEOM2D, e));
207
            LOG.error("Error creating a point with x=" + x + ", y=" + y,
208
                new CreateGeometryException(TYPES.POINT, SUBTYPES.GEOM2D,
209
                e));
207 210
		}
208 211
		return point;
209 212
	}
......
238 241
			arc = (Arc)geomManager.create(TYPES.ARC, SUBTYPES.GEOM2D);
239 242
			arc.setPoints(p1, p2, p3);
240 243
	    } catch (org.gvsig.fmap.geom.exception.CreateGeometryException e) {
241
			logger.error(new CreateGeometryException(TYPES.ARC, SUBTYPES.GEOM2D, e));
244
            LOG.error("Error creating and arc with p1=" + p1 + ", p2=" + p2
245
                + ",p3=" + p3, new CreateGeometryException(TYPES.ARC,
246
                SUBTYPES.GEOM2D, e));
242 247
		}
243 248
	    return arc;
244 249
	}
......
275 280
			arc = (Arc)geomManager.create(TYPES.ARC, SUBTYPES.GEOM2D);
276 281
			arc.setPoints(createPoint(centerX, centerY), radious, angleStart, angleExtent);
277 282
	    } catch (org.gvsig.fmap.geom.exception.CreateGeometryException e) {
278
			logger.error(new CreateGeometryException(TYPES.ARC, SUBTYPES.GEOM2D, e));
283
            LOG.error(
284
                "Error creating an arc with centerX=" + centerX + ", centerY="
285
                    + centerY + ", radious=" + radious + ", angleStart="
286
                    + angleStart + ", angleExtent=" + angleExtent,
287
                new CreateGeometryException(TYPES.ARC, SUBTYPES.GEOM2D, e));
279 288
		}
280 289
	    return arc;
281 290
	}
......
295 304
			circle = (Circle)geomManager.create(TYPES.CIRCLE, SUBTYPES.GEOM2D);
296 305
			circle.setPoints(createPoint(centerX, centerY), radious);
297 306
	    } catch (org.gvsig.fmap.geom.exception.CreateGeometryException e) {
298
			logger.error(new CreateGeometryException(TYPES.CIRCLE, SUBTYPES.GEOM2D, e));
307
            LOG.error("Error creating circle with centerX=" + centerX
308
                + ", centerY=" + centerY + ", radious=" + radious,
309
                new CreateGeometryException(TYPES.CIRCLE,
310
                SUBTYPES.GEOM2D, e));
299 311
		}
300 312
	    
301 313
	    return circle;
......
316 328
			curve = (Curve)geomManager.create(TYPES.CURVE, SUBTYPES.GEOM2D);
317 329
			curve.setGeneralPath(gpx);
318 330
		} catch (org.gvsig.fmap.geom.exception.CreateGeometryException e) {
319
			logger.error(new CreateGeometryException(TYPES.CURVE, SUBTYPES.GEOM2D, e));
331
            LOG.error("Error creating lineString with GeneralPathX=" + gpx,
332
                new CreateGeometryException(TYPES.CURVE, SUBTYPES.GEOM2D,
333
                e));
320 334
		}
321 335
		return curve;
322 336
	}
branches/v2_0_0_prep/libraries/libFMap_controls/src/org/gvsig/fmap/mapcontrol/impl/DefaultPrimitivesDrawer.java
31 31
import java.awt.Graphics;
32 32
import java.awt.Graphics2D;
33 33

  
34
import org.apache.log4j.Logger;
34
import org.slf4j.Logger;
35
import org.slf4j.LoggerFactory;
36

  
35 37
import org.gvsig.fmap.mapcontrol.PrimitivesDrawer;
36 38

  
37 39
/**
38 40
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
39 41
 */
40 42
public class DefaultPrimitivesDrawer implements PrimitivesDrawer{
41
	protected static Logger logger = Logger.getLogger(DefaultPrimitivesDrawer.class
42
			.getName());
43
	protected Graphics2D graphics = null;	
43

  
44
    private static final Logger LOG = LoggerFactory
45
        .getLogger(DefaultPrimitivesDrawer.class);
46

  
47
    protected Graphics2D graphics = null;
44 48
	protected Color color = Color.BLACK;
45 49
	protected Color xorColor = Color.WHITE;
46 50
	private Object lockObject = null;
......
116 120
	 */
117 121
	public void stopDrawing(Object obj) {
118 122
		if (lockObject != obj){
119
			logger.warn("Trying to unlock a resource that is not locked");
123
            LOG.warn("Trying to unlock a resource that is not locked");
120 124
			return;
121 125
		}
122 126
		lockObject = null;
branches/v2_0_0_prep/libraries/libFMap_controls/src/org/gvsig/fmap/mapcontrol/impl/MapControlDrawer2D.java
29 29

  
30 30
import java.awt.Color;
31 31
import java.awt.Composite;
32
import java.awt.Graphics;
33
import java.awt.Graphics2D;
34 32
import java.awt.Image;
35 33
import java.awt.geom.AffineTransform;
36 34
import java.awt.geom.Point2D;
37 35

  
38
import org.apache.log4j.Logger;
39 36
import org.gvsig.fmap.geom.Geometry;
40 37
import org.gvsig.fmap.geom.GeometryLocator;
41 38
import org.gvsig.fmap.geom.GeometryManager;
......
46 43
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException;
47 44
import org.gvsig.fmap.geom.primitive.Curve;
48 45
import org.gvsig.fmap.geom.primitive.GeneralPathX;
49
import org.gvsig.fmap.mapcontext.MapContext;
50 46
import org.gvsig.fmap.mapcontext.MapContextLocator;
51 47
import org.gvsig.fmap.mapcontext.ViewPort;
52 48
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;

Also available in: Unified diff