root / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / rendering / VectorialLegend.java @ 10959
History | View | Annotate | Download (4.43 KB)
1 | 1100 | fjp | /* 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 | 322 | fernando | package com.iver.cit.gvsig.fmap.rendering; |
42 | |||
43 | 10627 | caballero | import com.hardcode.gdbms.driver.exceptions.ReadDriverException; |
44 | 470 | fjp | import com.hardcode.gdbms.engine.data.DataSource; |
45 | 10679 | jaume | import com.hardcode.gdbms.engine.data.driver.DriverException; |
46 | 470 | fjp | import com.hardcode.gdbms.engine.instruction.FieldNotFoundException; |
47 | 2183 | fernando | import com.iver.cit.gvsig.fmap.core.IFeature; |
48 | 9641 | jaume | import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
49 | 435 | vcaballero | import com.iver.utiles.XMLEntity; |
50 | |||
51 | |||
52 | /**
|
||
53 | 1034 | vcaballero | * Interfaz de Leyenda Vectorial.
|
54 | 435 | vcaballero | *
|
55 | * @author Vicente Caballero Navarro
|
||
56 | */
|
||
57 | 563 | fernando | public interface VectorialLegend extends Legend { |
58 | 1034 | vcaballero | /**
|
59 | * Inserta el DataSource.
|
||
60 | *
|
||
61 | * @param ds DataSource.
|
||
62 | 10679 | jaume | *
|
63 | 1034 | vcaballero | * @throws FieldNotFoundException cuando el campo no se encuentre.
|
64 | 10679 | jaume | * @throws DriverException Cuando falle el driver.
|
65 | 1034 | vcaballero | */
|
66 | void setDataSource(DataSource ds) |
||
67 | 10627 | caballero | throws FieldNotFoundException, ReadDriverException;
|
68 | 435 | vcaballero | |
69 | 1034 | vcaballero | /**
|
70 | 10679 | jaume | * 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 | 1034 | vcaballero | *
|
74 | 10679 | jaume | * @return ISymbol.
|
75 | 1034 | vcaballero | *
|
76 | 10679 | jaume | * @throws DriverException
|
77 | 1034 | vcaballero | */
|
78 | 10679 | jaume | ISymbol getSymbol(int i) throws ReadDriverException; |
79 | |||
80 | 7659 | fjp | ISymbol getSymbolByFeature(IFeature feat); |
81 | 322 | fernando | |
82 | 1034 | vcaballero | /**
|
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 | 585 | fjp | |
90 | 1034 | vcaballero | /**
|
91 | * Inserta el tipo de shape.
|
||
92 | *
|
||
93 | * @param shapeType Tipo de shape.
|
||
94 | */
|
||
95 | void setShapeType(int shapeType); |
||
96 | 322 | fernando | |
97 | 1034 | vcaballero | /**
|
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 | 10679 | jaume | * @throws IllegalArgumentException, if the symbol isn't suitable for the
|
103 | * layer's data type.
|
||
104 | 1034 | vcaballero | */
|
105 | 10679 | jaume | void setDefaultSymbol(ISymbol s) throws IllegalArgumentException; |
106 | 322 | fernando | |
107 | 1034 | vcaballero | /**
|
108 | * Establece el campo por el que se etiqueta. -1 quita el etiquetado
|
||
109 | *
|
||
110 | * @param fieldName Nombre del campo.
|
||
111 | 10679 | jaume | * @deprecated
|
112 | 1034 | vcaballero | */
|
113 | void setLabelField(String fieldName); |
||
114 | 10679 | jaume | |
115 | 3035 | fjp | /**
|
116 | * @param fieldName
|
||
117 | 10679 | jaume | * @deprecated
|
118 | 3035 | fjp | */
|
119 | void setLabelHeightField(String fieldName); |
||
120 | /**
|
||
121 | * @param fieldName
|
||
122 | 10679 | jaume | * @deprecated
|
123 | 3035 | fjp | */
|
124 | void setLabelRotationField(String fieldName); |
||
125 | 1034 | vcaballero | |
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 | 10679 | jaume | * @deprecated
|
132 | 1034 | vcaballero | */
|
133 | String getLabelField();
|
||
134 | |||
135 | /**
|
||
136 | * Devuelve el alto de campo.
|
||
137 | *
|
||
138 | * @return alto.
|
||
139 | 10679 | jaume | * @deprecated
|
140 | 1034 | vcaballero | */
|
141 | String getLabelHeightField();
|
||
142 | |||
143 | /**
|
||
144 | * Devuelve la rotaci?n.
|
||
145 | *
|
||
146 | * @return Rotaci?n.
|
||
147 | 10679 | jaume | * @deprecated
|
148 | 1034 | vcaballero | */
|
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 | 2183 | fernando | /**
|
166 | * Inserta el XMLEntity.
|
||
167 | *
|
||
168 | * @param xml XMLEntity.
|
||
169 | */
|
||
170 | void setXMLEntity03(XMLEntity xml);
|
||
171 | |||
172 | 10679 | jaume | public boolean isUseDefaultSymbol(); |
173 | |||
174 | 2414 | caballero | void useDefaultSymbol(boolean b); |
175 | 10679 | jaume | |
176 | 2296 | fjp | /**
|
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 | 3268 | fjp | * @return el array con los nombres de los campos usados.
|
181 | * (Por ejemplo para el etiquetado, el campo de clasificaci?n, etc)
|
||
182 | 2296 | fjp | */
|
183 | 3268 | fjp | String[] getUsedFields(); |
184 | 10679 | jaume | |
185 | 322 | fernando | } |