Revision 45583 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/MapContextManager.java

View differences:

MapContextManager.java
32 32
import java.io.File;
33 33
import java.util.List;
34 34
import org.cresques.cts.ICoordTrans;
35

  
36 35
import org.cresques.cts.IProjection;
37

  
38 36
import org.gvsig.fmap.dal.DataStore;
39 37
import org.gvsig.fmap.dal.DataStoreParameters;
40 38
import org.gvsig.fmap.dal.raster.BandDescriptor;
......
56 54

  
57 55
/**
58 56
 * Manager of the MapContext library.
59
 * 
57
 *
60 58
 * Holds the default implementation of the {@link MapContextDrawer}.
61
 * 
59
 *
62 60
 * @author <a href="mailto:cordinyana@gvsig.org">C�sar Ordi�ana</a>
63 61
 * @author <a href="mailto:jjdelcerro@gvsig.org">Joaquin Jose del Cerro</a>
64 62
 */
65 63
public interface MapContextManager extends Observable {
66 64

  
67
        public interface CreateLayerParameters {
68
        
69
            public DataStoreParameters getDataParameters(); 
65
    public interface CreateLayerParameters {
70 66

  
71
            public boolean useCache();
67
        public DataStoreParameters getDataParameters();
72 68

  
73
            public ICoordTrans getCoordTrans();            
74
        }
75
        
76
        public static final String GET_DEFAULT_CRS = "MAPCONTEXTMANAGER_GET_DEFAULT_CRS";
77
        public static final String CREATE_LEGEND = "MAPCONTEXTMANAGER_CREATE_LEGEND";
78
        public static final String CREATE_MAPCONTEXT_DRAWER = "MAPCONTEXTMANAGER_CREATE_MAPCONTEXT_DRAWER";
79
        public static final String SET_MAPCONTEXT_DRAWER = "MAPCONTEXTMANAGER_SET_MAPCONTEXT_DRAWER";
80
        public static final String CREATE_GRAPHICS_LAYER = "MAPCONTEXTMANAGER_CREATE_GRAPHICS_LAYER";
81
        public static final String REGISTER_LEGEND = "MAPCONTEXTMANAGER_REGISTER_LEGEND";
82
        public static final String REGISTER_LEGEND_READER = "MAPCONTEXTMANAGER_REGISTER_LEGEND_READER";
83
        public static final String CREATE_LEGEND_READER = "MAPCONTEXTMANAGER_CREATE_LEGEND_READER";
84
        public static final String REGISTER_LEGEND_WRITER = "MAPCONTEXTMANAGER_REGISTER_LEGEND_WRITER";
85
        public static final String CREATE_SYMBOL = "MAPCONTEXTMANAGER_CREATE_SYMBOL";
86
        public static final String LOAD_SYMBOLS = "MAPCONTEXTMANAGER_LOAD_SYMBOLS";
87
        public static final String REGISTER_MULTILAYER_SYMBOL = "MAPCONTEXTMANAGER_REGISTER_MULTILAYER_SYMBOL";
88
        public static final String REGISTER_SYMBOL = "MAPCONTEXTMANAGER_REGISTER_SYMBOL";
89
        public static final String CREATE_LAYER = "MAPCONTEXTMANAGER_CREATE_LAYER";
90
        public static final String LOAD_LAYER = "MAPCONTEXTMANAGER_LOAD_LAYER";
91
        public static final String REGISTER_ICON_LAYER = "MAPCONTEXTMANAGER_REGISTER_ICON_LAYER";
92
        public static final String CREATE_MAPCONTEXT = "MAPCONTEXTMANAGER_CREATE_MAPCONTEXT";
93
        public static final String LOAD_MAPCONTEXT = "MAPCONTEXTMANAGER_LOAD_MAPCONTEXT";
69
        public boolean useCache();
94 70

  
71
        public ICoordTrans getCoordTrans();
72
    }
95 73

  
96
	public MapContext createMapContext();
97
	      
98
        public boolean registerLayer(
99
                Class<? extends DataStore> dataStoreClass,
100
                Class<? extends FLayer> layerClass) ;
101
        
102
	/**
103
	 * Create a new layer from the data parameters passed as parameter.
104
	 * 
105
	 * @param layerName name used in for the new layer. 
106
	 * @param parameters used for create the {@link DataStore} of the new layer
107
	 * 
108
	 * @return the new FLayer
109
	 * 
110
	 * @throws LoadLayerException
111
	 */
112
	public FLayer createLayer(String layerName,
113
			DataStoreParameters parameters) throws LoadLayerException;
74
    public static final String GET_DEFAULT_CRS = "MAPCONTEXTMANAGER_GET_DEFAULT_CRS";
75
    public static final String CREATE_LEGEND = "MAPCONTEXTMANAGER_CREATE_LEGEND";
76
    public static final String CREATE_MAPCONTEXT_DRAWER = "MAPCONTEXTMANAGER_CREATE_MAPCONTEXT_DRAWER";
77
    public static final String SET_MAPCONTEXT_DRAWER = "MAPCONTEXTMANAGER_SET_MAPCONTEXT_DRAWER";
78
    public static final String CREATE_GRAPHICS_LAYER = "MAPCONTEXTMANAGER_CREATE_GRAPHICS_LAYER";
79
    public static final String REGISTER_LEGEND = "MAPCONTEXTMANAGER_REGISTER_LEGEND";
80
    public static final String REGISTER_LEGEND_READER = "MAPCONTEXTMANAGER_REGISTER_LEGEND_READER";
81
    public static final String CREATE_LEGEND_READER = "MAPCONTEXTMANAGER_CREATE_LEGEND_READER";
82
    public static final String REGISTER_LEGEND_WRITER = "MAPCONTEXTMANAGER_REGISTER_LEGEND_WRITER";
83
    public static final String CREATE_SYMBOL = "MAPCONTEXTMANAGER_CREATE_SYMBOL";
84
    public static final String LOAD_SYMBOLS = "MAPCONTEXTMANAGER_LOAD_SYMBOLS";
85
    public static final String REGISTER_MULTILAYER_SYMBOL = "MAPCONTEXTMANAGER_REGISTER_MULTILAYER_SYMBOL";
86
    public static final String REGISTER_SYMBOL = "MAPCONTEXTMANAGER_REGISTER_SYMBOL";
87
    public static final String CREATE_LAYER = "MAPCONTEXTMANAGER_CREATE_LAYER";
88
    public static final String LOAD_LAYER = "MAPCONTEXTMANAGER_LOAD_LAYER";
89
    public static final String REGISTER_ICON_LAYER = "MAPCONTEXTMANAGER_REGISTER_ICON_LAYER";
90
    public static final String CREATE_MAPCONTEXT = "MAPCONTEXTMANAGER_CREATE_MAPCONTEXT";
91
    public static final String LOAD_MAPCONTEXT = "MAPCONTEXTMANAGER_LOAD_MAPCONTEXT";
114 92

  
115
        public FLayer createLayer(
116
                String layerName, 
117
                CreateLayerParameters parameters
118
            ) throws LoadLayerException;
93
    public MapContext createMapContext();
119 94

  
120
	/**
121
	 * Create a layer from a {@link DataStore}.
122
	 * 
123
	 * @param layerName name used in for the new layer. 
124
	 * @param store used for the new layer
125
	 * 
126
	 * @return the new FLayer
127
	 * 
128
	 * @throws LoadLayerException
129
	 */
130
	public FLayer createLayer(String layerName, DataStore store)
131
			throws LoadLayerException;
95
    public boolean registerLayer(
96
            Class<? extends DataStore> dataStoreClass,
97
            Class<? extends FLayer> layerClass);
132 98

  
133
        public FLayer createLayer(
134
                String layerName, 
135
                DataStore store, 
136
                CreateLayerParameters parameters
137
            ) throws LoadLayerException;
99
    /**
100
     * Create a new layer from the data parameters passed as parameter.
101
     *
102
     * @param layerName name used in for the new layer.
103
     * @param parameters used for create the {@link DataStore} of the new layer
104
     *
105
     * @return the new FLayer
106
     *
107
     * @throws LoadLayerException
108
     */
109
    public FLayer createLayer(String layerName,
110
            DataStoreParameters parameters) throws LoadLayerException;
138 111

  
139
	/**
140
	 * Create a layer to be used as the {@link GraphicLayer}.
141
	 * 
142
	 * @param projection used in the layer.
143
	 * 
144
	 * @return the new {@link GraphicLayer}.
145
	 */
146
	public GraphicLayer createGraphicsLayer(IProjection projection);
112
    public FLayer createLayer(
113
            String layerName,
114
            CreateLayerParameters parameters
115
    ) throws LoadLayerException;
147 116

  
148
	/**
149
	 * Returns the current {@link SymbolManager}.
150
	 * 
151
	 * @return the {@link SymbolManager}
152
	 */
153
	SymbolManager getSymbolManager();
117
    /**
118
     * Create a layer from a {@link DataStore}.
119
     *
120
     * @param layerName name used in for the new layer.
121
     * @param store used for the new layer
122
     *
123
     * @return the new FLayer
124
     *
125
     * @throws LoadLayerException
126
     */
127
    public FLayer createLayer(String layerName, DataStore store)
128
            throws LoadLayerException;
154 129

  
155
	/**
156
	 * Sets the class to use as the default implementation for the
157
	 * {@link MapContextDrawer}.
158
	 * 
159
	 * @param drawerClazz
160
	 *            the {@link MapContextDrawer} class to use
161
	 * @throws MapContextException
162
	 *             if there is any error setting the class
163
	 */
164
	public void setDefaultMapContextDrawer(Class drawerClazz)
165
			throws MapContextException;
130
    public FLayer createLayer(
131
            String layerName,
132
            DataStore store,
133
            CreateLayerParameters parameters
134
    ) throws LoadLayerException;
166 135

  
167
	public void validateMapContextDrawer(Class drawerClazz) throws MapContextException;
136
    /**
137
     * Create a layer to be used as the {@link GraphicLayer}.
138
     *
139
     * @param projection used in the layer.
140
     *
141
     * @return the new {@link GraphicLayer}.
142
     */
143
    public GraphicLayer createGraphicsLayer(IProjection projection);
168 144

  
169
	/**
170
	 * Creates a new instance of the default {@link MapContextDrawer}
171
	 * implementation.
172
	 * 
173
	 * @return the new {@link MapContextDrawer} instance
174
	 * @throws MapContextException
175
	 *             if there is an error creating the new object instance
176
	 */
177
	public MapContextDrawer createDefaultMapContextDrawerInstance()
178
			throws MapContextException;
145
    /**
146
     * Returns the current {@link SymbolManager}.
147
     *
148
     * @return the {@link SymbolManager}
149
     */
150
    SymbolManager getSymbolManager();
179 151

  
180
	/**
181
	 * Creates a new instance of the provided {@link MapContextDrawer}
182
	 * implementation.
183
	 * 
184
	 * @param drawerClazz
185
	 *            the {@link MapContextDrawer} implementation class
186
	 * @return the new {@link MapContextDrawer} instance
187
	 * @throws MapContextException
188
	 *             if there is an error creating the new object instance
189
	 */
190
	public MapContextDrawer createMapContextDrawerInstance(Class drawerClazz)
191
			throws MapContextException;
192
	
193
	public void registerLegend(String legendName, Class legendClass)
194
			throws MapContextRuntimeException;
152
    /**
153
     * Sets the class to use as the default implementation for the
154
     * {@link MapContextDrawer}.
155
     *
156
     * @param drawerClazz the {@link MapContextDrawer} class to use
157
     * @throws MapContextException if there is any error setting the class
158
     */
159
    public void setDefaultMapContextDrawer(Class drawerClazz)
160
            throws MapContextException;
195 161

  
196
	public ILegend createLegend(String legendName) throws MapContextRuntimeException;
162
    public void validateMapContextDrawer(Class drawerClazz) throws MapContextException;
197 163

  
198
        public String getDefaultVectorLegend();
164
    /**
165
     * Creates a new instance of the default {@link MapContextDrawer}
166
     * implementation.
167
     *
168
     * @return the new {@link MapContextDrawer} instance
169
     * @throws MapContextException if there is an error creating the new object
170
     * instance
171
     */
172
    public MapContextDrawer createDefaultMapContextDrawerInstance()
173
            throws MapContextException;
199 174

  
200
        public void setDefaultVectorLegend(String legendName);
175
    /**
176
     * Creates a new instance of the provided {@link MapContextDrawer}
177
     * implementation.
178
     *
179
     * @param drawerClazz the {@link MapContextDrawer} implementation class
180
     * @return the new {@link MapContextDrawer} instance
181
     * @throws MapContextException if there is an error creating the new object
182
     * instance
183
     */
184
    public MapContextDrawer createMapContextDrawerInstance(Class drawerClazz)
185
            throws MapContextException;
201 186

  
202
        public String getDefaultRasterLegend();
203
        
204
        public void setDefaultRasterLegend(String defaultRasterLegend);
205
        
206
	public IVectorLegend createDefaultVectorLegend(int shapeType) throws MapContextRuntimeException;
207
        
208
        public RasterLegend createDefaultRasterLegend(List<BandDescriptor> bands);
187
    public void registerLegend(String legendName, Class legendClass)
188
            throws MapContextRuntimeException;
209 189

  
190
    public ILegend createLegend(String legendName) throws MapContextRuntimeException;
191

  
192
    public String getDefaultVectorLegend();
193

  
194
    public void setDefaultVectorLegend(String legendName);
195

  
196
    public String getDefaultRasterLegend();
197

  
198
    public void setDefaultRasterLegend(String defaultRasterLegend);
199

  
200
    public IVectorLegend createDefaultVectorLegend(int shapeType) throws MapContextRuntimeException;
201

  
202
    public RasterLegend createDefaultRasterLegend(List<BandDescriptor> bands);
203

  
210 204
    // ================================================================
211
	// = Legend reading/writing (GVSLEG, SLD, etc)
212
	
213
	/**
214
	 * Registers legend writer.
215
     * Format is a MIME type string. Examples:
216
	 * 
217
	 * "application/zip; subtype=gvsleg",
218
     * "text/xml; subtype=sld/1.0.0",
205
    // = Legend reading/writing (GVSLEG, SLD, etc)
206
    /**
207
     * Registers legend writer. Format is a MIME type string. Examples:
208
     *
209
     * "application/zip; subtype=gvsleg", "text/xml; subtype=sld/1.0.0",
219 210
     * "text/xml; subtype=sld/1.1.0",
220
	 * 
221
	 * @param legendClass Legend class
222
	 * @param format File type in mime format.
223
	 * @param writerClass Class object of the writer
224
	 * @throws MapContextRuntimeException
225
	 */
226
	void registerLegendWriter(Class legendClass, String format,
227
			Class writerClass) throws MapContextRuntimeException;
211
     *
212
     * @param legendClass Legend class
213
     * @param format File type in mime format.
214
     * @param writerClass Class object of the writer
215
     * @throws MapContextRuntimeException
216
     */
217
    void registerLegendWriter(Class legendClass, String format,
218
            Class writerClass) throws MapContextRuntimeException;
228 219

  
229
	/**
230
	 * 
231
     * Registers legend reader.
232
     * Format is a MIME type string. Examples:
233
     * 
234
     * "application/zip; subtype=gvsleg",
235
     * "text/xml; subtype=sld/1.0.0",
220
    /**
221
     *
222
     * Registers legend reader. Format is a MIME type string. Examples:
223
     *
224
     * "application/zip; subtype=gvsleg", "text/xml; subtype=sld/1.0.0",
236 225
     * "text/xml; subtype=sld/1.1.0",
237
	 * 
238
	 * @param format
239
	 * @param readerClass
240
	 * @throws MapContextRuntimeException
241
	 */
242
	void registerLegendReader(String format, Class readerClass)
243
			throws MapContextRuntimeException;
226
     *
227
     * @param format
228
     * @param readerClass
229
     * @throws MapContextRuntimeException
230
     */
231
    void registerLegendReader(String format, Class readerClass)
232
            throws MapContextRuntimeException;
244 233

  
245
	/**
246
	 * Creates a legend writer for the specified legend class
247
	 * 
248
	 */
249
	ILegendWriter createLegendWriter(Class legendClass, String format)
250
			throws MapContextException;
234
    /**
235
     * Creates a legend writer for the specified legend class
236
     *
237
     * @param legendClass
238
     * @param format
239
     * @return
240
     * @throws org.gvsig.fmap.mapcontext.MapContextException
241
     */
242
    ILegendWriter createLegendWriter(Class legendClass, String format)
243
            throws MapContextException;
251 244

  
252
	/**
253
	 * Creates a legend reader for the given format
254
	 * ("sld", "gvsleg", etc are extracted from the MIME long string)
255
	 */
256
	ILegendReader createLegendReader(String format)
257
			throws MapContextRuntimeException;
258
	
259
	/**
260
	 * 
245
    /**
246
     * Creates a legend reader for the given format ("sld", "gvsleg", etc are
247
     * extracted from the MIME long string)
248
     *
249
     * @param format
250
     * @return
251
     */
252
    ILegendReader createLegendReader(String format)
253
            throws MapContextRuntimeException;
254

  
255
    /**
256
     *
261 257
     * Format is a MIME type string. Examples:
262
     * 
263
     * "application/zip; subtype=gvsleg",
264
     * "text/xml; subtype=sld/1.0.0",
258
     *
259
     * "application/zip; subtype=gvsleg", "text/xml; subtype=sld/1.0.0",
265 260
     * "text/xml; subtype=sld/1.1.0",
266
	 * 
267
	 * @return A list of Strings with the available formats for reading
268
	 * legends
269
	 */
270
	List getLegendReadingFormats();
261
     *
262
     * @return A list of Strings with the available formats for reading legends
263
     */
264
    List getLegendReadingFormats();
271 265

  
272
	/**
273
	 * 
266
    /**
267
     *
274 268
     * Format is a MIME type string. Examples:
275
     * 
276
     * "application/zip; subtype=gvsleg",
277
     * "text/xml; subtype=sld/1.0.0",
269
     *
270
     * "application/zip; subtype=gvsleg", "text/xml; subtype=sld/1.0.0",
278 271
     * "text/xml; subtype=sld/1.1.0",
279
	 * 
280
	 * @return A list of Strings with the available formats for writing
281
	 * legends
282
	 */
283
	List getLegendWritingFormats();
272
     *
273
     * @return A list of Strings with the available formats for writing legends
274
     */
275
    List getLegendWritingFormats();
284 276

  
285
	
286 277
    // ================================================================
278
    /**
279
     * @return @deprecated to be removed in gvSIG 2.0
280
     * @see {@link SymbolPreferences}.
281
     */
282
    int getDefaultCartographicSupportMeasureUnit();
287 283

  
288
	/**
289
	 * @deprecated to be removed in gvSIG 2.0
290
	 * @see {@link SymbolPreferences}.
291
	 */
292
	int getDefaultCartographicSupportMeasureUnit();
284
    /**
285
     * @param defaultCartographicSupportMeasureUnit
286
     * @deprecated to be removed in gvSIG 2.0
287
     * @see {@link SymbolPreferences}.
288
     */
289
    void setDefaultCartographicSupportMeasureUnit(
290
            int defaultCartographicSupportMeasureUnit);
293 291

  
294
	/**
295
	 * @deprecated to be removed in gvSIG 2.0
296
	 * @see {@link SymbolPreferences}.
297
	 */
298
	void setDefaultCartographicSupportMeasureUnit(
299
			int defaultCartographicSupportMeasureUnit);
292
    /**
293
     * @return @deprecated to be removed in gvSIG 2.0
294
     * @see {@link SymbolPreferences}.
295
     */
296
    int getDefaultCartographicSupportReferenceSystem();
300 297

  
301
	/**
302
	 * @deprecated to be removed in gvSIG 2.0
303
	 * @see {@link SymbolPreferences}.
304
	 */
305
	int getDefaultCartographicSupportReferenceSystem();
298
    /**
299
     * @param defaultCartographicSupportReferenceSystem
300
     * @deprecated to be removed in gvSIG 2.0
301
     * @see {@link SymbolPreferences}.
302
     */
303
    void setDefaultCartographicSupportReferenceSystem(
304
            int defaultCartographicSupportReferenceSystem);
306 305

  
307
	/**
308
	 * @deprecated to be removed in gvSIG 2.0
309
	 * @see {@link SymbolPreferences}.
310
	 */
311
	void setDefaultCartographicSupportReferenceSystem(
312
			int defaultCartographicSupportReferenceSystem);
306
    /**
307
     * @return @deprecated to be removed in gvSIG 2.0
308
     * @see {@link SymbolPreferences}.
309
     */
310
    Color getDefaultSymbolColor();
313 311

  
314
	/**
315
	 * @deprecated to be removed in gvSIG 2.0
316
	 * @see {@link SymbolPreferences}.
317
	 */
318
	Color getDefaultSymbolColor();
312
    /**
313
     * @param defaultSymbolColor
314
     * @deprecated to be removed in gvSIG 2.0
315
     * @see {@link SymbolPreferences}.
316
     */
317
    void setDefaultSymbolColor(Color defaultSymbolColor);
319 318

  
320
	/**
321
	 * @deprecated to be removed in gvSIG 2.0
322
	 * @see {@link SymbolPreferences}.
323
	 */
324
	void setDefaultSymbolColor(Color defaultSymbolColor);
319
    /**
320
     * @deprecated to be removed in gvSIG 2.0
321
     * @see {@link SymbolPreferences}.
322
     */
323
    void resetDefaultSymbolColor();
325 324

  
326
	/**
327
	 * @deprecated to be removed in gvSIG 2.0
328
	 * @see {@link SymbolPreferences}.
329
	 */
330
	void resetDefaultSymbolColor();
325
    /**
326
     * @return @deprecated to be removed in gvSIG 2.0
327
     * @see {@link SymbolPreferences}.
328
     */
329
    Color getDefaultSymbolFillColor();
331 330

  
332
	/**
333
	 * @deprecated to be removed in gvSIG 2.0
334
	 * @see {@link SymbolPreferences}.
335
	 */
336
	Color getDefaultSymbolFillColor();
331
    /**
332
     * @param defaultSymbolFillColor
333
     * @deprecated to be removed in gvSIG 2.0
334
     * @see {@link SymbolPreferences}.
335
     */
336
    void setDefaultSymbolFillColor(Color defaultSymbolFillColor);
337 337

  
338
	/**
339
	 * @deprecated to be removed in gvSIG 2.0
340
	 * @see {@link SymbolPreferences}.
341
	 */
342
	void setDefaultSymbolFillColor(Color defaultSymbolFillColor);
338
    /**
339
     * @deprecated to be removed in gvSIG 2.0
340
     * @see {@link SymbolPreferences}.
341
     */
342
    void resetDefaultSymbolFillColor();
343 343

  
344
	/**
345
	 * @deprecated to be removed in gvSIG 2.0
346
	 * @see {@link SymbolPreferences}.
347
	 */
348
	void resetDefaultSymbolFillColor();
344
    /**
345
     * @return @deprecated to be removed in gvSIG 2.0
346
     * @see {@link SymbolPreferences}.
347
     */
348
    boolean isDefaultSymbolFillColorAleatory();
349 349

  
350
	/**
351
	 * @deprecated to be removed in gvSIG 2.0
352
	 * @see {@link SymbolPreferences}.
353
	 */
354
	boolean isDefaultSymbolFillColorAleatory();
350
    /**
351
     * @param defaultSymbolFillColorAleatory
352
     * @deprecated to be removed in gvSIG 2.0
353
     * @see {@link SymbolPreferences}.
354
     */
355
    void setDefaultSymbolFillColorAleatory(
356
            boolean defaultSymbolFillColorAleatory);
355 357

  
356
	/**
357
	 * @deprecated to be removed in gvSIG 2.0
358
	 * @see {@link SymbolPreferences}.
359
	 */
360
	void setDefaultSymbolFillColorAleatory(
361
			boolean defaultSymbolFillColorAleatory);
358
    /**
359
     * @deprecated to be removed in gvSIG 2.0
360
     * @see {@link SymbolPreferences}.
361
     */
362
    void resetDefaultSymbolFillColorAleatory();
362 363

  
363
	/**
364
	 * @deprecated to be removed in gvSIG 2.0
365
	 * @see {@link SymbolPreferences}.
366
	 */
367
	void resetDefaultSymbolFillColorAleatory();
364
    /**
365
     * @return @deprecated to be removed in gvSIG 2.0
366
     * @see {@link SymbolPreferences}.
367
     */
368
    Font getDefaultSymbolFont();
368 369

  
369
	/**
370
	 * @deprecated to be removed in gvSIG 2.0
371
	 * @see {@link SymbolPreferences}.
372
	 */
373
	Font getDefaultSymbolFont();
370
    /**
371
     * @param defaultSymbolFont
372
     * @deprecated to be removed in gvSIG 2.0
373
     * @see {@link SymbolPreferences}.
374
     */
375
    void setDefaultSymbolFont(Font defaultSymbolFont);
374 376

  
375
	/**
376
	 * @deprecated to be removed in gvSIG 2.0
377
	 * @see {@link SymbolPreferences}.
378
	 */
379
	void setDefaultSymbolFont(Font defaultSymbolFont);
377
    /**
378
     * @deprecated to be removed in gvSIG 2.0
379
     * @see {@link SymbolPreferences}.
380
     */
381
    void resetDefaultSymbolFont();
380 382

  
381
	/**
382
	 * @deprecated to be removed in gvSIG 2.0
383
	 * @see {@link SymbolPreferences}.
384
	 */
385
	void resetDefaultSymbolFont();
383
    /**
384
     * @return @deprecated to be removed in gvSIG 2.0
385
     * @see {@link SymbolPreferences}.
386
     */
387
    String getSymbolLibraryPath();
386 388

  
387
	/**
388
	 * @deprecated to be removed in gvSIG 2.0
389
	 * @see {@link SymbolPreferences}.
390
	 */
391
	String getSymbolLibraryPath();
389
    /**
390
     * @param symbolLibraryPath
391
     * @deprecated to be removed in gvSIG 2.0
392
     * @see {@link SymbolPreferences}.
393
     */
394
    void setSymbolLibraryPath(String symbolLibraryPath);
392 395

  
393
	/**
394
	 * @deprecated to be removed in gvSIG 2.0
395
	 * @see {@link SymbolPreferences}.
396
	 */
397
	void setSymbolLibraryPath(String symbolLibraryPath);
396
    /**
397
     * @deprecated to be removed in gvSIG 2.0
398
     * @see {@link SymbolPreferences}.
399
     */
400
    void resetSymbolLibraryPath();
398 401

  
399
	/**
400
	 * @deprecated to be removed in gvSIG 2.0
401
	 * @see {@link SymbolPreferences}.
402
	 */
403
	void resetSymbolLibraryPath();
404
	
405
	
406
	/**
407
	 * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
408
	 */
409
	ISymbol createSymbol(String symbolName) throws MapContextRuntimeException;
402
    /**
403
     * @param symbolName
404
     * @return
405
     * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
406
     */
407
    ISymbol createSymbol(String symbolName) throws MapContextRuntimeException;
410 408

  
411
	/**
412
	 * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
413
	 */
414
	ISymbol createSymbol(int shapeType) throws MapContextRuntimeException;
409
    /**
410
     * @param shapeType
411
     * @return
412
     * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
413
     */
414
    ISymbol createSymbol(int shapeType) throws MapContextRuntimeException;
415 415

  
416
	/**
417
	 * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
418
	 */
419
	ISymbol createSymbol(String symbolName, Color color)
420
			throws MapContextRuntimeException;
416
    /**
417
     * @param symbolName
418
     * @param color
419
     * @return
420
     * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
421
     */
422
    ISymbol createSymbol(String symbolName, Color color)
423
            throws MapContextRuntimeException;
421 424

  
422
	/**
423
	 * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
424
	 */
425
	ISymbol createSymbol(int shapeType, Color color)
426
			throws MapContextRuntimeException;
425
    /**
426
     * @param shapeType
427
     * @param color
428
     * @return
429
     * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
430
     */
431
    ISymbol createSymbol(int shapeType, Color color)
432
            throws MapContextRuntimeException;
427 433

  
428
	/**
429
	 * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
430
	 */
431
	IMultiLayerSymbol createMultiLayerSymbol(String symbolName)
432
			throws MapContextRuntimeException;
434
    /**
435
     * @param symbolName
436
     * @return
437
     * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
438
     */
439
    IMultiLayerSymbol createMultiLayerSymbol(String symbolName)
440
            throws MapContextRuntimeException;
433 441

  
434
	/**
435
	 * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
436
	 */
437
	IMultiLayerSymbol createMultiLayerSymbol(int shapeType)
438
			throws MapContextRuntimeException;
442
    /**
443
     * @param shapeType
444
     * @return
445
     * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
446
     */
447
    IMultiLayerSymbol createMultiLayerSymbol(int shapeType)
448
            throws MapContextRuntimeException;
439 449

  
440
	/**
441
	 * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
442
	 */
443
	void registerSymbol(String symbolName, Class symbolClass)
444
			throws MapContextRuntimeException;
450
    /**
451
     * @param symbolName
452
     * @param symbolClass
453
     * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
454
     */
455
    void registerSymbol(String symbolName, Class symbolClass)
456
            throws MapContextRuntimeException;
445 457

  
446
	/**
447
	 * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
448
	 */
449
	void registerSymbol(String symbolName, int[] shapeTypes, Class symbolClass)
450
			throws MapContextException;
458
    /**
459
     * @param symbolName
460
     * @param shapeTypes
461
     * @param symbolClass
462
     * @throws org.gvsig.fmap.mapcontext.MapContextException
463
     * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
464
     */
465
    void registerSymbol(String symbolName, int[] shapeTypes, Class symbolClass)
466
            throws MapContextException;
451 467

  
452
	/**
453
	 * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
454
	 */
455
	void registerMultiLayerSymbol(String symbolName, Class symbolClass)
456
			throws MapContextRuntimeException;
468
    /**
469
     * @param symbolName
470
     * @param symbolClass
471
     * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
472
     */
473
    void registerMultiLayerSymbol(String symbolName, Class symbolClass)
474
            throws MapContextRuntimeException;
457 475

  
458
	/**
459
	 * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
460
	 */
461
	void registerMultiLayerSymbol(String symbolName, int[] shapeTypes,
462
			Class symbolClass) throws MapContextRuntimeException;
476
    /**
477
     * @param symbolName
478
     * @param shapeTypes
479
     * @param symbolClass
480
     * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
481
     */
482
    void registerMultiLayerSymbol(String symbolName, int[] shapeTypes,
483
            Class symbolClass) throws MapContextRuntimeException;
463 484

  
464
	/**
465
	 * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
466
	 */
467
	IWarningSymbol getWarningSymbol(String message, String symbolDesc,
468
			int symbolDrawExceptionType) throws MapContextRuntimeException;
469
	
470
	/**
471
	 * It returns the legend associated with a {@link DataStore}.
472
	 * If the legend doesn't exist it returns <code>null</code>.
473
	 * @param dataStore
474
	 * the store that could have a legend.
475
	 * @return
476
	 * the legend or <code>null</code>.
477
	 */
478
	ILegend getLegend(DataStore dataStore);	
479
	
480
	/**
481
     * It returns the labeling strategy associated with a {@link DataStore}.
482
     * If the labeling strategy doesn't exist it returns <code>null</code>.
483
     * @param dataStore
484
     * the store that could have a labeling strategy.
485
    /**
486
     * @param message
487
     * @param symbolDesc
488
     * @param symbolDrawExceptionType
485 489
     * @return
486
     * the labeling strategy or <code>null</code>.
490
     * @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager}
487 491
     */
488
	ILabelingStrategy getLabelingStrategy(DataStore dataStore);
492
    IWarningSymbol getWarningSymbol(String message, String symbolDesc,
493
            int symbolDrawExceptionType) throws MapContextRuntimeException;
489 494

  
495
    /**
496
     * It returns the legend associated with a {@link DataStore}. If the legend
497
     * doesn't exist it returns <code>null</code>.
498
     *
499
     * @param dataStore the store that could have a legend.
500
     * @return the legend or <code>null</code>.
501
     */
502
    ILegend getLegend(DataStore dataStore);
490 503

  
491
	void registerIconLayer(String store, String iconName);
492
	
493
	String getIconLayer(DataStore store);
494
	String getIconLayer(String providerName);
495
        
504
    /**
505
     * It returns the labeling strategy associated with a {@link DataStore}. If
506
     * the labeling strategy doesn't exist it returns <code>null</code>.
507
     *
508
     * @param dataStore the store that could have a labeling strategy.
509
     * @return the labeling strategy or <code>null</code>.
510
     */
511
    ILabelingStrategy getLabelingStrategy(DataStore dataStore);
512

  
513
    void registerIconLayer(String store, String iconName);
514

  
515
    String getIconLayer(DataStore store);
516

  
517
    String getIconLayer(String providerName);
518

  
496 519
    // TODO:
497 520
    // DynObjectModel getFeatureTypeUIModel(DataStore store,
498 521
    // FeatureType featureType);
499
	
500
	/**
501
	 * Returns the default CRS.
502
	 * This is NOT taken from the app
503
	 * preferences because this is a library. It is a
504
	 * "hard-coded" default CRS, used as a last resort.
505
	 * @return the default CRS
506
	 */
507
	IProjection getDefaultCRS();
508
        
509
        public File getColorTableLibraryFolder();
510
        
511
        public void setColorTableLibraryFolder(File colorTableLibraryFolder);
512
        
513
        public LayerInformationBuilder createLayerInformationBuilder();
514
        
515
}
522
    
523
    
524
    /**
525
     * Returns the default CRS. This is NOT taken from the app preferences
526
     * because this is a library. It is a "hard-coded" default CRS, used as a
527
     * last resort.
528
     *
529
     * @return the default CRS
530
     */
531
    IProjection getDefaultCRS();
532

  
533
    public File getColorTableLibraryFolder();
534

  
535
    public void setColorTableLibraryFolder(File colorTableLibraryFolder);
536

  
537
    public LayerInformationBuilder createLayerInformationBuilder();
538

  
539
}

Also available in: Unified diff