root / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / rendering / IVectorialLegend.java @ 11558
History | View | Annotate | Download (4.43 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*
|
19 |
* For more information, contact:
|
20 |
*
|
21 |
* Generalitat Valenciana
|
22 |
* Conselleria d'Infraestructures i Transport
|
23 |
* Av. Blasco Ib??ez, 50
|
24 |
* 46010 VALENCIA
|
25 |
* SPAIN
|
26 |
*
|
27 |
* +34 963862235
|
28 |
* gvsig@gva.es
|
29 |
* www.gvsig.gva.es
|
30 |
*
|
31 |
* or
|
32 |
*
|
33 |
* IVER T.I. S.A
|
34 |
* Salamanca 50
|
35 |
* 46005 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963163400
|
39 |
* dac@iver.es
|
40 |
*/
|
41 |
package com.iver.cit.gvsig.fmap.rendering; |
42 |
|
43 |
import com.hardcode.gdbms.driver.exceptions.ReadDriverException; |
44 |
import com.hardcode.gdbms.engine.data.DataSource; |
45 |
import com.hardcode.gdbms.engine.data.driver.DriverException; |
46 |
import com.hardcode.gdbms.engine.instruction.FieldNotFoundException; |
47 |
import com.iver.cit.gvsig.fmap.core.IFeature; |
48 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
49 |
import com.iver.utiles.XMLEntity; |
50 |
|
51 |
|
52 |
/**
|
53 |
* Interfaz de Leyenda Vectorial.
|
54 |
*
|
55 |
* @author Vicente Caballero Navarro
|
56 |
*/
|
57 |
public interface IVectorialLegend extends ILegend { |
58 |
/**
|
59 |
* Inserta el DataSource.
|
60 |
*
|
61 |
* @param ds DataSource.
|
62 |
*
|
63 |
* @throws FieldNotFoundException cuando el campo no se encuentre.
|
64 |
* @throws DriverException Cuando falle el driver.
|
65 |
*/
|
66 |
void setDataSource(DataSource ds) |
67 |
throws FieldNotFoundException, ReadDriverException;
|
68 |
|
69 |
/**
|
70 |
* Returns the symbol to be used to represent the feature in the i-th
|
71 |
* record in the DataSource
|
72 |
* @param i, the record index
|
73 |
*
|
74 |
* @return ISymbol.
|
75 |
*
|
76 |
* @throws DriverException
|
77 |
*/
|
78 |
ISymbol getSymbol(int i) throws ReadDriverException; |
79 |
|
80 |
ISymbol getSymbolByFeature(IFeature feat); |
81 |
|
82 |
/**
|
83 |
* Devuelve el tipo de shape.
|
84 |
*
|
85 |
* @return Devuelve el tipo de shapes para los que est? preparada la
|
86 |
* leyenda
|
87 |
*/
|
88 |
int getShapeType();
|
89 |
|
90 |
/**
|
91 |
* Inserta el tipo de shape.
|
92 |
*
|
93 |
* @param shapeType Tipo de shape.
|
94 |
*/
|
95 |
void setShapeType(int shapeType); |
96 |
|
97 |
/**
|
98 |
* Establece el s?mbolo por defecto del Legend. En un Legend de s?mbolo
|
99 |
* ?nico, el s?mbolo se establece invocando este m?todo
|
100 |
*
|
101 |
* @param s S?mbolo por defecto.
|
102 |
* @throws IllegalArgumentException, if the symbol isn't suitable for the
|
103 |
* layer's data type.
|
104 |
*/
|
105 |
void setDefaultSymbol(ISymbol s) throws IllegalArgumentException; |
106 |
|
107 |
/**
|
108 |
* Establece el campo por el que se etiqueta. -1 quita el etiquetado
|
109 |
*
|
110 |
* @param fieldName Nombre del campo.
|
111 |
* @deprecated
|
112 |
*/
|
113 |
void setLabelField(String fieldName); |
114 |
|
115 |
/**
|
116 |
* @param fieldName
|
117 |
* @deprecated
|
118 |
*/
|
119 |
void setLabelHeightField(String fieldName); |
120 |
/**
|
121 |
* @param fieldName
|
122 |
* @deprecated
|
123 |
*/
|
124 |
void setLabelRotationField(String fieldName); |
125 |
|
126 |
/**
|
127 |
* Obtiene el ?ndice del campo que sirve de etiquetado o -1 si no ha sido
|
128 |
* etiquetado
|
129 |
*
|
130 |
* @return nombre del campo.
|
131 |
* @deprecated
|
132 |
*/
|
133 |
String getLabelField();
|
134 |
|
135 |
/**
|
136 |
* Devuelve el alto de campo.
|
137 |
*
|
138 |
* @return alto.
|
139 |
* @deprecated
|
140 |
*/
|
141 |
String getLabelHeightField();
|
142 |
|
143 |
/**
|
144 |
* Devuelve la rotaci?n.
|
145 |
*
|
146 |
* @return Rotaci?n.
|
147 |
* @deprecated
|
148 |
*/
|
149 |
String getLabelRotationField();
|
150 |
|
151 |
/**
|
152 |
* Devuelve el XMLEntity.
|
153 |
*
|
154 |
* @return XMLEntity.
|
155 |
*/
|
156 |
XMLEntity getXMLEntity(); |
157 |
|
158 |
/**
|
159 |
* Inserta el XMLEntity.
|
160 |
*
|
161 |
* @param xml XMLEntity.
|
162 |
*/
|
163 |
void setXMLEntity(XMLEntity xml);
|
164 |
|
165 |
/**
|
166 |
* Inserta el XMLEntity.
|
167 |
*
|
168 |
* @param xml XMLEntity.
|
169 |
*/
|
170 |
void setXMLEntity03(XMLEntity xml);
|
171 |
|
172 |
public boolean isUseDefaultSymbol(); |
173 |
|
174 |
void useDefaultSymbol(boolean b); |
175 |
|
176 |
/**
|
177 |
* Se usa para saber antes de dibujar, los campos que vamos
|
178 |
* a necesitar leer, y leer solo estos. Acelera el dibujado
|
179 |
* bastante, sobre todo en bases de datos espaciales.
|
180 |
* @return el array con los nombres de los campos usados.
|
181 |
* (Por ejemplo para el etiquetado, el campo de clasificaci?n, etc)
|
182 |
*/
|
183 |
String[] getUsedFields(); |
184 |
|
185 |
} |