Package org.gvsig.fmap.mapcontext
Interface MapContextManager
- All Superinterfaces:
org.gvsig.tools.observer.Observable
- All Known Implementing Classes:
DefaultMapContextManager
public interface MapContextManager
extends org.gvsig.tools.observer.Observable
Manager of the MapContext library.
Holds the default implementation of the
MapContextDrawer.- Author:
- C�sar Ordi�ana, Joaquin Jose del Cerro
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionCreates a new instance of the defaultMapContextDrawerimplementation.createDefaultRasterLegend(List<org.gvsig.fmap.dal.raster.BandDescriptor> bands) createDefaultVectorLegend(int shapeType) createGraphicsLayer(org.gvsig.crs.projection.lib.Projection projection) Create a layer to be used as theGraphicLayer.createLayer(String layerName, org.gvsig.fmap.dal.DataStore store) Create a layer from aDataStore.createLayer(String layerName, org.gvsig.fmap.dal.DataStoreParameters parameters) Create a new layer from the data parameters passed as parameter.createLayer(String layerName, org.gvsig.fmap.dal.DataStore store, MapContextManager.CreateLayerParameters parameters) createLayer(String layerName, MapContextManager.CreateLayerParameters parameters) createLegend(String legendName) createLegendReader(String format) Creates a legend reader for the given format ("sld", "gvsleg", etc are extracted from the MIME long string)createLegendWriter(Class legendClass, String format) Creates a legend writer for the specified legend classcreateMapContextDrawerInstance(Class drawerClazz) Creates a new instance of the providedMapContextDrawerimplementation.createMultiLayerSymbol(int shapeType) createMultiLayerSymbol(String symbolName) createSymbol(int shapeType) createSymbol(int shapeType, Color color) createSymbol(String symbolName) createSymbol(String symbolName, Color color) intintorg.gvsig.crs.projection.lib.ProjectionReturns the default CRS.getIcon(int geometryType, boolean hasSelection) getIconLayer(String providerName) getIconLayer(org.gvsig.fmap.dal.DataStore store) getLabelingStrategy(org.gvsig.fmap.dal.DataStore dataStore) It returns the labeling strategy associated with aDataStore.getLegend(org.gvsig.fmap.dal.DataStore dataStore) It returns the legend associated with aDataStore.Format is a MIME type string.Format is a MIME type string.Returns the currentSymbolManager.getWarningSymbol(String message, String symbolDesc, int symbolDrawExceptionType) booleanvoidregisterIconLayer(String store, String iconName) booleanregisterLayer(Class theClass, Class<? extends FLayer> layerClass) booleanregisterLayer(org.gvsig.tools.util.Factory<FLayer> factory) Register a factory to create new layers based on the parameters of the store and the store itself.voidregisterLegend(String legendName, Class legendClass) voidregisterLegendReader(String format, Class readerClass) Registers legend reader.voidregisterLegendWriter(Class legendClass, String format, Class writerClass) Registers legend writer.voidregisterMultiLayerSymbol(String symbolName, int[] shapeTypes, Class symbolClass) voidregisterMultiLayerSymbol(String symbolName, Class symbolClass) voidregisterSymbol(String symbolName, int[] shapeTypes, Class symbolClass) voidregisterSymbol(String symbolName, Class symbolClass) voidDeprecated.to be removed in gvSIG 2.0voidvoidvoidvoidvoidsetColorTableLibraryFolder(File colorTableLibraryFolder) voidsetDefaultCartographicSupportMeasureUnit(int defaultCartographicSupportMeasureUnit) voidsetDefaultCartographicSupportReferenceSystem(int defaultCartographicSupportReferenceSystem) voidsetDefaultMapContextDrawer(Class drawerClazz) Sets the class to use as the default implementation for theMapContextDrawer.voidsetDefaultRasterLegend(String defaultRasterLegend) voidsetDefaultSymbolColor(Color defaultSymbolColor) voidsetDefaultSymbolFillColor(Color defaultSymbolFillColor) voidsetDefaultSymbolFillColorAleatory(boolean defaultSymbolFillColorAleatory) voidsetDefaultSymbolFont(Font defaultSymbolFont) voidsetDefaultVectorLegend(String legendName) voidsetSymbolLibraryPath(String symbolLibraryPath) voidvalidateMapContextDrawer(Class drawerClazz) Methods inherited from interface org.gvsig.tools.observer.Observable
addObserver, deleteObserver, deleteObservers
-
Field Details
-
GET_DEFAULT_CRS
- See Also:
-
CREATE_LEGEND
- See Also:
-
CREATE_MAPCONTEXT_DRAWER
- See Also:
-
SET_MAPCONTEXT_DRAWER
- See Also:
-
CREATE_GRAPHICS_LAYER
- See Also:
-
REGISTER_LEGEND
- See Also:
-
REGISTER_LEGEND_READER
- See Also:
-
CREATE_LEGEND_READER
- See Also:
-
REGISTER_LEGEND_WRITER
- See Also:
-
CREATE_SYMBOL
- See Also:
-
LOAD_SYMBOLS
- See Also:
-
REGISTER_MULTILAYER_SYMBOL
- See Also:
-
REGISTER_SYMBOL
- See Also:
-
CREATE_LAYER
- See Also:
-
LOAD_LAYER
- See Also:
-
REGISTER_ICON_LAYER
- See Also:
-
CREATE_MAPCONTEXT
- See Also:
-
LOAD_MAPCONTEXT
- See Also:
-
-
Method Details
-
createMapContext
MapContext createMapContext() -
registerLayer
-
registerLayer
Register a factory to create new layers based on the parameters of the store and the store itself. If the factory cannot create the layer, it returns null without throwing an exception. The returned layer must be fully initialized.- Parameters:
factory-- Returns:
-
createLayer
FLayer createLayer(String layerName, org.gvsig.fmap.dal.DataStoreParameters parameters) throws LoadLayerException Create a new layer from the data parameters passed as parameter.- Parameters:
layerName- name used in for the new layer.parameters- used for create theDataStoreof the new layer- Returns:
- the new FLayer
- Throws:
LoadLayerException
-
createLayer
FLayer createLayer(String layerName, MapContextManager.CreateLayerParameters parameters) throws LoadLayerException - Throws:
LoadLayerException
-
createLayer
Create a layer from aDataStore.- Parameters:
layerName- name used in for the new layer.store- used for the new layer- Returns:
- the new FLayer
- Throws:
LoadLayerException
-
createLayer
FLayer createLayer(String layerName, org.gvsig.fmap.dal.DataStore store, MapContextManager.CreateLayerParameters parameters) throws LoadLayerException - Throws:
LoadLayerException
-
createGraphicsLayer
Create a layer to be used as theGraphicLayer.- Parameters:
projection- used in the layer.- Returns:
- the new
GraphicLayer.
-
getSymbolManager
SymbolManager getSymbolManager()Returns the currentSymbolManager.- Returns:
- the
SymbolManager
-
setDefaultMapContextDrawer
Sets the class to use as the default implementation for theMapContextDrawer.- Parameters:
drawerClazz- theMapContextDrawerclass to use- Throws:
MapContextException- if there is any error setting the class
-
validateMapContextDrawer
- Throws:
MapContextException
-
createDefaultMapContextDrawerInstance
Creates a new instance of the defaultMapContextDrawerimplementation.- Returns:
- the new
MapContextDrawerinstance - Throws:
MapContextException- if there is an error creating the new object instance
-
createMapContextDrawerInstance
Creates a new instance of the providedMapContextDrawerimplementation.- Parameters:
drawerClazz- theMapContextDrawerimplementation class- Returns:
- the new
MapContextDrawerinstance - Throws:
MapContextException- if there is an error creating the new object instance
-
registerLegend
- Throws:
MapContextRuntimeException
-
createLegend
- Throws:
MapContextRuntimeException
-
getDefaultVectorLegend
String getDefaultVectorLegend() -
setDefaultVectorLegend
-
getDefaultRasterLegend
String getDefaultRasterLegend() -
setDefaultRasterLegend
-
createDefaultVectorLegend
- Throws:
MapContextRuntimeException
-
createDefaultRasterLegend
-
registerLegendWriter
void registerLegendWriter(Class legendClass, String format, Class writerClass) throws MapContextRuntimeException Registers legend writer. Format is a MIME type string. Examples: "application/zip; subtype=gvsleg", "text/xml; subtype=sld/1.0.0", "text/xml; subtype=sld/1.1.0",- Parameters:
legendClass- Legend classformat- File type in mime format.writerClass- Class object of the writer- Throws:
MapContextRuntimeException
-
registerLegendReader
Registers legend reader. Format is a MIME type string. Examples: "application/zip; subtype=gvsleg", "text/xml; subtype=sld/1.0.0", "text/xml; subtype=sld/1.1.0",- Parameters:
format-readerClass-- Throws:
MapContextRuntimeException
-
createLegendWriter
Creates a legend writer for the specified legend class- Parameters:
legendClass-format-- Returns:
- Throws:
MapContextException
-
createLegendReader
Creates a legend reader for the given format ("sld", "gvsleg", etc are extracted from the MIME long string)- Parameters:
format-- Returns:
- Throws:
MapContextRuntimeException
-
getLegendReadingFormats
List getLegendReadingFormats()Format is a MIME type string. Examples: "application/zip; subtype=gvsleg", "text/xml; subtype=sld/1.0.0", "text/xml; subtype=sld/1.1.0",- Returns:
- A list of Strings with the available formats for reading legends
-
getLegendWritingFormats
List getLegendWritingFormats()Format is a MIME type string. Examples: "application/zip; subtype=gvsleg", "text/xml; subtype=sld/1.0.0", "text/xml; subtype=sld/1.1.0",- Returns:
- A list of Strings with the available formats for writing legends
-
getDefaultCartographicSupportMeasureUnit
int getDefaultCartographicSupportMeasureUnit()- Returns:
- @Deprecated to be removed in gvSIG 2.0
-
setDefaultCartographicSupportMeasureUnit
void setDefaultCartographicSupportMeasureUnit(int defaultCartographicSupportMeasureUnit) - Parameters:
defaultCartographicSupportMeasureUnit-
-
getDefaultCartographicSupportReferenceSystem
int getDefaultCartographicSupportReferenceSystem()- Returns:
- @Deprecated to be removed in gvSIG 2.0
-
setDefaultCartographicSupportReferenceSystem
void setDefaultCartographicSupportReferenceSystem(int defaultCartographicSupportReferenceSystem) - Parameters:
defaultCartographicSupportReferenceSystem-
-
getDefaultSymbolColor
Color getDefaultSymbolColor()- Returns:
- @Deprecated to be removed in gvSIG 2.0
-
setDefaultSymbolColor
- Parameters:
defaultSymbolColor-
-
resetDefaultSymbolColor
void resetDefaultSymbolColor()Deprecated.to be removed in gvSIG 2.0 -
getDefaultSymbolFillColor
Color getDefaultSymbolFillColor()- Returns:
- @Deprecated to be removed in gvSIG 2.0
-
setDefaultSymbolFillColor
- Parameters:
defaultSymbolFillColor-
-
resetDefaultSymbolFillColor
void resetDefaultSymbolFillColor() -
isDefaultSymbolFillColorAleatory
boolean isDefaultSymbolFillColorAleatory()- Returns:
- @Deprecated to be removed in gvSIG 2.0
-
setDefaultSymbolFillColorAleatory
void setDefaultSymbolFillColorAleatory(boolean defaultSymbolFillColorAleatory) - Parameters:
defaultSymbolFillColorAleatory-
-
resetDefaultSymbolFillColorAleatory
void resetDefaultSymbolFillColorAleatory() -
getDefaultSymbolFont
Font getDefaultSymbolFont()- Returns:
- @Deprecated to be removed in gvSIG 2.0
-
setDefaultSymbolFont
- Parameters:
defaultSymbolFont-
-
resetDefaultSymbolFont
void resetDefaultSymbolFont() -
getSymbolLibraryPath
String getSymbolLibraryPath()- Returns:
- @Deprecated to be removed in gvSIG 2.0
-
setSymbolLibraryPath
- Parameters:
symbolLibraryPath-
-
resetSymbolLibraryPath
void resetSymbolLibraryPath() -
createSymbol
- Parameters:
symbolName-- Returns:
- Throws:
MapContextRuntimeException
-
createSymbol
- Parameters:
shapeType-- Returns:
- Throws:
MapContextRuntimeException
-
createSymbol
- Parameters:
symbolName-color-- Returns:
- Throws:
MapContextRuntimeException
-
createSymbol
- Parameters:
shapeType-color-- Returns:
- Throws:
MapContextRuntimeException
-
createMultiLayerSymbol
- Parameters:
symbolName-- Returns:
- Throws:
MapContextRuntimeException
-
createMultiLayerSymbol
- Parameters:
shapeType-- Returns:
- Throws:
MapContextRuntimeException
-
registerSymbol
- Parameters:
symbolName-symbolClass-- Throws:
MapContextRuntimeException
-
registerSymbol
void registerSymbol(String symbolName, int[] shapeTypes, Class symbolClass) throws MapContextException - Parameters:
symbolName-shapeTypes-symbolClass-- Throws:
MapContextException
-
registerMultiLayerSymbol
void registerMultiLayerSymbol(String symbolName, Class symbolClass) throws MapContextRuntimeException - Parameters:
symbolName-symbolClass-- Throws:
MapContextRuntimeException
-
registerMultiLayerSymbol
void registerMultiLayerSymbol(String symbolName, int[] shapeTypes, Class symbolClass) throws MapContextRuntimeException - Parameters:
symbolName-shapeTypes-symbolClass-- Throws:
MapContextRuntimeException
-
getWarningSymbol
IWarningSymbol getWarningSymbol(String message, String symbolDesc, int symbolDrawExceptionType) throws MapContextRuntimeException - Parameters:
message-symbolDesc-symbolDrawExceptionType-- Returns:
- Throws:
MapContextRuntimeException
-
getLegend
It returns the legend associated with aDataStore. If the legend doesn't exist it returnsnull.- Parameters:
dataStore- the store that could have a legend.- Returns:
- the legend or
null.
-
getLabelingStrategy
It returns the labeling strategy associated with aDataStore. If the labeling strategy doesn't exist it returnsnull.- Parameters:
dataStore- the store that could have a labeling strategy.- Returns:
- the labeling strategy or
null.
-
registerIconLayer
-
getIconLayer
-
getIconLayer
-
getDefaultCRS
org.gvsig.crs.projection.lib.Projection getDefaultCRS()Returns the default CRS. This is NOT taken from the app preferences because this is a library. It is a "hard-coded" default CRS, used as a last resort.- Returns:
- the default CRS
-
getColorTableLibraryFolder
File getColorTableLibraryFolder() -
setColorTableLibraryFolder
-
createLayerInformationBuilder
LayerInformationBuilder createLayerInformationBuilder() -
getIcon
-