public class DefaultMapContextManager extends java.lang.Object implements MapContextManager
MapContextManager.MapContextManager.CreateLayerParametersCREATE_GRAPHICS_LAYER, CREATE_LAYER, CREATE_LEGEND, CREATE_LEGEND_READER, CREATE_MAPCONTEXT, CREATE_MAPCONTEXT_DRAWER, CREATE_SYMBOL, GET_DEFAULT_CRS, LOAD_LAYER, LOAD_MAPCONTEXT, LOAD_SYMBOLS, REGISTER_ICON_LAYER, REGISTER_LEGEND, REGISTER_LEGEND_READER, REGISTER_LEGEND_WRITER, REGISTER_MULTILAYER_SYMBOL, REGISTER_SYMBOL, SET_MAPCONTEXT_DRAWER| Constructor and Description |
|---|
DefaultMapContextManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addObserver(Observer o) |
MapContextDrawer |
createDefaultMapContextDrawerInstance()
Creates a new instance of the default
MapContextDrawer
implementation. |
RasterLegend |
createDefaultRasterLegend(java.util.List<BandDescriptor> bands) |
IVectorLegend |
createDefaultVectorLegend(int shapeType) |
GraphicLayer |
createGraphicsLayer(IProjection projection)
Create a layer to be used as the
GraphicLayer. |
FLayer |
createLayer(java.lang.String layerName,
DataStore dataStore)
Create a layer from a
DataStore. |
FLayer |
createLayer(java.lang.String layerName,
DataStore dataStore,
MapContextManager.CreateLayerParameters parameters) |
FLayer |
createLayer(java.lang.String layerName,
DataStoreParameters dataParameters)
Create a new layer from the data parameters passed as parameter.
|
FLayer |
createLayer(java.lang.String layerName,
MapContextManager.CreateLayerParameters parameters) |
LayerInformationBuilder |
createLayerInformationBuilder() |
ILegend |
createLegend(java.lang.String legendName) |
ILegendReader |
createLegendReader(java.lang.String format)
Creates a legend reader for the given format ("sld", "gvsleg", etc are
extracted from the MIME long string)
|
ILegendWriter |
createLegendWriter(java.lang.Class legendClass,
java.lang.String format)
Creates a legend writer for the specified legend class
|
MapContext |
createMapContext() |
MapContextDrawer |
createMapContextDrawerInstance(java.lang.Class drawerClazz)
Creates a new instance of the provided
MapContextDrawer
implementation. |
IMultiLayerSymbol |
createMultiLayerSymbol(int shapeType) |
IMultiLayerSymbol |
createMultiLayerSymbol(java.lang.String symbolName) |
ISymbol |
createSymbol(int shapeType) |
ISymbol |
createSymbol(int shapeType,
java.awt.Color color) |
ISymbol |
createSymbol(java.lang.String symbolName) |
ISymbol |
createSymbol(java.lang.String symbolName,
java.awt.Color color) |
void |
deleteObserver(Observer o) |
void |
deleteObservers() |
java.io.File |
getColorTableLibraryFolder() |
int |
getDefaultCartographicSupportMeasureUnit() |
int |
getDefaultCartographicSupportReferenceSystem() |
IProjection |
getDefaultCRS()
Returns the default CRS.
|
java.lang.String |
getDefaultRasterLegend() |
java.awt.Color |
getDefaultSymbolColor() |
java.awt.Color |
getDefaultSymbolFillColor() |
java.awt.Font |
getDefaultSymbolFont() |
java.lang.String |
getDefaultVectorLegend() |
javax.swing.Icon |
getIcon(int geometryType,
boolean withSelection) |
java.lang.String |
getIconLayer(DataStore store) |
java.lang.String |
getIconLayer(java.lang.String providerName) |
ILabelingStrategy |
getLabelingStrategy(DataStore dataStore)
It returns the labeling strategy associated with a
DataStore. |
ILegend |
getLegend(DataStore dataStore)
It returns the legend associated with a
DataStore. |
java.util.List<java.lang.String> |
getLegendReadingFormats()
Format is a MIME type string.
|
java.util.List<java.lang.String> |
getLegendWritingFormats()
Format is a MIME type string.
|
java.lang.String |
getSymbolFileExtension() |
java.lang.String |
getSymbolLibraryPath() |
SymbolManager |
getSymbolManager()
Returns the current
SymbolManager. |
IWarningSymbol |
getWarningSymbol(java.lang.String message,
java.lang.String symbolDesc,
int symbolDrawExceptionType) |
boolean |
isDefaultSymbolFillColorAleatory() |
ISymbol[] |
loadSymbols(java.io.File folder) |
ISymbol[] |
loadSymbols(java.io.File folder,
java.io.FileFilter filter) |
Notification |
notifyLoadLayer(FLayer layer) |
Notification |
notifyLoadMapContext(MapContext mapContext) |
protected Notification |
notifyObservers(java.lang.String type,
java.lang.Object value) |
protected Notification |
notifyObservers(java.lang.String type,
java.lang.Object value1,
java.lang.Object value2) |
protected Notification |
notifyObservers(java.lang.String type,
java.lang.Object value1,
java.lang.Object value2,
java.lang.Object value3) |
void |
registerIconLayer(java.lang.String storeProviderName,
java.lang.String iconName) |
boolean |
registerLayer(java.lang.Class theClass,
java.lang.Class<? extends FLayer> layerClass) |
boolean |
registerLayer(Factory<FLayer> factory)
Register a factory to create new layers based on the parameters
of the store and the store itself.
|
void |
registerLegend(java.lang.String legendName,
java.lang.Class legendClass) |
void |
registerLegendReader(java.lang.String format,
java.lang.Class readerClass)
Registers legend reader.
|
void |
registerLegendWriter(java.lang.Class legendClass,
java.lang.String format,
java.lang.Class writerClass)
Registers legend writer.
|
void |
registerMultiLayerSymbol(java.lang.String symbolName,
java.lang.Class symbolClass) |
void |
registerMultiLayerSymbol(java.lang.String symbolName,
int[] shapeTypes,
java.lang.Class symbolClass) |
void |
registerSymbol(java.lang.String symbolName,
java.lang.Class symbolClass) |
void |
registerSymbol(java.lang.String symbolName,
int[] shapeTypes,
java.lang.Class symbolClass) |
void |
resetDefaultSymbolColor() |
void |
resetDefaultSymbolFillColor() |
void |
resetDefaultSymbolFillColorAleatory() |
void |
resetDefaultSymbolFont() |
void |
resetSymbolLibraryPath() |
void |
saveSymbol(ISymbol symbol,
java.lang.String fileName,
java.io.File folder) |
void |
saveSymbol(ISymbol symbol,
java.lang.String fileName,
java.io.File folder,
boolean overwrite) |
void |
setColorTableLibraryFolder(java.io.File colorTableLibraryFolder) |
void |
setDefaultCartographicSupportMeasureUnit(int defaultCartographicSupportMeasureUnit) |
void |
setDefaultCartographicSupportReferenceSystem(int defaultCartographicSupportReferenceSystem) |
void |
setDefaultMapContextDrawer(java.lang.Class drawerClazz)
Sets the class to use as the default implementation for the
MapContextDrawer. |
void |
setDefaultRasterLegend(java.lang.String defaultRasterLegend) |
void |
setDefaultSymbolColor(java.awt.Color defaultSymbolColor) |
void |
setDefaultSymbolFillColor(java.awt.Color defaultSymbolFillColor) |
void |
setDefaultSymbolFillColorAleatory(boolean defaultSymbolFillColorAleatory) |
void |
setDefaultSymbolFont(java.awt.Font defaultSymbolFont) |
void |
setDefaultVectorLegend(java.lang.String defaultVectorLegend) |
void |
setSymbolFileExtension(java.lang.String extension) |
void |
setSymbolLibraryPath(java.lang.String symbolLibraryPath) |
void |
validateMapContextDrawer(java.lang.Class drawerClazz) |
public MapContext createMapContext()
createMapContext in interface MapContextManagerpublic SymbolManager getSymbolManager()
MapContextManagerSymbolManager.getSymbolManager in interface MapContextManagerSymbolManagerpublic java.lang.String getSymbolLibraryPath()
getSymbolLibraryPath in interface MapContextManagerSymbolPreferences}.public void setSymbolLibraryPath(java.lang.String symbolLibraryPath)
setSymbolLibraryPath in interface MapContextManagerSymbolPreferences}.public void resetSymbolLibraryPath()
resetSymbolLibraryPath in interface MapContextManagerSymbolPreferences}.public java.awt.Color getDefaultSymbolColor()
getDefaultSymbolColor in interface MapContextManagerSymbolPreferences}.public java.awt.Color getDefaultSymbolFillColor()
getDefaultSymbolFillColor in interface MapContextManagerSymbolPreferences}.public java.awt.Font getDefaultSymbolFont()
getDefaultSymbolFont in interface MapContextManagerSymbolPreferences}.public java.lang.String getSymbolFileExtension()
public boolean isDefaultSymbolFillColorAleatory()
isDefaultSymbolFillColorAleatory in interface MapContextManagerSymbolPreferences}.public void resetDefaultSymbolColor()
resetDefaultSymbolColor in interface MapContextManagerSymbolPreferences}.public void resetDefaultSymbolFillColor()
resetDefaultSymbolFillColor in interface MapContextManagerSymbolPreferences}.public void resetDefaultSymbolFillColorAleatory()
resetDefaultSymbolFillColorAleatory in interface MapContextManagerSymbolPreferences}.public void resetDefaultSymbolFont()
resetDefaultSymbolFont in interface MapContextManagerSymbolPreferences}.public void setDefaultSymbolColor(java.awt.Color defaultSymbolColor)
setDefaultSymbolColor in interface MapContextManagerSymbolPreferences}.public void setDefaultSymbolFillColor(java.awt.Color defaultSymbolFillColor)
setDefaultSymbolFillColor in interface MapContextManagerSymbolPreferences}.public void setDefaultSymbolFillColorAleatory(boolean defaultSymbolFillColorAleatory)
setDefaultSymbolFillColorAleatory in interface MapContextManagerSymbolPreferences}.public void setDefaultSymbolFont(java.awt.Font defaultSymbolFont)
setDefaultSymbolFont in interface MapContextManagerSymbolPreferences}.public void setSymbolFileExtension(java.lang.String extension)
public int getDefaultCartographicSupportMeasureUnit()
getDefaultCartographicSupportMeasureUnit in interface MapContextManagerSymbolPreferences}.public void setDefaultCartographicSupportMeasureUnit(int defaultCartographicSupportMeasureUnit)
setDefaultCartographicSupportMeasureUnit in interface MapContextManagerSymbolPreferences}.public int getDefaultCartographicSupportReferenceSystem()
getDefaultCartographicSupportReferenceSystem in interface MapContextManagerSymbolPreferences}.public void setDefaultCartographicSupportReferenceSystem(int defaultCartographicSupportReferenceSystem)
setDefaultCartographicSupportReferenceSystem in interface MapContextManagerSymbolPreferences}.public MapContextDrawer createMapContextDrawerInstance(java.lang.Class drawerClazz) throws MapContextException
MapContextManagerMapContextDrawer
implementation.createMapContextDrawerInstance in interface MapContextManagerdrawerClazz - the MapContextDrawer implementation classMapContextDrawer instanceMapContextException - if there is an error creating the new object
instancepublic MapContextDrawer createDefaultMapContextDrawerInstance() throws MapContextException
MapContextManagerMapContextDrawer
implementation.createDefaultMapContextDrawerInstance in interface MapContextManagerMapContextDrawer instanceMapContextException - if there is an error creating the new object
instancepublic void setDefaultMapContextDrawer(java.lang.Class drawerClazz)
throws MapContextException
MapContextManagerMapContextDrawer.setDefaultMapContextDrawer in interface MapContextManagerdrawerClazz - the MapContextDrawer class to useMapContextException - if there is any error setting the classpublic void validateMapContextDrawer(java.lang.Class drawerClazz)
throws MapContextException
validateMapContextDrawer in interface MapContextManagerMapContextExceptionpublic GraphicLayer createGraphicsLayer(IProjection projection)
MapContextManagerGraphicLayer.createGraphicsLayer in interface MapContextManagerprojection - used in the layer.GraphicLayer.public java.lang.String getDefaultVectorLegend()
getDefaultVectorLegend in interface MapContextManagerpublic void setDefaultVectorLegend(java.lang.String defaultVectorLegend)
setDefaultVectorLegend in interface MapContextManagerpublic java.lang.String getDefaultRasterLegend()
getDefaultRasterLegend in interface MapContextManagerpublic void setDefaultRasterLegend(java.lang.String defaultRasterLegend)
setDefaultRasterLegend in interface MapContextManagerpublic void registerLegend(java.lang.String legendName,
java.lang.Class legendClass)
throws MapContextRuntimeException
registerLegend in interface MapContextManagerMapContextRuntimeExceptionpublic ILegend createLegend(java.lang.String legendName) throws MapContextRuntimeException
createLegend in interface MapContextManagerMapContextRuntimeExceptionpublic IVectorLegend createDefaultVectorLegend(int shapeType) throws MapContextRuntimeException
createDefaultVectorLegend in interface MapContextManagerMapContextRuntimeExceptionpublic RasterLegend createDefaultRasterLegend(java.util.List<BandDescriptor> bands) throws MapContextRuntimeException
createDefaultRasterLegend in interface MapContextManagerMapContextRuntimeExceptionpublic java.util.List<java.lang.String> getLegendReadingFormats()
MapContextManagergetLegendReadingFormats in interface MapContextManagerpublic java.util.List<java.lang.String> getLegendWritingFormats()
MapContextManagergetLegendWritingFormats in interface MapContextManagerpublic void registerLegendReader(java.lang.String format,
java.lang.Class readerClass)
throws MapContextRuntimeException
MapContextManagerregisterLegendReader in interface MapContextManagerMapContextRuntimeExceptionpublic void registerLegendWriter(java.lang.Class legendClass,
java.lang.String format,
java.lang.Class writerClass)
throws MapContextRuntimeException
MapContextManagerregisterLegendWriter in interface MapContextManagerlegendClass - Legend classformat - File type in mime format.writerClass - Class object of the writerMapContextRuntimeExceptionpublic ILegendReader createLegendReader(java.lang.String format) throws MapContextRuntimeException
MapContextManagercreateLegendReader in interface MapContextManagerMapContextRuntimeExceptionpublic ILegendWriter createLegendWriter(java.lang.Class legendClass, java.lang.String format) throws MapContextRuntimeException
MapContextManagercreateLegendWriter in interface MapContextManagerMapContextRuntimeExceptionpublic IMultiLayerSymbol createMultiLayerSymbol(int shapeType) throws MapContextRuntimeException
createMultiLayerSymbol in interface MapContextManagerMapContextRuntimeExceptionpublic IMultiLayerSymbol createMultiLayerSymbol(java.lang.String symbolName) throws MapContextRuntimeException
createMultiLayerSymbol in interface MapContextManagerMapContextRuntimeExceptionpublic ISymbol createSymbol(int shapeType, java.awt.Color color) throws MapContextRuntimeException
createSymbol in interface MapContextManagerMapContextRuntimeExceptionpublic ISymbol createSymbol(int shapeType) throws MapContextRuntimeException
createSymbol in interface MapContextManagerMapContextRuntimeExceptionpublic ISymbol createSymbol(java.lang.String symbolName, java.awt.Color color) throws MapContextRuntimeException
createSymbol in interface MapContextManagerMapContextRuntimeExceptionpublic ISymbol createSymbol(java.lang.String symbolName) throws MapContextRuntimeException
createSymbol in interface MapContextManagerMapContextRuntimeExceptionpublic IWarningSymbol getWarningSymbol(java.lang.String message, java.lang.String symbolDesc, int symbolDrawExceptionType) throws MapContextRuntimeException
getWarningSymbol in interface MapContextManagerMapContextRuntimeExceptionpublic ISymbol[] loadSymbols(java.io.File folder, java.io.FileFilter filter) throws SymbolException
SymbolExceptionpublic ISymbol[] loadSymbols(java.io.File folder) throws SymbolException
SymbolExceptionpublic void registerMultiLayerSymbol(java.lang.String symbolName,
java.lang.Class symbolClass)
throws MapContextRuntimeException
registerMultiLayerSymbol in interface MapContextManagerMapContextRuntimeExceptionpublic void registerMultiLayerSymbol(java.lang.String symbolName,
int[] shapeTypes,
java.lang.Class symbolClass)
throws MapContextRuntimeException
registerMultiLayerSymbol in interface MapContextManagerMapContextRuntimeExceptionpublic void registerSymbol(java.lang.String symbolName,
java.lang.Class symbolClass)
throws MapContextRuntimeException
registerSymbol in interface MapContextManagerMapContextRuntimeExceptionpublic void registerSymbol(java.lang.String symbolName,
int[] shapeTypes,
java.lang.Class symbolClass)
throws MapContextException
registerSymbol in interface MapContextManagerMapContextExceptionpublic void saveSymbol(ISymbol symbol, java.lang.String fileName, java.io.File folder, boolean overwrite) throws SymbolException
SymbolExceptionpublic void saveSymbol(ISymbol symbol, java.lang.String fileName, java.io.File folder) throws SymbolException
SymbolExceptionpublic boolean registerLayer(java.lang.Class theClass,
java.lang.Class<? extends FLayer> layerClass)
registerLayer in interface MapContextManagerpublic boolean registerLayer(Factory<FLayer> factory)
MapContextManagerregisterLayer in interface MapContextManagerpublic FLayer createLayer(java.lang.String layerName, DataStoreParameters dataParameters) throws LoadLayerException
MapContextManagercreateLayer in interface MapContextManagerlayerName - name used in for the new layer.dataParameters - used for create the DataStore of the new layerLoadLayerExceptionpublic FLayer createLayer(java.lang.String layerName, DataStore dataStore) throws LoadLayerException
MapContextManagerDataStore.createLayer in interface MapContextManagerlayerName - name used in for the new layer.dataStore - used for the new layerLoadLayerExceptionpublic FLayer createLayer(java.lang.String layerName, MapContextManager.CreateLayerParameters parameters) throws LoadLayerException
createLayer in interface MapContextManagerLoadLayerExceptionpublic FLayer createLayer(java.lang.String layerName, DataStore dataStore, MapContextManager.CreateLayerParameters parameters) throws LoadLayerException
createLayer in interface MapContextManagerLoadLayerExceptionpublic ILegend getLegend(DataStore dataStore)
MapContextManagerDataStore. If the legend
doesn't exist it returns null.getLegend in interface MapContextManagerdataStore - the store that could have a legend.null.public ILabelingStrategy getLabelingStrategy(DataStore dataStore)
MapContextManagerDataStore. If
the labeling strategy doesn't exist it returns null.getLabelingStrategy in interface MapContextManagerdataStore - the store that could have a labeling strategy.null.public void registerIconLayer(java.lang.String storeProviderName,
java.lang.String iconName)
registerIconLayer in interface MapContextManagerpublic java.lang.String getIconLayer(DataStore store)
getIconLayer in interface MapContextManagerpublic java.lang.String getIconLayer(java.lang.String providerName)
getIconLayer in interface MapContextManagerpublic IProjection getDefaultCRS()
MapContextManagergetDefaultCRS in interface MapContextManagerpublic Notification notifyLoadMapContext(MapContext mapContext)
public Notification notifyLoadLayer(FLayer layer)
public void addObserver(Observer o)
addObserver in interface Observablepublic void deleteObserver(Observer o)
deleteObserver in interface Observablepublic void deleteObservers()
deleteObservers in interface Observableprotected Notification notifyObservers(java.lang.String type, java.lang.Object value)
protected Notification notifyObservers(java.lang.String type, java.lang.Object value1, java.lang.Object value2)
protected Notification notifyObservers(java.lang.String type, java.lang.Object value1, java.lang.Object value2, java.lang.Object value3)
public java.io.File getColorTableLibraryFolder()
getColorTableLibraryFolder in interface MapContextManagerpublic void setColorTableLibraryFolder(java.io.File colorTableLibraryFolder)
setColorTableLibraryFolder in interface MapContextManagerpublic LayerInformationBuilder createLayerInformationBuilder()
createLayerInformationBuilder in interface MapContextManagerpublic javax.swing.Icon getIcon(int geometryType,
boolean withSelection)
getIcon in interface MapContextManager