Revision 36197

View differences:

branches/v2_0_0_prep/libraries/libFMap_geometries/pom.xml
96 96
	<build>
97 97
		<sourceDirectory>src</sourceDirectory>
98 98
		<testSourceDirectory>src-test</testSourceDirectory>
99
        <plugins>
100
            <plugin>
101
                <groupId>org.apache.maven.plugins</groupId>
102
                <artifactId>maven-compiler-plugin</artifactId>
103
                <configuration>
104
                    <source>1.4</source>
105
                    <target>1.4</target>
106
                </configuration>
107
            </plugin>        
108
        </plugins>
99 109
	</build>
100 110

  
101 111
	<profiles>
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/GeometryLibrary.java
44 44
 */
45 45
public class GeometryLibrary extends AbstractLibrary {
46 46

  
47
    @Override
48 47
    public void doRegistration() {
49 48
        registerAsAPI(GeometryLibrary.class);
50 49
        require(ToolsLibrary.class);
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/operation/impl/DefaultGeometryOperationLibrary.java
71 71
 */
72 72
public class DefaultGeometryOperationLibrary extends AbstractLibrary  {
73 73

  
74
    @Override
75 74
    public void doRegistration() {
76 75
        registerAsServiceOf(GeometryLibrary.class);
77 76
    }
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/operation/perpendicular/Perpendicular.java
44 44
    private static GeometryManager geomManager = GeometryLocator.getGeometryManager();
45 45
    public static final int CODE = geomManager.getGeometryOperationCode(NAME);
46 46
   
47
    @Override
48 47
    public Object invoke(Geometry geom, GeometryOperationContext ctx)
49 48
        throws GeometryOperationException {
50 49
        Point point1 = (Point)geom;
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/operation/perpendicular/PerpendicularPointOperationContext.java
57 57
    }
58 58
    
59 59
    public double getDistance() {
60
        return (Double) this.getAttribute(DISTANCE);
60
        return ((Double) this.getAttribute(DISTANCE)).doubleValue();
61 61
    }
62 62

  
63 63
    public void setDistance(double distance) {
64
        this.setAttribute(DISTANCE, distance);
64
        this.setAttribute(DISTANCE, Double.valueOf(distance));
65 65
    }
66 66
}
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/operation/perpendicular/PerpendicularPoint.java
47 47
    private static GeometryManager geomManager = GeometryLocator.getGeometryManager();
48 48
    public static final int CODE = geomManager.getGeometryOperationCode(NAME);
49 49
   
50
    @Override
51 50
    public Object invoke(Geometry geom, GeometryOperationContext ctx)
52 51
        throws GeometryOperationException {
53 52
      
54 53
        Point perpendicularPoint = (Point)ctx.getAttribute(PerpendicularPointOperationContext.PERPENDICULAR_POINT); 
55
        double dist = (Double)ctx.getAttribute(PerpendicularPointOperationContext.DISTANCE);
54
        double dist =
55
            ((Double) ctx
56
                .getAttribute(PerpendicularPointOperationContext.DISTANCE))
57
                .doubleValue();
56 58
        
57 59
        try {
58 60
            Point[] p = (Point[])geom.invokeOperation(Perpendicular.CODE, ctx);
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/impl/DefaultGeometryLibrary.java
80 80
 */
81 81
public class DefaultGeometryLibrary extends AbstractLibrary {
82 82

  
83
    @Override
84 83
    public void doRegistration() {
85 84
        registerAsImplementationOf(GeometryLibrary.class);
86 85
    }
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/GeneralPathX.java
242 242
            point.setY(y);
243 243
        } else {      
244 244
            needRoom(1, 2, false);
245
            pointTypes.add(SEG_MOVETO);
245
            pointTypes.add(Byte.valueOf(SEG_MOVETO));
246 246
            addPoint(x, y); 
247 247
        }
248 248
    }
......
254 254
            addPoint(point);
255 255
        } else {      
256 256
            needRoom(1, 2, false);
257
            pointTypes.add(SEG_MOVETO);
257
            pointTypes.add(Byte.valueOf(SEG_MOVETO));
258 258
            addPoint(point); 
259 259
        }
260 260
    }        
......
268 268
     */
269 269
    public synchronized void lineTo(double x, double y) {
270 270
        needRoom(1, 2, true);
271
        pointTypes.add(SEG_LINETO);
271
        pointTypes.add(Byte.valueOf(SEG_LINETO));
272 272
        addPoint(x, y); 
273 273
    }
274 274
    
275 275
    public synchronized void lineTo(Point point) {
276 276
        needRoom(1, 2, true);
277
        pointTypes.add(SEG_LINETO);
277
        pointTypes.add(Byte.valueOf(SEG_LINETO));
278 278
        addPoint(point); 
279 279
    }
280 280

  
281
    @SuppressWarnings("unchecked")
282 281
    private void addPoint(double x, double y){
283 282
        try {
284 283
            pointCoords.add(geomManager.createPoint(x, y, Geometry.SUBTYPES.GEOM2D));
......
287 286
        }  
288 287
    }
289 288

  
290
    @SuppressWarnings("unchecked")
291 289
    private void addPoint(Point point){
292 290
        pointCoords.add(point);       
293 291
    }
......
306 304
     */
307 305
    public synchronized void quadTo(double x1, double y1, double x2, double y2) {
308 306
        needRoom(1, 4, true);
309
        pointTypes.add(SEG_QUADTO);
307
        pointTypes.add(Byte.valueOf(SEG_QUADTO));
310 308
        addPoint(x1, y1);
311 309
        addPoint(x2, y2);
312 310
        isSimple = false;
......
314 312
    
315 313
    public synchronized void quadTo(Point point1, Point point2) {
316 314
        needRoom(1, 4, true);
317
        pointTypes.add(SEG_QUADTO);
315
        pointTypes.add(Byte.valueOf(SEG_QUADTO));
318 316
        addPoint(point1);
319 317
        addPoint(point2);
320 318
        isSimple = false;
......
338 336
        double x2, double y2,
339 337
        double x3, double y3) {
340 338
        needRoom(1, 6, true);
341
        pointTypes.add(SEG_CUBICTO);
339
        pointTypes.add(Byte.valueOf(SEG_CUBICTO));
342 340
        addPoint(x1, y1);
343 341
        addPoint(x2, y2);
344 342
        addPoint(x3, y3);  
......
347 345
    
348 346
    public synchronized void curveTo(Point point1, Point point2, Point point3){       
349 347
        needRoom(1, 6, true);
350
        pointTypes.add(SEG_CUBICTO);
348
        pointTypes.add(Byte.valueOf(SEG_CUBICTO));
351 349
        addPoint(point1);
352 350
        addPoint(point2);
353 351
        addPoint(point3);  
......
364 362
            needRoom(1, 0, true);
365 363
            //Adding a geometry like the last geometry
366 364
            //addPoint(100, 100);
367
            pointTypes.add(SEG_CLOSE);
365
            pointTypes.add(Byte.valueOf(SEG_CLOSE));
368 366
        }
369 367
    }
370 368

  
......
804 802
    }
805 803

  
806 804
    public byte getTypeAt(int index){
807
        return (Byte)pointTypes.get(index);
805
        return ((Byte) pointTypes.get(index)).byteValue();
808 806
    }
809 807

  
810 808
    /** 
......
814 812
    public void setPointTypes(byte[] pointTypes) {
815 813
        this.pointTypes.clear();        
816 814
        for (int i=0 ; i<pointTypes.length ; i++){           
817
            this.pointTypes.add(pointTypes[i]);
815
            this.pointTypes.add(Byte.valueOf(pointTypes[i]));
818 816
        }      
819 817
    }
820 818

  
......
825 823
    public byte[] getPointTypes() {
826 824
        byte[] bytes = new byte[pointTypes.size()];
827 825
        for (int i=0 ; i<pointTypes.size() ; i++){           
828
            bytes[i] = (Byte)pointTypes.get(i);
826
            bytes[i] = ((Byte) pointTypes.get(i)).byteValue();
829 827
        }  
830 828
        return bytes;
831 829
    }

Also available in: Unified diff