Revision 266

View differences:

trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/FMultiPoint2D.java
55 55

  
56 56

  
57 57
    /**
58
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#getType()
59
     */
60
    public int getType() {
61
        return FGeometry.POINT;
62
    }
63

  
64
    /**
65 58
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#toJTSGeometry()
66 59
     */
67 60
    public Geometry toJTSGeometry() {
......
74 67
    public FGeometry[] createLabels(int position, boolean duplicates) {
75 68
        return null;
76 69
    }
77

  
78
    /**
79
     * @see java.awt.Shape#contains(double, double)
80
     */
81
    public boolean contains(double arg0, double arg1) {
82
        return false;
83
    }
84

  
85
    /**
86
     * @see java.awt.Shape#contains(double, double, double, double)
87
     */
88
    public boolean contains(double arg0, double arg1, double arg2, double arg3) {
89
        return false;
90
    }
91

  
92
    /**
93
     * @see java.awt.Shape#intersects(double, double, double, double)
94
     */
95
    public boolean intersects(double arg0, double arg1, double arg2, double arg3) {
96
        return false;
97
    }
98

  
99
    /**
100
     * @see java.awt.Shape#getBounds()
101
     */
102
    public Rectangle getBounds() {
103
        return null;
104
    }
105

  
106
    /**
107
     * @see java.awt.Shape#contains(java.awt.geom.Point2D)
108
     */
109
    public boolean contains(Point2D arg0) {
110
        return false;
111
    }
112

  
113
    /**
114
     * @see java.awt.Shape#getBounds2D()
115
     */
116
    public Rectangle2D getBounds2D() {
117
        return null;
118
    }
119

  
120
    /**
121
     * @see java.awt.Shape#contains(java.awt.geom.Rectangle2D)
122
     */
123
    public boolean contains(Rectangle2D arg0) {
124
        return false;
125
    }
126

  
127
    /**
128
     * @see java.awt.Shape#intersects(java.awt.geom.Rectangle2D)
129
     */
130
    public boolean intersects(Rectangle2D r) {
131
        return false;
132
    }
133

  
134
    /**
135
     * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform)
136
     */
137
    public PathIterator getPathIterator(AffineTransform arg0) {
138
        return null;
139
    }
140

  
141
    /**
142
     * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform,
143
     *      double)
144
     */
145
    public PathIterator getPathIterator(AffineTransform arg0, double arg1) {
146
        return null;
147
    }
148 70
}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/FGeometry.java
17 17
 *
18 18
 * @author $author$
19 19
 */
20
public interface FGeometry extends java.awt.Shape {
20
public interface FGeometry {
21 21
	public static int BEST = 0;
22 22
	public static int N = 1;
23 23
	public static int NE = 2;
......
48 48
	void draw(Graphics2D g, ViewPort vp, Style2D symbol);
49 49

  
50 50
	/**
51
	 * Devuelve el tipo de la geometr?a.
52
	 * 
53
	 * @return DOCUMENT ME!
54
	 */
55
	int getType();
56

  
57
	/**
58 51
	 * Transforma esta Shape en un Geometry de JTS
59 52
	 *
60 53
	 * @return DOCUMENT ME!
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/FMultipoint3D.java
1 1
package com.iver.cit.gvsig.fmap.core;
2 2

  
3
import org.geotools.geometry.Geometry;
4 3

  
5
import org.geotools.renderer.style.Style2D;
6 4

  
7
import com.iver.cit.gvsig.fmap.ViewPort;
8

  
9
import java.awt.Color;
10
import java.awt.Graphics2D;
11
import java.awt.Rectangle;
12
import java.awt.geom.AffineTransform;
13
import java.awt.geom.PathIterator;
14
import java.awt.geom.Point2D;
15
import java.awt.geom.Rectangle2D;
16

  
17

  
18 5
/**
19 6
 * Multipunto 3D.
20 7
 *
21 8
 * @author Vicente Caballero Navarro
22 9
 * 
23 10
 */
24
public class FMultipoint3D implements FGeometry {
25
    double[] x = null;
26
    double[] y = null;
11
public class FMultipoint3D extends FMultiPoint2D {
27 12
    double[] z = null;
28 13

  
29 14
    /**
30 15
     * Crea un nuevo Multipoint3D.
31 16
     */
32 17
    public FMultipoint3D(double[] x,double[] y, double[] z) {
33
    this.x=x;
34
    this.y=y;
35
    this.z=z;
18
    	super(x,y);
19
    	this.z=z;
36 20
    }
37 21

  
38
    /**
39
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#draw(java.awt.Graphics2D,
40
     *      ViewPort, org.geotools.renderer.style.Style2D)
41
     */
42
    public void draw(Graphics2D g, ViewPort vp, Style2D symbol) {
43
    	int size = 2;
44
    	int hw=4;
45
    	for (int i=0;i<x.length;i++){
46
    		java.awt.geom.Point2D.Double p=new java.awt.geom.Point2D.Double(x[i],y[i]);
47
    		vp.getAffineTransform().transform(p,p);
48
    		g.setColor(Color.red);
49
    		g.fillOval((int) p.x - size, (int) p.y - size, (int) hw,
50
    				(int) hw);
51
    		g.setColor(Color.black);
52
    		g.drawOval((int) p.x - size, (int) p.y - size, (int) hw,
53
    				(int) hw);
54
    	}
55
    }
56

  
57

  
58
    /**
59
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#getType()
60
     */
61
    public int getType() {
62
        return 0;
63
    }
64

  
65
    /**
66
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#toJTSGeometry()
67
     */
68
    public Geometry toJTSGeometry() {
69
        return null;
70
    }
71

  
72
    /**
73
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#createLabels(int, boolean)
74
     */
75
    public FGeometry[] createLabels(int position, boolean duplicates) {
76
        return null;
77
    }
78

  
79
    /**
80
     * @see java.awt.Shape#contains(double, double)
81
     */
82
    public boolean contains(double arg0, double arg1) {
83
        return false;
84
    }
85

  
86
    /**
87
     * @see java.awt.Shape#contains(double, double, double, double)
88
     */
89
    public boolean contains(double arg0, double arg1, double arg2, double arg3) {
90
        return false;
91
    }
92

  
93
    /**
94
     * @see java.awt.Shape#intersects(double, double, double, double)
95
     */
96
    public boolean intersects(double arg0, double arg1, double arg2, double arg3) {
97
        return false;
98
    }
99

  
100
    /**
101
     * @see java.awt.Shape#getBounds()
102
     */
103
    public Rectangle getBounds() {
104
        return null;
105
    }
106

  
107
    /**
108
     * @see java.awt.Shape#contains(java.awt.geom.Point2D)
109
     */
110
    public boolean contains(Point2D arg0) {
111
        return false;
112
    }
113

  
114
    /**
115
     * @see java.awt.Shape#getBounds2D()
116
     */
117
    public Rectangle2D getBounds2D() {
118
        return null;
119
    }
120

  
121
    /**
122
     * @see java.awt.Shape#contains(java.awt.geom.Rectangle2D)
123
     */
124
    public boolean contains(Rectangle2D arg0) {
125
        return false;
126
    }
127

  
128
    /**
129
     * @see java.awt.Shape#intersects(java.awt.geom.Rectangle2D)
130
     */
131
    public boolean intersects(Rectangle2D arg0) {
132
        return false;
133
    }
134

  
135
    /**
136
     * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform)
137
     */
138
    public PathIterator getPathIterator(AffineTransform arg0) {
139
        return null;
140
    }
141

  
142
    /**
143
     * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform,
144
     *      double)
145
     */
146
    public PathIterator getPathIterator(AffineTransform arg0, double arg1) {
147
        return null;
148
    }
149 22
}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/FLabel.java
23 23
	}
24 24

  
25 25
	/**
26
	 * @see com.iver.cit.gvsig.fmap.core.FGeometry#print(java.awt.Graphics2D, java.awt.geom.AffineTransform, org.geotools.renderer.style.Style2D, java.awt.geom.Rectangle2D)
27
	 */
28
	public void print(Graphics2D g, AffineTransform mt, Style2D symbol, Rectangle2D extent) {
29
	}
30

  
31
	/**
32
	 * @see com.iver.cit.gvsig.fmap.core.FGeometry#getType()
33
	 */
34
	public int getType() {
35
		return 0;
36
	}
37

  
38
	/**
39 26
	 * @see com.iver.cit.gvsig.fmap.core.FGeometry#toJTSGeometry()
40 27
	 */
41 28
	public Geometry toJTSGeometry() {
......
49 36
		return null;
50 37
	}
51 38

  
52
	/**
53
	 * @see java.awt.Shape#contains(double, double)
54
	 */
55
	public boolean contains(double x, double y) {
56
		return false;
57
	}
58

  
59
	/**
60
	 * @see java.awt.Shape#contains(double, double, double, double)
61
	 */
62
	public boolean contains(double x, double y, double w, double h) {
63
		return false;
64
	}
65

  
66
	/**
67
	 * @see java.awt.Shape#intersects(double, double, double, double)
68
	 */
69
	public boolean intersects(double x, double y, double w, double h) {
70
		return false;
71
	}
72

  
73
	/**
74
	 * @see java.awt.Shape#getBounds()
75
	 */
76
	public Rectangle getBounds() {
77
		return null;
78
	}
79

  
80
	/**
81
	 * @see java.awt.Shape#contains(java.awt.geom.Point2D)
82
	 */
83
	public boolean contains(Point2D p) {
84
		return false;
85
	}
86

  
87
	/**
88
	 * @see java.awt.Shape#getBounds2D()
89
	 */
90
	public Rectangle2D getBounds2D() {
91
		return null;
92
	}
93

  
94
	/**
95
	 * @see java.awt.Shape#contains(java.awt.geom.Rectangle2D)
96
	 */
97
	public boolean contains(Rectangle2D r) {
98
		return false;
99
	}
100

  
101
	/**
102
	 * @see java.awt.Shape#intersects(java.awt.geom.Rectangle2D)
103
	 */
104
	public boolean intersects(Rectangle2D r) {
105
		return false;
106
	}
107

  
108
	/**
109
	 * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform)
110
	 */
111
	public PathIterator getPathIterator(AffineTransform at) {
112
		return null;
113
	}
114

  
115
	/**
116
	 * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform, double)
117
	 */
118
	public PathIterator getPathIterator(AffineTransform at, double flatness) {
119
		return null;
120
	}
121 39
}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/FPoint2D.java
57 57

  
58 58

  
59 59
    /**
60
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#getType()
61
     */
62
    public int getType() {
63
        return FGeometry.POINT;
64
    }
65

  
66
    /**
67 60
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#toJTSGeometry()
68 61
     */
69 62
    public Geometry toJTSGeometry() {
......
77 70
        return null;
78 71
    }
79 72

  
80
    /**
81
     * @see java.awt.Shape#contains(double, double)
82
     */
83
    public boolean contains(double x, double y) {
84
        return false;
85
    }
86

  
87
    /**
88
     * @see java.awt.Shape#contains(double, double, double, double)
89
     */
90
    public boolean contains(double x, double y, double w, double h) {
91
        return false;
92
    }
93

  
94
    /**
95
     * @see java.awt.Shape#intersects(double, double, double, double)
96
     */
97
    public boolean intersects(double x, double y, double w, double h) {
98
        return false;
99
    }
100

  
101
    /**
102
     * @see java.awt.Shape#getBounds()
103
     */
104
    public Rectangle getBounds() {
105
        return null;
106
    }
107

  
108
    /**
109
     * @see java.awt.Shape#contains(java.awt.geom.Point2D)
110
     */
111
    public boolean contains(java.awt.geom.Point2D p) {
112
        return false;
113
    }
114

  
115
    /**
116
     * @see java.awt.Shape#getBounds2D()
117
     */
118
    public Rectangle2D getBounds2D() {
119
        return null;
120
    }
121

  
122
    /**
123
     * @see java.awt.Shape#contains(java.awt.geom.Rectangle2D)
124
     */
125
    public boolean contains(Rectangle2D r) {
126
        return false;
127
    }
128

  
129
    /**
130
     * @see java.awt.Shape#intersects(java.awt.geom.Rectangle2D)
131
     */
132
    public boolean intersects(Rectangle2D r) {
133
        return r.contains(x,y);
134
    }
135

  
136
    /**
137
     * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform)
138
     */
139
    public PathIterator getPathIterator(AffineTransform at) {
140
        return null;
141
    }
142

  
143
    /**
144
     * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform,
145
     *      double)
146
     */
147
    public PathIterator getPathIterator(AffineTransform at, double flatness) {
148
        return null;
149
    }
150 73
}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/FPoint3D.java
27 27
		this.z=z;
28 28
	}
29 29
	
30
	/**
31
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#draw(java.awt.Graphics2D,
32
     *      ViewPort, org.geotools.renderer.style.Style2D)
33
     */
34
    public void draw(Graphics2D g, ViewPort vp, Style2D symbol) {
35
    	int size = 2;
36
    	int hw=4;
37
    	java.awt.geom.Point2D.Double p=new java.awt.geom.Point2D.Double(x,y);
38
    	vp.getAffineTransform().transform(p,p);
39
    	g.setColor(Color.red);
40
        g.fillOval((int) p.x - size, (int) p.y - size, (int) hw,
41
            (int) hw);
42
        g.setColor(Color.black);
43
        g.drawOval((int) p.x - size, (int) p.y - size, (int) hw,
44
            (int) hw);
45
    	
46
    }
47

  
48

  
49
    /**
50
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#getType()
51
     */
52
    public int getType() {
53
        return FGeometry.POINT;
54
    }
55

  
56
    /**
57
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#toJTSGeometry()
58
     */
59
    public Geometry toJTSGeometry() {
60
        return null;
61
    }
62

  
63
    /**
64
     * @see com.iver.cit.gvsig.fmap.core.FGeometry#createLabels(int, boolean)
65
     */
66
    public FGeometry[] createLabels(int position, boolean duplicates) {
67
        return null;
68
    }
69

  
70
    /**
71
     * @see java.awt.Shape#contains(double, double)
72
     */
73
    public boolean contains(double arg0, double arg1) {
74
        return false;
75
    }
76

  
77
    /**
78
     * @see java.awt.Shape#contains(double, double, double, double)
79
     */
80
    public boolean contains(double arg0, double arg1, double arg2, double arg3) {
81
        return false;
82
    }
83

  
84
    /**
85
     * @see java.awt.Shape#intersects(double, double, double, double)
86
     */
87
    public boolean intersects(double arg0, double arg1, double arg2, double arg3) {
88
        return false;
89
    }
90

  
91
    /**
92
     * @see java.awt.Shape#getBounds()
93
     */
94
    public Rectangle getBounds() {
95
        return null;
96
    }
97

  
98
    /**
99
     * @see java.awt.Shape#contains(java.awt.geom.Point2D)
100
     */
101
    public boolean contains(FPoint2D arg0) {
102
        return false;
103
    }
104

  
105
    /**
106
     * @see java.awt.Shape#getBounds2D()
107
     */
108
    public Rectangle2D getBounds2D() {
109
        return null;
110
    }
111

  
112
    /**
113
     * @see java.awt.Shape#contains(java.awt.geom.Rectangle2D)
114
     */
115
    public boolean contains(Rectangle2D arg0) {
116
        return false;
117
    }
118

  
119
    /**
120
     * @see java.awt.Shape#intersects(java.awt.geom.Rectangle2D)
121
     */
122
    public boolean intersects(Rectangle2D r) {
123
        return r.contains(x,y);
124
    }
125

  
126
    /**
127
     * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform)
128
     */
129
    public PathIterator getPathIterator(AffineTransform arg0) {
130
        return null;
131
    }
132

  
133
    /**
134
     * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform,
135
     *      double)
136
     */
137
    public PathIterator getPathIterator(AffineTransform arg0, double arg1) {
138
        return null;
139
    }
140 30
}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/FPolyline2D.java
1 1
package com.iver.cit.gvsig.fmap.core;
2 2

  
3
import java.awt.Color;
4 3
import java.awt.Graphics2D;
5
import java.awt.Rectangle;
6
import java.awt.geom.AffineTransform;
7
import java.awt.geom.PathIterator;
8
import java.awt.geom.Point2D;
9
import java.awt.geom.Rectangle2D;
10 4

  
11 5
import org.geotools.geometry.Geometry;
12 6
import org.geotools.renderer.style.LineStyle2D;
......
16 10

  
17 11

  
18 12

  
19
public class FPolyline2D implements FGeometry{
13
public class FPolyline2D implements FGeometry {
20 14
	protected GeneralPathX gp;
21 15

  
22
	public FPolyline2D(GeneralPathX gpx){
16
	public FPolyline2D(GeneralPathX gpx) {
23 17
		gp = gpx;
24 18
	}
25 19

  
......
46 40
	}
47 41

  
48 42

  
49
	/**
50
	 * @see com.iver.cit.gvsig.fmap.core.FGeometry#getType()
51
	 */
52
	public int getType() {
53
		return FGeometry.LINE;
54
	}
55 43

  
56 44
	/**
57 45
	 * @see com.iver.cit.gvsig.fmap.core.FGeometry#createLabels(int, boolean)
......
61 49
	}
62 50

  
63 51
	/**
64
	 * @see java.awt.Shape#contains(double, double)
65
	 */
66
	public boolean contains(double x, double y) {
67
		return gp.contains(x, y);
68
	}
69

  
70
	/**
71
	 * @see java.awt.Shape#contains(double, double, double, double)
72
	 */
73
	public boolean contains(double x, double y, double w, double h) {
74
		return gp.contains(x, y, w, h);
75
	}
76

  
77
	/**
78
	 * @see java.awt.Shape#intersects(double, double, double, double)
79
	 */
80
	public boolean intersects(double x, double y, double w, double h) {
81
		return gp.intersects(x, y, w, h);
82
	}
83

  
84
	/**
85
	 * @see java.awt.Shape#getBounds()
86
	 */
87
	public Rectangle getBounds() {
88
		return gp.getBounds();
89
	}
90

  
91
	/**
92
	 * @see java.awt.Shape#contains(java.awt.geom.Point2D)
93
	 */
94
	public boolean contains(Point2D p) {
95
		return gp.contains(p);
96
	}
97

  
98
	/**
99
	 * @see java.awt.Shape#getBounds2D()
100
	 */
101
	public Rectangle2D getBounds2D() {
102
		return gp.getBounds2D();
103
	}
104

  
105
	/**
106
	 * @see java.awt.Shape#contains(java.awt.geom.Rectangle2D)
107
	 */
108
	public boolean contains(Rectangle2D r) {
109
		return gp.contains(r);
110
	}
111

  
112
	/**
113
	 * @see java.awt.Shape#intersects(java.awt.geom.Rectangle2D)
114
	 */
115
	public boolean intersects(Rectangle2D r) {
116
		return gp.intersects(r);
117
	}
118

  
119
	/**
120
	 * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform)
121
	 */
122
	public PathIterator getPathIterator(AffineTransform at) {
123
		return gp.getPathIterator(at);
124
	}
125

  
126
	/**
127
	 * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform, double)
128
	 */
129
	public PathIterator getPathIterator(AffineTransform at, double flatness) {
130
		return gp.getPathIterator(at, flatness);
131
	}
132

  
133
	/**
134 52
	 * @see com.iver.cit.gvsig.fmap.core.FGeometry#toJTSGeometry()
135 53
	 */
136 54
	public Geometry toJTSGeometry() {
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/FNullGeometry.java
24 24

  
25 25

  
26 26
	/**
27
	 * @see com.iver.cit.gvsig.fmap.core.FGeometry#getType()
28
	 */
29
	public int getType() {
30
		return 0;
31
	}
32

  
33
	/**
34 27
	 * @see com.iver.cit.gvsig.fmap.core.FGeometry#toJTSGeometry()
35 28
	 */
36 29
	public Geometry toJTSGeometry() {
......
44 37
		return null;
45 38
	}
46 39

  
47
	/**
48
	 * @see java.awt.Shape#contains(double, double)
49
	 */
50
	public boolean contains(double x, double y) {
51
		return false;
52
	}
53

  
54
	/**
55
	 * @see java.awt.Shape#contains(double, double, double, double)
56
	 */
57
	public boolean contains(double x, double y, double w, double h) {
58
		return false;
59
	}
60

  
61
	/**
62
	 * @see java.awt.Shape#intersects(double, double, double, double)
63
	 */
64
	public boolean intersects(double x, double y, double w, double h) {
65
		return false;
66
	}
67

  
68
	/**
69
	 * @see java.awt.Shape#getBounds()
70
	 */
71
	public Rectangle getBounds() {
72
		return null;
73
	}
74

  
75
	/**
76
	 * @see java.awt.Shape#contains(java.awt.geom.Point2D)
77
	 */
78
	public boolean contains(Point2D p) {
79
		return false;
80
	}
81

  
82
	/**
83
	 * @see java.awt.Shape#getBounds2D()
84
	 */
85
	public Rectangle2D getBounds2D() {
86
		return null;
87
	}
88

  
89
	/**
90
	 * @see java.awt.Shape#contains(java.awt.geom.Rectangle2D)
91
	 */
92
	public boolean contains(Rectangle2D r) {
93
		return false;
94
	}
95

  
96
	/**
97
	 * @see java.awt.Shape#intersects(java.awt.geom.Rectangle2D)
98
	 */
99
	public boolean intersects(Rectangle2D r) {
100
		return false;
101
	}
102

  
103
	/**
104
	 * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform)
105
	 */
106
	public PathIterator getPathIterator(AffineTransform at) {
107
		return null;
108
	}
109

  
110
	/**
111
	 * @see java.awt.Shape#getPathIterator(java.awt.geom.AffineTransform, double)
112
	 */
113
	public PathIterator getPathIterator(AffineTransform at, double flatness) {
114
		return null;
115
	}
116 40
}

Also available in: Unified diff