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
  • Field Details

  • Method Details

    • createMapContext

      MapContext createMapContext()
    • registerLayer

      boolean registerLayer(Class theClass, Class<? extends FLayer> layerClass)
    • registerLayer

      boolean registerLayer(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. 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 the DataStore of the new layer
      Returns:
      the new FLayer
      Throws:
      LoadLayerException
    • createLayer

      FLayer createLayer(String layerName, MapContextManager.CreateLayerParameters parameters) throws LoadLayerException
      Throws:
      LoadLayerException
    • createLayer

      FLayer createLayer(String layerName, org.gvsig.fmap.dal.DataStore store) throws LoadLayerException
      Create a layer from a DataStore.
      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

      GraphicLayer createGraphicsLayer(org.gvsig.crs.projection.lib.Projection projection)
      Create a layer to be used as the GraphicLayer.
      Parameters:
      projection - used in the layer.
      Returns:
      the new GraphicLayer.
    • getSymbolManager

      SymbolManager getSymbolManager()
      Returns the current SymbolManager.
      Returns:
      the SymbolManager
    • setDefaultMapContextDrawer

      void setDefaultMapContextDrawer(Class drawerClazz) throws MapContextException
      Sets the class to use as the default implementation for the MapContextDrawer.
      Parameters:
      drawerClazz - the MapContextDrawer class to use
      Throws:
      MapContextException - if there is any error setting the class
    • validateMapContextDrawer

      void validateMapContextDrawer(Class drawerClazz) throws MapContextException
      Throws:
      MapContextException
    • createDefaultMapContextDrawerInstance

      MapContextDrawer createDefaultMapContextDrawerInstance() throws MapContextException
      Creates a new instance of the default MapContextDrawer implementation.
      Returns:
      the new MapContextDrawer instance
      Throws:
      MapContextException - if there is an error creating the new object instance
    • createMapContextDrawerInstance

      MapContextDrawer createMapContextDrawerInstance(Class drawerClazz) throws MapContextException
      Creates a new instance of the provided MapContextDrawer implementation.
      Parameters:
      drawerClazz - the MapContextDrawer implementation class
      Returns:
      the new MapContextDrawer instance
      Throws:
      MapContextException - if there is an error creating the new object instance
    • registerLegend

      void registerLegend(String legendName, Class legendClass) throws MapContextRuntimeException
      Throws:
      MapContextRuntimeException
    • createLegend

      ILegend createLegend(String legendName) throws MapContextRuntimeException
      Throws:
      MapContextRuntimeException
    • getDefaultVectorLegend

      String getDefaultVectorLegend()
    • setDefaultVectorLegend

      void setDefaultVectorLegend(String legendName)
    • getDefaultRasterLegend

      String getDefaultRasterLegend()
    • setDefaultRasterLegend

      void setDefaultRasterLegend(String defaultRasterLegend)
    • createDefaultVectorLegend

      IVectorLegend createDefaultVectorLegend(int shapeType) throws MapContextRuntimeException
      Throws:
      MapContextRuntimeException
    • createDefaultRasterLegend

      RasterLegend createDefaultRasterLegend(List<org.gvsig.fmap.dal.raster.BandDescriptor> bands)
    • 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 class
      format - File type in mime format.
      writerClass - Class object of the writer
      Throws:
      MapContextRuntimeException
    • registerLegendReader

      void registerLegendReader(String format, Class readerClass) throws MapContextRuntimeException
      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

      ILegendWriter createLegendWriter(Class legendClass, String format) throws MapContextException
      Creates a legend writer for the specified legend class
      Parameters:
      legendClass -
      format -
      Returns:
      Throws:
      MapContextException
    • createLegendReader

      ILegendReader createLegendReader(String format) throws MapContextRuntimeException
      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

      void setDefaultSymbolColor(Color defaultSymbolColor)
      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

      void setDefaultSymbolFillColor(Color defaultSymbolFillColor)
      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

      void setDefaultSymbolFont(Font defaultSymbolFont)
      Parameters:
      defaultSymbolFont -
    • resetDefaultSymbolFont

      void resetDefaultSymbolFont()
    • getSymbolLibraryPath

      String getSymbolLibraryPath()
      Returns:
      @Deprecated to be removed in gvSIG 2.0
    • setSymbolLibraryPath

      void setSymbolLibraryPath(String symbolLibraryPath)
      Parameters:
      symbolLibraryPath -
    • resetSymbolLibraryPath

      void resetSymbolLibraryPath()
    • createSymbol

      ISymbol createSymbol(String symbolName) throws MapContextRuntimeException
      Parameters:
      symbolName -
      Returns:
      Throws:
      MapContextRuntimeException
    • createSymbol

      ISymbol createSymbol(int shapeType) throws MapContextRuntimeException
      Parameters:
      shapeType -
      Returns:
      Throws:
      MapContextRuntimeException
    • createSymbol

      ISymbol createSymbol(String symbolName, Color color) throws MapContextRuntimeException
      Parameters:
      symbolName -
      color -
      Returns:
      Throws:
      MapContextRuntimeException
    • createSymbol

      ISymbol createSymbol(int shapeType, Color color) throws MapContextRuntimeException
      Parameters:
      shapeType -
      color -
      Returns:
      Throws:
      MapContextRuntimeException
    • createMultiLayerSymbol

      IMultiLayerSymbol createMultiLayerSymbol(String symbolName) throws MapContextRuntimeException
      Parameters:
      symbolName -
      Returns:
      Throws:
      MapContextRuntimeException
    • createMultiLayerSymbol

      IMultiLayerSymbol createMultiLayerSymbol(int shapeType) throws MapContextRuntimeException
      Parameters:
      shapeType -
      Returns:
      Throws:
      MapContextRuntimeException
    • registerSymbol

      void registerSymbol(String symbolName, Class symbolClass) throws MapContextRuntimeException
      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

      ILegend getLegend(org.gvsig.fmap.dal.DataStore dataStore)
      It returns the legend associated with a DataStore. If the legend doesn't exist it returns null.
      Parameters:
      dataStore - the store that could have a legend.
      Returns:
      the legend or null.
    • getLabelingStrategy

      ILabelingStrategy getLabelingStrategy(org.gvsig.fmap.dal.DataStore dataStore)
      It returns the labeling strategy associated with a DataStore. If the labeling strategy doesn't exist it returns null.
      Parameters:
      dataStore - the store that could have a labeling strategy.
      Returns:
      the labeling strategy or null.
    • registerIconLayer

      void registerIconLayer(String store, String iconName)
    • getIconLayer

      String getIconLayer(org.gvsig.fmap.dal.DataStore store)
    • getIconLayer

      String getIconLayer(String providerName)
    • 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

      void setColorTableLibraryFolder(File colorTableLibraryFolder)
    • createLayerInformationBuilder

      LayerInformationBuilder createLayerInformationBuilder()
    • getIcon

      Icon getIcon(int geometryType, boolean hasSelection)