org.gvsig.fmap.mapcontrol
Interface MapControlManager

All Known Implementing Classes:
DefaultMapControlManager

public interface MapControlManager

This class is the manager of the MapControl library. It is used to manage all the properties related with the drawing of objects in a map, including default symbols used to draw objects in a map, the tolerance used by the selection or edition tools...

It also holds the implementations of the MapControlDrawer's, that is the responsible to draw graphical objects in a map.

Author:
Jorge Piera

Method Summary
 MapControlDrawer createDefaultMapControlDrawer()
          It returns the default implementation for the MapControlDrawer.
 MapControl createJMapControlPanel()
           
 LayersDynObjectSetComponent createLayersDynObjectSetComponent(java.util.Map<java.lang.String,org.gvsig.tools.dynobject.DynObjectSet> layerName2InfoByPoint)
          Creates a readonly component to view information of a set of layers.
 LayersDynObjectSetComponent createLayersDynObjectSetComponent(java.util.Map<java.lang.String,org.gvsig.tools.dynobject.DynObjectSet> layerName2InfoByPoint, boolean writable)
          Creates a component to view information of a set of layers.
 MapControlDrawer createMapControlDrawer(java.lang.String name)
          Creates a MapControlDrawer from a name.
 org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getAxisReferenceSymbol()
          Gets the symbol used to draw the axis of a geometry.
 java.util.prefs.Preferences getEditionPreferences()
           
 org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getGeometrySelectionSymbol()
          Gets the symbol used to draw the selected geometries.
 org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getHandlerSymbol()
          Gets the symbol used to draw the handlers.
 ISnapper getSnapperAt(int index)
          Returns a snapper in a concrete position;
 int getSnapperCount()
          Returns the number of registered snappers.
 int getTolerance()
          Tolerance (in pixels) that has to be used by the tools that use snapping.
 void registerDefaultMapControlDrawer(java.lang.Class mapControlDrawerClass)
          It registers the default implementation for the MapControlDrawer.
 void registerMapControlDrawer(java.lang.String name, java.lang.Class mapControolDrawerClass)
          Register a MapControlDrawer by name.
 void registerSnapper(java.lang.String name, java.lang.Class snapperClass)
          Add a snapper.
 void setAxisReferenceSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol axisReferencesSymbol)
          Sets the symbol that has to be used to draw a geometry that represent the axis of a geometry.
 void setGeometrySelectionSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol geometrySelectionSymbol)
          Sets the symbol that has to be used to draw a geometry when it is selected.
 void setHandlerSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol handlerSymbol)
          Sets the symbol that has to be used to draw the handlers.
 void setTolerance(int tolerance)
          Sets the tolerance (in pixels) that has to be used by the tools that use snapping.
 

Method Detail

createDefaultMapControlDrawer

MapControlDrawer createDefaultMapControlDrawer()
                                               throws MapControlCreationException
It returns the default implementation for the MapControlDrawer.

Returns:
The default MapControlDrawer.
Throws:
MapControlCreationException

createJMapControlPanel

MapControl createJMapControlPanel()
                                  throws MapControlCreationException
Throws:
MapControlCreationException

createLayersDynObjectSetComponent

LayersDynObjectSetComponent createLayersDynObjectSetComponent(java.util.Map<java.lang.String,org.gvsig.tools.dynobject.DynObjectSet> layerName2InfoByPoint)
Creates a readonly component to view information of a set of layers. The information must be provided as a set of DynObjects, through a DynObjectSet.

Parameters:
layerName2InfoByPoint - the map of DynObjectSet for each layer.
Returns:
the component to view the information

createLayersDynObjectSetComponent

LayersDynObjectSetComponent createLayersDynObjectSetComponent(java.util.Map<java.lang.String,org.gvsig.tools.dynobject.DynObjectSet> layerName2InfoByPoint,
                                                              boolean writable)
Creates a component to view information of a set of layers. The information must be provided as a set of DynObjects, through a DynObjectSet.

Parameters:
layerName2InfoByPoint - the map of DynObjectSet for each layer.
writable - if the DynObjects loaded must be able to be edited
Returns:
the component to view the information

createMapControlDrawer

MapControlDrawer createMapControlDrawer(java.lang.String name)
                                        throws MapControlCreationException
Creates a MapControlDrawer from a name.

Parameters:
name - Name of the MapControlDrawer.
Returns:
A MapControlDrawer.
Throws:
MapControlCreationException

getAxisReferenceSymbol

org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getAxisReferenceSymbol()
Gets the symbol used to draw the axis of a geometry.

Returns:
The symbol used to draw the axis of a geometry.

getEditionPreferences

java.util.prefs.Preferences getEditionPreferences()

getGeometrySelectionSymbol

org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getGeometrySelectionSymbol()
Gets the symbol used to draw the selected geometries.

Returns:
The symbol used to draw the selected geometries.

getHandlerSymbol

org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getHandlerSymbol()
Gets the symbol used to draw the handlers.

Returns:
The symbol used to draw the handlers.

getSnapperAt

ISnapper getSnapperAt(int index)
Returns a snapper in a concrete position;

Parameters:
index - Snapper position.
Returns:
A snapper.

getSnapperCount

int getSnapperCount()
Returns the number of registered snappers.

Returns:
The number of registered snappers.

getTolerance

int getTolerance()
Tolerance (in pixels) that has to be used by the tools that use snapping.

Returns:
The distance in pixels.

registerDefaultMapControlDrawer

void registerDefaultMapControlDrawer(java.lang.Class mapControlDrawerClass)
It registers the default implementation for the MapControlDrawer.

Parameters:
mapControlDrawerClass - A MapControlDrawer.

registerMapControlDrawer

void registerMapControlDrawer(java.lang.String name,
                              java.lang.Class mapControolDrawerClass)
Register a MapControlDrawer by name.

Parameters:
name - Name of the MapControlDrawer.
mapControolDrawerClass - Class used to draw graphical objects on a map.

registerSnapper

void registerSnapper(java.lang.String name,
                     java.lang.Class snapperClass)
Add a snapper.

Parameters:
snapper -

setAxisReferenceSymbol

void setAxisReferenceSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol axisReferencesSymbol)
Sets the symbol that has to be used to draw a geometry that represent the axis of a geometry.

Parameters:
axisReferencesSymbol - The symbol to apply.

setGeometrySelectionSymbol

void setGeometrySelectionSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol geometrySelectionSymbol)
Sets the symbol that has to be used to draw a geometry when it is selected.

Parameters:
geometrySelectionSymbol - The symbol to apply.

setHandlerSymbol

void setHandlerSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol handlerSymbol)
Sets the symbol that has to be used to draw the handlers.

Parameters:
handlerSymbol - The symbol to apply.

setTolerance

void setTolerance(int tolerance)
Sets the tolerance (in pixels) that has to be used by the tools that use snapping.

Parameters:
tolerance - The tolerance to apply


Copyright © 2014 gvSIG Association. All Rights Reserved.