public class DefaultMapContextManager extends Object implements MapContextManager
MapContextManager
.CREATE_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() |
public MapContext createMapContext()
createMapContext
in interface MapContextManager
public SymbolManager getSymbolManager()
MapContextManager
SymbolManager
.getSymbolManager
in interface MapContextManager
SymbolManager
public String getSymbolLibraryPath()
getSymbolLibraryPath
in interface MapContextManager
SymbolPreferences}.
public void setSymbolLibraryPath(String symbolLibraryPath)
setSymbolLibraryPath
in interface MapContextManager
SymbolPreferences}.
public void resetSymbolLibraryPath()
resetSymbolLibraryPath
in interface MapContextManager
SymbolPreferences}.
public Color getDefaultSymbolColor()
getDefaultSymbolColor
in interface MapContextManager
SymbolPreferences}.
public Color getDefaultSymbolFillColor()
getDefaultSymbolFillColor
in interface MapContextManager
SymbolPreferences}.
public Font getDefaultSymbolFont()
getDefaultSymbolFont
in interface MapContextManager
SymbolPreferences}.
public String getSymbolFileExtension()
public boolean isDefaultSymbolFillColorAleatory()
isDefaultSymbolFillColorAleatory
in interface MapContextManager
SymbolPreferences}.
public void resetDefaultSymbolColor()
resetDefaultSymbolColor
in interface MapContextManager
SymbolPreferences}.
public void resetDefaultSymbolFillColor()
resetDefaultSymbolFillColor
in interface MapContextManager
SymbolPreferences}.
public void resetDefaultSymbolFillColorAleatory()
resetDefaultSymbolFillColorAleatory
in interface MapContextManager
SymbolPreferences}.
public void resetDefaultSymbolFont()
resetDefaultSymbolFont
in interface MapContextManager
SymbolPreferences}.
public void setDefaultSymbolColor(Color defaultSymbolColor)
setDefaultSymbolColor
in interface MapContextManager
SymbolPreferences}.
public void setDefaultSymbolFillColor(Color defaultSymbolFillColor)
setDefaultSymbolFillColor
in interface MapContextManager
SymbolPreferences}.
public void setDefaultSymbolFillColorAleatory(boolean defaultSymbolFillColorAleatory)
setDefaultSymbolFillColorAleatory
in interface MapContextManager
SymbolPreferences}.
public void setDefaultSymbolFont(Font defaultSymbolFont)
setDefaultSymbolFont
in interface MapContextManager
SymbolPreferences}.
public void setSymbolFileExtension(String extension)
public int getDefaultCartographicSupportMeasureUnit()
getDefaultCartographicSupportMeasureUnit
in interface MapContextManager
SymbolPreferences}.
public void setDefaultCartographicSupportMeasureUnit(int defaultCartographicSupportMeasureUnit)
setDefaultCartographicSupportMeasureUnit
in interface MapContextManager
SymbolPreferences}.
public int getDefaultCartographicSupportReferenceSystem()
getDefaultCartographicSupportReferenceSystem
in interface MapContextManager
SymbolPreferences}.
public void setDefaultCartographicSupportReferenceSystem(int defaultCartographicSupportReferenceSystem)
setDefaultCartographicSupportReferenceSystem
in interface MapContextManager
SymbolPreferences}.
public MapContextDrawer createMapContextDrawerInstance(Class drawerClazz) throws MapContextException
MapContextManager
MapContextDrawer
implementation.createMapContextDrawerInstance
in interface MapContextManager
drawerClazz
- the MapContextDrawer
implementation classMapContextDrawer
instanceMapContextException
- if there is an error creating the new object instancepublic MapContextDrawer createDefaultMapContextDrawerInstance() throws MapContextException
MapContextManager
MapContextDrawer
implementation.createDefaultMapContextDrawerInstance
in interface MapContextManager
MapContextDrawer
instanceMapContextException
- if there is an error creating the new object instancepublic void setDefaultMapContextDrawer(Class drawerClazz) throws MapContextException
MapContextManager
MapContextDrawer
.setDefaultMapContextDrawer
in interface MapContextManager
drawerClazz
- the MapContextDrawer
class to useMapContextException
- if there is any error setting the classpublic void validateMapContextDrawer(Class drawerClazz) throws MapContextException
validateMapContextDrawer
in interface MapContextManager
MapContextException
public GraphicLayer createGraphicsLayer(IProjection projection)
MapContextManager
GraphicLayer
.createGraphicsLayer
in interface MapContextManager
projection
- used in the layer.GraphicLayer
.public String getDefaultVectorLegend()
public void setDefaultVectorLegend(String defaultVectorLegend)
setDefaultVectorLegend
in interface MapContextManager
public void registerLegend(String legendName, Class legendClass) throws MapContextRuntimeException
registerLegend
in interface MapContextManager
MapContextRuntimeException
public ILegend createLegend(String legendName) throws MapContextRuntimeException
createLegend
in interface MapContextManager
MapContextRuntimeException
public IVectorLegend createDefaultVectorLegend(int shapeType) throws MapContextRuntimeException
createDefaultVectorLegend
in interface MapContextManager
MapContextRuntimeException
public void registerLegendReader(String format, Class readerClass) throws MapContextRuntimeException
MapContextManager
registerLegendReader
in interface MapContextManager
MapContextRuntimeException
public ILegendReader createLegendReader(String format) throws MapContextRuntimeException
MapContextManager
createLegendReader
in interface MapContextManager
MapContextRuntimeException
public void registerLegendWriter(Class legendClass, String format, Class writerClass) throws MapContextRuntimeException
MapContextManager
registerLegendWriter
in interface MapContextManager
legendClass
- Legend classformat
- File type in mime format.writerClass
- Class object of the writerMapContextRuntimeException
public ILegendWriter createLegendWriter(Class legendClass, String format) throws MapContextRuntimeException
MapContextManager
createLegendWriter
in interface MapContextManager
MapContextRuntimeException
public List getLegendReadingFormats()
MapContextManager
getLegendReadingFormats
in interface MapContextManager
public List getLegendWritingFormats()
MapContextManager
getLegendWritingFormats
in interface MapContextManager
public IMultiLayerSymbol createMultiLayerSymbol(int shapeType) throws MapContextRuntimeException
createMultiLayerSymbol
in interface MapContextManager
MapContextRuntimeException
public IMultiLayerSymbol createMultiLayerSymbol(String symbolName) throws MapContextRuntimeException
createMultiLayerSymbol
in interface MapContextManager
MapContextRuntimeException
public ISymbol createSymbol(int shapeType, Color color) throws MapContextRuntimeException
createSymbol
in interface MapContextManager
MapContextRuntimeException
public ISymbol createSymbol(int shapeType) throws MapContextRuntimeException
createSymbol
in interface MapContextManager
MapContextRuntimeException
public ISymbol createSymbol(String symbolName, Color color) throws MapContextRuntimeException
createSymbol
in interface MapContextManager
MapContextRuntimeException
public ISymbol createSymbol(String symbolName) throws MapContextRuntimeException
createSymbol
in interface MapContextManager
MapContextRuntimeException
public IWarningSymbol getWarningSymbol(String message, String symbolDesc, int symbolDrawExceptionType) throws MapContextRuntimeException
getWarningSymbol
in interface MapContextManager
MapContextRuntimeException
public ISymbol[] loadSymbols(File folder, FileFilter filter) throws SymbolException
SymbolException
public ISymbol[] loadSymbols(File folder) throws SymbolException
SymbolException
public void registerMultiLayerSymbol(String symbolName, Class symbolClass) throws MapContextRuntimeException
registerMultiLayerSymbol
in interface MapContextManager
MapContextRuntimeException
public void registerMultiLayerSymbol(String symbolName, int[] shapeTypes, Class symbolClass) throws MapContextRuntimeException
registerMultiLayerSymbol
in interface MapContextManager
MapContextRuntimeException
public void registerSymbol(String symbolName, Class symbolClass) throws MapContextRuntimeException
registerSymbol
in interface MapContextManager
MapContextRuntimeException
public void registerSymbol(String symbolName, int[] shapeTypes, Class symbolClass) throws MapContextException
registerSymbol
in interface MapContextManager
MapContextException
public void saveSymbol(ISymbol symbol, String fileName, File folder, boolean overwrite) throws SymbolException
SymbolException
public void saveSymbol(ISymbol symbol, String fileName, File folder) throws SymbolException
SymbolException
public FLayer createLayer(String layerName, DataStoreParameters parameters) throws LoadLayerException
MapContextManager
createLayer
in interface MapContextManager
layerName
- name used in for the new layer.parameters
- used for create the DataStore
of the new layerLoadLayerException
public FLayer createLayer(String layerName, DataStore store) throws LoadLayerException
MapContextManager
DataStore
.createLayer
in interface MapContextManager
layerName
- name used in for the new layer.store
- used for the new layerLoadLayerException
public ILegend getLegend(DataStore dataStore)
MapContextManager
DataStore
.
If the legend doesn't exist it returns null
.getLegend
in interface MapContextManager
dataStore
- the store that could have a legend.null
.public ILabelingStrategy getLabelingStrategy(DataStore dataStore)
MapContextManager
DataStore
.
If the labeling strategy doesn't exist it returns null
.getLabelingStrategy
in interface MapContextManager
dataStore
- the store that could have a labeling strategy.null
.public void registerIconLayer(String storeProviderName, String iconName)
registerIconLayer
in interface MapContextManager
public String getIconLayer(DataStore store)
getIconLayer
in interface MapContextManager
public IProjection getDefaultCRS()
MapContextManager
getDefaultCRS
in interface MapContextManager
public Notification notifyLoadMapContext(MapContext mapContext)
public Notification notifyLoadLayer(FLayer layer)
public void addObserver(Observer o)
addObserver
in interface Observable
public void deleteObserver(Observer o)
deleteObserver
in interface Observable
public void deleteObservers()
deleteObservers
in interface Observable
protected Notification notifyObservers(String type, Object value)
protected Notification notifyObservers(String type, Object value1, Object value2)
protected Notification notifyObservers(String type, Object value1, Object value2, Object value3)
public File getColorTableLibraryFolder()
getColorTableLibraryFolder
in interface MapContextManager
public void setColorTableLibraryFolder(File colorTableLibraryFolder)
setColorTableLibraryFolder
in interface MapContextManager
public LayerInformationBuilder createLayerInformationBuilder()
createLayerInformationBuilder
in interface MapContextManager