Revision 44831 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
MapContextManager.java | ||
---|---|---|
31 | 31 |
import java.awt.Font; |
32 | 32 |
import java.io.File; |
33 | 33 |
import java.util.List; |
34 |
import org.cresques.cts.ICoordTrans; |
|
34 | 35 |
|
35 | 36 |
import org.cresques.cts.IProjection; |
36 | 37 |
|
37 | 38 |
import org.gvsig.fmap.dal.DataStore; |
38 | 39 |
import org.gvsig.fmap.dal.DataStoreParameters; |
40 |
import org.gvsig.fmap.dal.raster.BandDescriptor; |
|
39 | 41 |
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException; |
40 | 42 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
41 | 43 |
import org.gvsig.fmap.mapcontext.layers.LayerInformationBuilder; |
... | ... | |
49 | 51 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
50 | 52 |
import org.gvsig.fmap.mapcontext.rendering.symbols.IWarningSymbol; |
51 | 53 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolManager; |
54 |
import org.gvsig.raster.lib.legend.api.RasterLegend; |
|
52 | 55 |
import org.gvsig.tools.observer.Observable; |
53 | 56 |
|
54 | 57 |
/** |
... | ... | |
56 | 59 |
* |
57 | 60 |
* Holds the default implementation of the {@link MapContextDrawer}. |
58 | 61 |
* |
59 |
* @author <a href="mailto:cordinyana@gvsig.org">C?sar Ordi?ana</a>
|
|
62 |
* @author <a href="mailto:cordinyana@gvsig.org">C�sar Ordi�ana</a>
|
|
60 | 63 |
* @author <a href="mailto:jjdelcerro@gvsig.org">Joaquin Jose del Cerro</a> |
61 | 64 |
*/ |
62 | 65 |
public interface MapContextManager extends Observable { |
63 | 66 |
|
67 |
public interface CreateLayerParameters { |
|
68 |
|
|
69 |
public DataStoreParameters getDataParameters(); |
|
70 |
|
|
71 |
public boolean useCache(); |
|
72 |
|
|
73 |
public ICoordTrans getCoordTrans(); |
|
74 |
} |
|
75 |
|
|
64 | 76 |
public static final String GET_DEFAULT_CRS = "MAPCONTEXTMANAGER_GET_DEFAULT_CRS"; |
65 | 77 |
public static final String CREATE_LEGEND = "MAPCONTEXTMANAGER_CREATE_LEGEND"; |
66 | 78 |
public static final String CREATE_MAPCONTEXT_DRAWER = "MAPCONTEXTMANAGER_CREATE_MAPCONTEXT_DRAWER"; |
... | ... | |
82 | 94 |
|
83 | 95 |
|
84 | 96 |
public MapContext createMapContext(); |
85 |
|
|
97 |
|
|
98 |
public boolean registerLayer( |
|
99 |
Class<? extends DataStore> dataStoreClass, |
|
100 |
Class<? extends FLayer> layerClass) ; |
|
101 |
|
|
86 | 102 |
/** |
87 | 103 |
* Create a new layer from the data parameters passed as parameter. |
88 | 104 |
* |
... | ... | |
96 | 112 |
public FLayer createLayer(String layerName, |
97 | 113 |
DataStoreParameters parameters) throws LoadLayerException; |
98 | 114 |
|
115 |
public FLayer createLayer( |
|
116 |
String layerName, |
|
117 |
CreateLayerParameters parameters |
|
118 |
) throws LoadLayerException; |
|
119 |
|
|
99 | 120 |
/** |
100 | 121 |
* Create a layer from a {@link DataStore}. |
101 | 122 |
* |
... | ... | |
109 | 130 |
public FLayer createLayer(String layerName, DataStore store) |
110 | 131 |
throws LoadLayerException; |
111 | 132 |
|
133 |
public FLayer createLayer( |
|
134 |
String layerName, |
|
135 |
DataStore store, |
|
136 |
CreateLayerParameters parameters |
|
137 |
) throws LoadLayerException; |
|
138 |
|
|
112 | 139 |
/** |
113 | 140 |
* Create a layer to be used as the {@link GraphicLayer}. |
114 | 141 |
* |
... | ... | |
162 | 189 |
*/ |
163 | 190 |
public MapContextDrawer createMapContextDrawerInstance(Class drawerClazz) |
164 | 191 |
throws MapContextException; |
165 |
|
|
166 | 192 |
|
167 |
|
|
168 |
void registerLegend(String legendName, Class legendClass) |
|
193 |
public void registerLegend(String legendName, Class legendClass) |
|
169 | 194 |
throws MapContextRuntimeException; |
170 | 195 |
|
171 |
ILegend createLegend(String legendName) throws MapContextRuntimeException; |
|
196 |
public ILegend createLegend(String legendName) throws MapContextRuntimeException;
|
|
172 | 197 |
|
173 |
void setDefaultVectorLegend(String legendName);
|
|
198 |
public String getDefaultVectorLegend();
|
|
174 | 199 |
|
175 |
IVectorLegend createDefaultVectorLegend(int shapeType) |
|
176 |
throws MapContextRuntimeException; |
|
200 |
public void setDefaultVectorLegend(String legendName); |
|
177 | 201 |
|
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); |
|
209 |
|
|
178 | 210 |
// ================================================================ |
179 | 211 |
// = Legend reading/writing (GVSLEG, SLD, etc) |
180 | 212 |
|
Also available in: Unified diff