Statistics
| Revision:

root / branches / Mobile_Compatible_Hito_1 / libFMap / src / es / prodevelop / gvsig / mobile / fmap / legend / VectorialLegend.java @ 21606

History | View | Annotate | Download (4.7 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
/************************************************
42
 *                                                                                                *
43
 *   Modfied By:                                                                *
44
 *   Prodevelop Integraci?n de Tecnolog?as SL        *
45
 *   Conde Salvatierra de ?lava , 34-10                        *
46
 *   46004 Valencia                                                                *
47
 *   Spain                                                                                *
48
 *                                                                                                *
49
 *   +34 963 510 612                                                        *
50
 *   +34 963 510 968                                                        *
51
 *   gis@prodevelop.es                                                        *
52
 *   http://www.prodevelop.es                                        *
53
 *                                                                                                *
54
 *   gvSIG Mobile Team 2006                                         *
55
 *                                                                                          *         
56
 ************************************************/
57

    
58
package es.prodevelop.gvsig.mobile.fmap.legend;
59

    
60
import com.hardcode.gdbms.engine.data.DataSource;
61
import com.hardcode.gdbms.engine.instruction.FieldNotFoundException;
62

    
63
import es.prodevelop.gvsig.mobile.fmap.core.IFeature;
64
import es.prodevelop.gvsig.mobile.fmap.driver.FMapDriverException;
65
import es.prodevelop.gvsig.mobile.fmap.symbol.FSymbol;
66
//import es.prodevelop.gvsig.mobile.fmap.util.xml.XMLEntity;
67

    
68

    
69

    
70
/**
71
 * Interfaz de Leyenda Vectorial.
72
 *
73
 * @author Vicente Caballero Navarro
74
 */
75
public interface VectorialLegend extends Legend {
76
        /**
77
         * Inserta el DataSource.
78
         *
79
         * @param ds DataSource.
80
         *
81
         * @throws FieldNotFoundException cuando el campo no se encuentre.
82
         * @throws FMapDriverException Cuando falle el driver.
83
         */
84
        void setDataSource(DataSource ds)
85
                throws FieldNotFoundException, FMapDriverException;
86

    
87
        /**
88
         * Devuelve el s?mbolo asociado al objeto que se pasa como par?metro. Si se
89
         * pasa null se devuelve el s?mbolo por defecto. En un Legend de s?mbolo
90
         * ?nico siempre se devuelve dicho s?mbolo
91
         *
92
         * @param recordIndex ?ndice
93
         *
94
         * @return S?mbolo.
95
         *
96
         * @throws FMapDriverException
97
         */
98
        FSymbol getSymbol(int recordIndex) throws FMapDriverException;
99
    
100
    FSymbol getSymbolByFeature(IFeature feat);
101

    
102
        /**
103
         * Devuelve el tipo de shape.
104
         *
105
         * @return Devuelve el tipo de shapes para los que est? preparada la
106
         *                    leyenda
107
         */
108
        int getShapeType();
109

    
110
        /**
111
         * Inserta el tipo de shape.
112
         *
113
         * @param shapeType Tipo de shape.
114
         */
115
        void setShapeType(int shapeType);
116

    
117
        /**
118
         * Establece el s?mbolo por defecto del Legend. En un Legend de s?mbolo
119
         * ?nico, el s?mbolo se establece invocando este m?todo
120
         *
121
         * @param s S?mbolo por defecto.
122
         */
123
        void setDefaultSymbol(FSymbol s);
124

    
125
        /**
126
         * Establece el campo por el que se etiqueta. -1 quita el etiquetado
127
         *
128
         * @param fieldName Nombre del campo.
129
         */
130
        void setLabelField(String fieldName);
131
    
132
    /**
133
     * @param fieldName
134
     */
135
    void setLabelHeightField(String fieldName);
136
    /**
137
     * @param fieldName
138
     */
139
    void setLabelRotationField(String fieldName);
140

    
141
        /**
142
         * Obtiene el ?ndice del campo que sirve de etiquetado o -1 si no ha sido
143
         * etiquetado
144
         *
145
         * @return nombre del campo.
146
         */
147
        String getLabelField();
148

    
149
        /**
150
         * Devuelve el alto de campo.
151
         *
152
         * @return alto.
153
         */
154
        String getLabelHeightField();
155

    
156
        /**
157
         * Devuelve la rotaci?n.
158
         *
159
         * @return Rotaci?n.
160
         */
161
        String getLabelRotationField();
162

    
163
    void useDefaultSymbol(boolean b);
164
    /* public boolean isBWithHeightText();
165
        public void setBWithHeightText(boolean withHeightText); */
166
        /*
167
         * supplierCardinality 0..*
168
         *
169
               /*# FInterval lnkFInterval; */
170
        /*supplierCardinality 0..*
171
         *
172
               private LegendListener[] listeners;*/
173
    
174
    /**
175
     * Se usa para saber antes de dibujar, los campos que vamos
176
     * a necesitar leer, y leer solo estos. Acelera el dibujado
177
     * bastante, sobre todo en bases de datos espaciales.
178
     * @return el array con los nombres de los campos usados.
179
     * (Por ejemplo para el etiquetado, el campo de clasificaci?n, etc)
180
     */
181
    String[] getUsedFields();
182
}