root / branches / v2_0_0_prep / libraries / libFMap_mapcontext / src / org / gvsig / fmap / mapcontext / MapContextManager.java @ 31544
History | View | Annotate | Download (8.67 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2009 {DiSiD Technologies} {Create Manager to register MapContextDrawer implementation}
|
26 |
*/
|
27 |
package org.gvsig.fmap.mapcontext; |
28 |
|
29 |
import java.awt.Color; |
30 |
import java.awt.Font; |
31 |
|
32 |
import org.cresques.cts.IProjection; |
33 |
import org.gvsig.fmap.mapcontext.layers.vectorial.GraphicLayer; |
34 |
import org.gvsig.fmap.mapcontext.rendering.legend.ILegend; |
35 |
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend; |
36 |
import org.gvsig.fmap.mapcontext.rendering.legend.driver.ILegendReader; |
37 |
import org.gvsig.fmap.mapcontext.rendering.legend.driver.ILegendWriter; |
38 |
import org.gvsig.fmap.mapcontext.rendering.symbols.IMultiLayerSymbol; |
39 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
40 |
import org.gvsig.fmap.mapcontext.rendering.symbols.IWarningSymbol; |
41 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolManager; |
42 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolPreferences; |
43 |
|
44 |
/**
|
45 |
* Manager of the MapContext library.
|
46 |
*
|
47 |
* Holds the default implementation of the {@link MapContextDrawer}.
|
48 |
*
|
49 |
* @author <a href="mailto:cordinyana@gvsig.org">C?sar Ordi?ana</a>
|
50 |
*/
|
51 |
public interface MapContextManager { |
52 |
|
53 |
/**
|
54 |
* @deprecated to be removed in gvSIG 2.0
|
55 |
* @see {@link SymbolPreferences}.
|
56 |
*/
|
57 |
int getDefaultCartographicSupportMeasureUnit();
|
58 |
|
59 |
/**
|
60 |
* @deprecated to be removed in gvSIG 2.0
|
61 |
* @see {@link SymbolPreferences}.
|
62 |
*/
|
63 |
void setDefaultCartographicSupportMeasureUnit(
|
64 |
int defaultCartographicSupportMeasureUnit);
|
65 |
|
66 |
/**
|
67 |
* @deprecated to be removed in gvSIG 2.0
|
68 |
* @see {@link SymbolPreferences}.
|
69 |
*/
|
70 |
int getDefaultCartographicSupportReferenceSystem();
|
71 |
|
72 |
/**
|
73 |
* @deprecated to be removed in gvSIG 2.0
|
74 |
* @see {@link SymbolPreferences}.
|
75 |
*/
|
76 |
void setDefaultCartographicSupportReferenceSystem(
|
77 |
int defaultCartographicSupportReferenceSystem);
|
78 |
|
79 |
/**
|
80 |
* @deprecated to be removed in gvSIG 2.0
|
81 |
* @see {@link SymbolPreferences}.
|
82 |
*/
|
83 |
Color getDefaultSymbolColor();
|
84 |
|
85 |
/**
|
86 |
* @deprecated to be removed in gvSIG 2.0
|
87 |
* @see {@link SymbolPreferences}.
|
88 |
*/
|
89 |
void setDefaultSymbolColor(Color defaultSymbolColor); |
90 |
|
91 |
/**
|
92 |
* @deprecated to be removed in gvSIG 2.0
|
93 |
* @see {@link SymbolPreferences}.
|
94 |
*/
|
95 |
void resetDefaultSymbolColor();
|
96 |
|
97 |
/**
|
98 |
* @deprecated to be removed in gvSIG 2.0
|
99 |
* @see {@link SymbolPreferences}.
|
100 |
*/
|
101 |
Color getDefaultSymbolFillColor();
|
102 |
|
103 |
/**
|
104 |
* @deprecated to be removed in gvSIG 2.0
|
105 |
* @see {@link SymbolPreferences}.
|
106 |
*/
|
107 |
void setDefaultSymbolFillColor(Color defaultSymbolFillColor); |
108 |
|
109 |
/**
|
110 |
* @deprecated to be removed in gvSIG 2.0
|
111 |
* @see {@link SymbolPreferences}.
|
112 |
*/
|
113 |
void resetDefaultSymbolFillColor();
|
114 |
|
115 |
/**
|
116 |
* @deprecated to be removed in gvSIG 2.0
|
117 |
* @see {@link SymbolPreferences}.
|
118 |
*/
|
119 |
boolean isDefaultSymbolFillColorAleatory();
|
120 |
|
121 |
/**
|
122 |
* @deprecated to be removed in gvSIG 2.0
|
123 |
* @see {@link SymbolPreferences}.
|
124 |
*/
|
125 |
void setDefaultSymbolFillColorAleatory(
|
126 |
boolean defaultSymbolFillColorAleatory);
|
127 |
|
128 |
/**
|
129 |
* @deprecated to be removed in gvSIG 2.0
|
130 |
* @see {@link SymbolPreferences}.
|
131 |
*/
|
132 |
void resetDefaultSymbolFillColorAleatory();
|
133 |
|
134 |
/**
|
135 |
* @deprecated to be removed in gvSIG 2.0
|
136 |
* @see {@link SymbolPreferences}.
|
137 |
*/
|
138 |
Font getDefaultSymbolFont();
|
139 |
|
140 |
/**
|
141 |
* @deprecated to be removed in gvSIG 2.0
|
142 |
* @see {@link SymbolPreferences}.
|
143 |
*/
|
144 |
void setDefaultSymbolFont(Font defaultSymbolFont); |
145 |
|
146 |
/**
|
147 |
* @deprecated to be removed in gvSIG 2.0
|
148 |
* @see {@link SymbolPreferences}.
|
149 |
*/
|
150 |
void resetDefaultSymbolFont();
|
151 |
|
152 |
/**
|
153 |
* @deprecated to be removed in gvSIG 2.0
|
154 |
* @see {@link SymbolPreferences}.
|
155 |
*/
|
156 |
String getSymbolLibraryPath();
|
157 |
|
158 |
/**
|
159 |
* @deprecated to be removed in gvSIG 2.0
|
160 |
* @see {@link SymbolPreferences}.
|
161 |
*/
|
162 |
void setSymbolLibraryPath(String symbolLibraryPath); |
163 |
|
164 |
/**
|
165 |
* @deprecated to be removed in gvSIG 2.0
|
166 |
* @see {@link SymbolPreferences}.
|
167 |
*/
|
168 |
void resetSymbolLibraryPath();
|
169 |
|
170 |
/**
|
171 |
* Sets the class to use as the default implementation for the
|
172 |
* {@link MapContextDrawer}.
|
173 |
*
|
174 |
* @param drawerClazz
|
175 |
* the {@link MapContextDrawer} class to use
|
176 |
* @throws MapContextException
|
177 |
* if there is any error setting the class
|
178 |
*/
|
179 |
void setDefaultMapContextDrawer(Class drawerClazz) |
180 |
throws MapContextException;
|
181 |
|
182 |
void validateMapContextDrawer(Class drawerClazz) throws MapContextException; |
183 |
|
184 |
/**
|
185 |
* Creates a new instance of the default {@link MapContextDrawer}
|
186 |
* implementation.
|
187 |
*
|
188 |
* @return the new {@link MapContextDrawer} instance
|
189 |
* @throws MapContextException
|
190 |
* if there is an error creating the new object instance
|
191 |
*/
|
192 |
MapContextDrawer createDefaultMapContextDrawerInstance() |
193 |
throws MapContextException;
|
194 |
|
195 |
/**
|
196 |
* Creates a new instance of the provided {@link MapContextDrawer}
|
197 |
* implementation.
|
198 |
*
|
199 |
* @param drawerClazz
|
200 |
* the {@link MapContextDrawer} implementation class
|
201 |
* @return the new {@link MapContextDrawer} instance
|
202 |
* @throws MapContextException
|
203 |
* if there is an error creating the new object instance
|
204 |
*/
|
205 |
MapContextDrawer createMapContextDrawerInstance(Class drawerClazz)
|
206 |
throws MapContextException;
|
207 |
|
208 |
GraphicLayer createGraphicsLayer(IProjection projection); |
209 |
|
210 |
void registerLegend(String legendName, Class legendClass) |
211 |
throws MapContextRuntimeException;
|
212 |
|
213 |
ILegend createLegend(String legendName) throws MapContextRuntimeException; |
214 |
|
215 |
void setDefaultVectorLegend(String legendName); |
216 |
|
217 |
IVectorLegend createDefaultVectorLegend(int shapeType)
|
218 |
throws MapContextRuntimeException;
|
219 |
|
220 |
void registerLegendWriter(String legendName, String format, |
221 |
Class writerClass) throws MapContextRuntimeException; |
222 |
|
223 |
void registerLegendReader(String format, Class readerClass) |
224 |
throws MapContextRuntimeException;
|
225 |
|
226 |
ILegendWriter createLegendWriter(String legendName, String format) |
227 |
throws MapContextException;
|
228 |
|
229 |
ILegendReader createLegendReader(String format)
|
230 |
throws MapContextRuntimeException;
|
231 |
|
232 |
/**
|
233 |
* Returns the current {@link SymbolManager}.
|
234 |
*
|
235 |
* @return the {@link SymbolManager}
|
236 |
*/
|
237 |
SymbolManager getSymbolManager(); |
238 |
|
239 |
/**
|
240 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
|
241 |
*/
|
242 |
ISymbol createSymbol(String symbolName) throws MapContextRuntimeException; |
243 |
|
244 |
/**
|
245 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
|
246 |
*/
|
247 |
ISymbol createSymbol(int shapeType) throws MapContextRuntimeException; |
248 |
|
249 |
/**
|
250 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
|
251 |
*/
|
252 |
ISymbol createSymbol(String symbolName, Color color) |
253 |
throws MapContextRuntimeException;
|
254 |
|
255 |
/**
|
256 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
|
257 |
*/
|
258 |
ISymbol createSymbol(int shapeType, Color color) |
259 |
throws MapContextRuntimeException;
|
260 |
|
261 |
/**
|
262 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
|
263 |
*/
|
264 |
IMultiLayerSymbol createMultiLayerSymbol(String symbolName)
|
265 |
throws MapContextRuntimeException;
|
266 |
|
267 |
/**
|
268 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
|
269 |
*/
|
270 |
IMultiLayerSymbol createMultiLayerSymbol(int shapeType)
|
271 |
throws MapContextRuntimeException;
|
272 |
|
273 |
/**
|
274 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
|
275 |
*/
|
276 |
void registerSymbol(String symbolName, Class symbolClass) |
277 |
throws MapContextRuntimeException;
|
278 |
|
279 |
/**
|
280 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
|
281 |
*/
|
282 |
void registerSymbol(String symbolName, int[] shapeTypes, Class symbolClass) |
283 |
throws MapContextException;
|
284 |
|
285 |
/**
|
286 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
|
287 |
*/
|
288 |
void registerMultiLayerSymbol(String symbolName, Class symbolClass) |
289 |
throws MapContextRuntimeException;
|
290 |
|
291 |
/**
|
292 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
|
293 |
*/
|
294 |
void registerMultiLayerSymbol(String symbolName, int[] shapeTypes, |
295 |
Class symbolClass) throws MapContextRuntimeException; |
296 |
|
297 |
/**
|
298 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
|
299 |
*/
|
300 |
IWarningSymbol getWarningSymbol(String message, String symbolDesc, |
301 |
int symbolDrawExceptionType) throws MapContextRuntimeException; |
302 |
} |