root / branches / v2_0_0_prep / libraries / libFMap_mapcontext / src / org / gvsig / fmap / mapcontext / rendering / legend / IVectorLegend.java @ 29973
History | View | Annotate | Download (3.53 KB)
1 | 21200 | vcaballero | /* 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 org.gvsig.fmap.mapcontext.rendering.legend; |
||
42 | |||
43 | 24691 | vcaballero | import org.gvsig.fmap.dal.exception.DataException; |
44 | 24494 | jmvivo | import org.gvsig.fmap.dal.feature.Feature; |
45 | import org.gvsig.fmap.dal.feature.FeatureStore; |
||
46 | 21200 | vcaballero | import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
47 | 29631 | jpiera | import org.gvsig.utils.XMLEntity; |
48 | 21200 | vcaballero | |
49 | |||
50 | |||
51 | /**
|
||
52 | * Interface of a vectorial legend.
|
||
53 | *
|
||
54 | * @author Vicente Caballero Navarro
|
||
55 | */
|
||
56 | public interface IVectorLegend extends ILegend { |
||
57 | /**
|
||
58 | * Inserts the DataSource.
|
||
59 | *
|
||
60 | * @param ds DataSource.
|
||
61 | 24691 | vcaballero | * @throws DataException TODO
|
62 | 21200 | vcaballero | * @throws FieldNotFoundException when the field is not found.
|
63 | * @throws DriverException When the driver fails.
|
||
64 | */
|
||
65 | void setFeatureStore(FeatureStore fs)
|
||
66 | 24691 | vcaballero | throws DataException;
|
67 | 21200 | vcaballero | |
68 | /**
|
||
69 | * Returns the symbol to be used to represent the feature in the i-th
|
||
70 | * record in the DataSource
|
||
71 | * @param i, the record index
|
||
72 | *
|
||
73 | * @return ISymbol.
|
||
74 | *
|
||
75 | * @throws DriverException
|
||
76 | */
|
||
77 | // ISymbol getSymbol(int i) throws ReadException;
|
||
78 | 22751 | vcaballero | /**
|
79 | * Returns a symbol starting from an IFeature.
|
||
80 | *
|
||
81 | * TAKE CARE!! When we are using a feature iterator as a database
|
||
82 | * the only field that will be filled is the fieldID.
|
||
83 | * The rest of fields will be null to reduce the time of creation
|
||
84 | *
|
||
85 | * @param feat IFeature.
|
||
86 | *
|
||
87 | * @return S?mbolo.
|
||
88 | */
|
||
89 | 21200 | vcaballero | ISymbol getSymbolByFeature(Feature feat); |
90 | |||
91 | /**
|
||
92 | * Returns the type of the shape.
|
||
93 | *
|
||
94 | * @return Returns the type of the shapes that the legend is ready to use.
|
||
95 | *
|
||
96 | */
|
||
97 | int getShapeType();
|
||
98 | |||
99 | /**
|
||
100 | * Defines the type of the shape.
|
||
101 | *
|
||
102 | * @param shapeType type of the shape.
|
||
103 | */
|
||
104 | void setShapeType(int shapeType); |
||
105 | |||
106 | /**
|
||
107 | * Establishes the default symbol of a legend. In a SingleSymbolLegend the symbol
|
||
108 | * is established by calling this method.
|
||
109 | *
|
||
110 | * @param s default symbol.
|
||
111 | * @throws IllegalArgumentException, if the symbol isn't suitable for the
|
||
112 | * layer's data type.
|
||
113 | */
|
||
114 | void setDefaultSymbol(ISymbol s) throws IllegalArgumentException; |
||
115 | |||
116 | /**
|
||
117 | * Returns true or false depending on if the rest of values are used.
|
||
118 | *
|
||
119 | * @return True if the rest of values are used.
|
||
120 | */
|
||
121 | public boolean isUseDefaultSymbol(); |
||
122 | |||
123 | void useDefaultSymbol(boolean b); |
||
124 | |||
125 | public ZSort getZSort();
|
||
126 | |||
127 | public void setZSort(ZSort zSort); |
||
128 | |||
129 | public boolean isSuitableForShapeType(int shapeType); |
||
130 | |||
131 | } |