Revision 9524 branches/piloto3d/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/FGraphic.java
FGraphic.java | ||
---|---|---|
2 | 2 |
* Created on 19-sep-2005 |
3 | 3 |
* |
4 | 4 |
* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
7 |
*
|
|
7 |
* |
|
8 | 8 |
* This program is free software; you can redistribute it and/or |
9 | 9 |
* modify it under the terms of the GNU General Public License |
10 | 10 |
* as published by the Free Software Foundation; either version 2 |
11 | 11 |
* of the License, or (at your option) any later version. |
12 |
*
|
|
12 |
* |
|
13 | 13 |
* This program is distributed in the hope that it will be useful, |
14 | 14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | 16 |
* GNU General Public License for more details. |
17 |
*
|
|
17 |
* |
|
18 | 18 |
* You should have received a copy of the GNU General Public License |
19 | 19 |
* along with this program; if not, write to the Free Software |
20 | 20 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 |
*
|
|
21 |
* |
|
22 | 22 |
* For more information, contact: |
23 | 23 |
* |
24 | 24 |
* Generalitat Valenciana |
... | ... | |
30 | 30 |
* +34 963862235 |
31 | 31 |
* gvsig@gva.es |
32 | 32 |
* www.gvsig.gva.es |
33 |
*
|
|
33 |
* |
|
34 | 34 |
* or |
35 |
*
|
|
35 |
* |
|
36 | 36 |
* IVER T.I. S.A |
37 | 37 |
* Salamanca 50 |
38 | 38 |
* 46005 Valencia |
39 | 39 |
* Spain |
40 |
*
|
|
40 |
* |
|
41 | 41 |
* +34 963163400 |
42 | 42 |
* dac@iver.es |
43 | 43 |
*/ |
... | ... | |
47 | 47 |
|
48 | 48 |
import com.iver.cit.gvsig.fmap.ViewPort; |
49 | 49 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
50 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol;
|
|
50 |
import com.iver.cit.gvsig.fmap.core.ISymbol;
|
|
51 | 51 |
|
52 | 52 |
public class FGraphic { |
53 | 53 |
int idSymbol; |
54 | 54 |
IGeometry geom; |
55 | 55 |
String tag; |
56 |
|
|
56 |
Object objectTag; |
|
57 |
|
|
57 | 58 |
public FGraphic(IGeometry geom, int idSymbol) |
58 | 59 |
{ |
59 | 60 |
this.idSymbol = idSymbol; |
60 |
this.geom = geom;
|
|
61 |
this.geom = geom; |
|
61 | 62 |
} |
62 | 63 |
|
63 | 64 |
/** |
... | ... | |
101 | 102 |
public void setIdSymbol(int idSymbol) { |
102 | 103 |
this.idSymbol = idSymbol; |
103 | 104 |
} |
104 |
|
|
105 |
|
|
105 | 106 |
/** |
106 | 107 |
* Draws graphic with the assigned symbol. |
107 | 108 |
* Override this method if you need more graphics, like |
... | ... | |
110 | 111 |
* @param viewPort |
111 | 112 |
* @param theSymbol |
112 | 113 |
*/ |
113 |
public void draw(Graphics2D g, ViewPort viewPort, FSymbol theSymbol )
|
|
114 |
public void draw(Graphics2D g, ViewPort viewPort, ISymbol theSymbol )
|
|
114 | 115 |
{ |
115 | 116 |
if (theSymbol.isShapeVisible()) |
116 | 117 |
{ |
117 | 118 |
IGeometry cloneGeom = geom.cloneGeometry(); |
118 | 119 |
cloneGeom.draw(g,viewPort,theSymbol); |
119 |
}
|
|
120 |
} |
|
120 | 121 |
} |
121 | 122 |
|
123 |
public Object getObjectTag() { |
|
124 |
return objectTag; |
|
125 |
} |
|
126 |
|
|
127 |
public void setObjectTag(Object objectTag) { |
|
128 |
this.objectTag = objectTag; |
|
129 |
} |
|
130 |
|
|
122 | 131 |
} |
Also available in: Unified diff