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(Map<String,DynObjectSet> layerName2InfoByPoint)
          Creates a readonly component to view information of a set of layers.
 LayersDynObjectSetComponent createLayersDynObjectSetComponent(Map<String,DynObjectSet> layerName2InfoByPoint, boolean writable)
          Creates a component to view information of a set of layers.
 MapControlDrawer createMapControlDrawer(String name)
          Creates a MapControlDrawer from a name.
 ISymbol getAxisReferenceSymbol()
          Gets the symbol used to draw the axis of a geometry.
 Preferences getEditionPreferences()
           
 ISymbol getGeometrySelectionSymbol()
          Gets the symbol used to draw the selected geometries.
 ISymbol getHandlerSymbol()
          Gets the symbol used to draw the handlers.
 ISymbol getSelectionSymbol()
          Deprecated. the symbol for edition is the selection symbol
 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(Class mapControlDrawerClass)
          It registers the default implementation for the MapControlDrawer.
 void registerMapControlDrawer(String name, Class mapControolDrawerClass)
          Register a MapControlDrawer by name.
 void registerSnapper(String name, Class snapperClass)
          Add a snapper.
 void setAxisReferenceSymbol(ISymbol axisReferencesSymbol)
          Sets the symbol that has to be used to draw a geometry that represent the axis of a geometry.
 void setGeometrySelectionSymbol(ISymbol geometrySelectionSymbol)
          Sets the symbol that has to be used to draw a geometry when it is selected.
 void setHandlerSymbol(ISymbol handlerSymbol)
          Sets the symbol that has to be used to draw the handlers.
 void setSelectionSymbol(ISymbol selectionSymbol)
          Deprecated. the symbol for edition is the selection symbol
 void setTolerance(int tolerance)
          Sets the tolerance (in pixels) that has to be used by the tools that use snapping.
 

Method Detail

createJMapControlPanel

MapControl createJMapControlPanel()
                                  throws MapControlCreationException
Throws:
MapControlCreationException

registerMapControlDrawer

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

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

createMapControlDrawer

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

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

registerDefaultMapControlDrawer

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

Parameters:
mapControlDrawerClass - A MapControlDrawer.

createDefaultMapControlDrawer

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

Returns:
The default MapControlDrawer.
Throws:
MapControlCreationException

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.

registerSnapper

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

Parameters:
snapper -

getEditionPreferences

Preferences getEditionPreferences()

getTolerance

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

Returns:
The distance in pixels.

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

setSelectionSymbol

void setSelectionSymbol(ISymbol selectionSymbol)
Deprecated. the symbol for edition is the selection symbol

Sets the symbol that has to be used to draw a geometry when it is selected.

Parameters:
selectionSymbol - The symbol to apply.

getSelectionSymbol

ISymbol getSelectionSymbol()
Deprecated. the symbol for edition is the selection symbol

Gets the symbol used to draw the selected geometries.

Returns:
The symbol used to draw the selected geometries.

setAxisReferenceSymbol

void setAxisReferenceSymbol(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.

getAxisReferenceSymbol

ISymbol getAxisReferenceSymbol()
Gets the symbol used to draw the axis of a geometry.

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

setGeometrySelectionSymbol

void setGeometrySelectionSymbol(ISymbol geometrySelectionSymbol)
Sets the symbol that has to be used to draw a geometry when it is selected.

Parameters:
geometrySelectionSymbol - The symbol to apply.

getGeometrySelectionSymbol

ISymbol getGeometrySelectionSymbol()
Gets the symbol used to draw the selected geometries.

Returns:
The symbol used to draw the selected geometries.

setHandlerSymbol

void setHandlerSymbol(ISymbol handlerSymbol)
Sets the symbol that has to be used to draw the handlers.

Parameters:
handlerSymbol - The symbol to apply.

getHandlerSymbol

ISymbol getHandlerSymbol()
Gets the symbol used to draw the handlers.

Returns:
The symbol used to draw the handlers.

createLayersDynObjectSetComponent

LayersDynObjectSetComponent createLayersDynObjectSetComponent(Map<String,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(Map<String,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


Copyright © 2004-2013 gvSIG. All Rights Reserved.