org.gvsig.fmap.mapcontrol.impl
Class DefaultMapControlManager

java.lang.Object
  extended by org.gvsig.fmap.mapcontrol.impl.DefaultMapControlManager
All Implemented Interfaces:
MapControlManager

public class DefaultMapControlManager
extends java.lang.Object
implements MapControlManager

Author:
Jorge Piera

Constructor Summary
DefaultMapControlManager()
           
 
Method Summary
 void clearSnappers()
           
 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.
 void disableSnapping()
           
 void enableSnapping()
           
 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.
 org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSelectionSymbol()
          Gets the symbol used to draw the selected geometries.
 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 mapControlDrawerClass)
          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 setSelectionSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol selectionSymbol)
          Sets the symbol that has to be used to draw a geometry when it is selected.
 void setTolerance(int tolerance)
          Sets the tolerance (in pixels) that has to be used by the tools that use snapping.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMapControlManager

public DefaultMapControlManager()
Method Detail

clearSnappers

public void clearSnappers()

createDefaultMapControlDrawer

public MapControlDrawer createDefaultMapControlDrawer()
                                               throws MapControlCreationException
Description copied from interface: MapControlManager
It returns the default implementation for the MapControlDrawer.

Specified by:
createDefaultMapControlDrawer in interface MapControlManager
Returns:
The default MapControlDrawer.
Throws:
MapControlCreationException

createJMapControlPanel

public MapControl createJMapControlPanel()
                                  throws MapControlCreationException
Specified by:
createJMapControlPanel in interface MapControlManager
Throws:
MapControlCreationException

createLayersDynObjectSetComponent

public LayersDynObjectSetComponent createLayersDynObjectSetComponent(java.util.Map<java.lang.String,org.gvsig.tools.dynobject.DynObjectSet> layerName2InfoByPoint)
Description copied from interface: MapControlManager
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.

Specified by:
createLayersDynObjectSetComponent in interface MapControlManager
Parameters:
layerName2InfoByPoint - the map of DynObjectSet for each layer.
Returns:
the component to view the information

createLayersDynObjectSetComponent

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

Specified by:
createLayersDynObjectSetComponent in interface MapControlManager
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

public MapControlDrawer createMapControlDrawer(java.lang.String name)
                                        throws MapControlCreationException
Description copied from interface: MapControlManager
Creates a MapControlDrawer from a name.

Specified by:
createMapControlDrawer in interface MapControlManager
Parameters:
name - Name of the MapControlDrawer.
Returns:
A MapControlDrawer.
Throws:
MapControlCreationException

disableSnapping

public void disableSnapping()

enableSnapping

public void enableSnapping()

getAxisReferenceSymbol

public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getAxisReferenceSymbol()
Description copied from interface: MapControlManager
Gets the symbol used to draw the axis of a geometry.

Specified by:
getAxisReferenceSymbol in interface MapControlManager
Returns:
The symbol used to draw the axis of a geometry.

getEditionPreferences

public java.util.prefs.Preferences getEditionPreferences()
Specified by:
getEditionPreferences in interface MapControlManager

getGeometrySelectionSymbol

public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getGeometrySelectionSymbol()
Description copied from interface: MapControlManager
Gets the symbol used to draw the selected geometries.

Specified by:
getGeometrySelectionSymbol in interface MapControlManager
Returns:
The symbol used to draw the selected geometries.

getHandlerSymbol

public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getHandlerSymbol()
Description copied from interface: MapControlManager
Gets the symbol used to draw the handlers.

Specified by:
getHandlerSymbol in interface MapControlManager
Returns:
The symbol used to draw the handlers.

getSelectionSymbol

public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSelectionSymbol()
Description copied from interface: MapControlManager
Gets the symbol used to draw the selected geometries.

Specified by:
getSelectionSymbol in interface MapControlManager
Returns:
The symbol used to draw the selected geometries.

getSnapperAt

public ISnapper getSnapperAt(int index)
Description copied from interface: MapControlManager
Returns a snapper in a concrete position;

Specified by:
getSnapperAt in interface MapControlManager
Parameters:
index - Snapper position.
Returns:
A snapper.

getSnapperCount

public int getSnapperCount()
Description copied from interface: MapControlManager
Returns the number of registered snappers.

Specified by:
getSnapperCount in interface MapControlManager
Returns:
The number of registered snappers.

getTolerance

public int getTolerance()
Description copied from interface: MapControlManager
Tolerance (in pixels) that has to be used by the tools that use snapping.

Specified by:
getTolerance in interface MapControlManager
Returns:
The distance in pixels.

registerDefaultMapControlDrawer

public void registerDefaultMapControlDrawer(java.lang.Class mapControlDrawerClass)
Description copied from interface: MapControlManager
It registers the default implementation for the MapControlDrawer.

Specified by:
registerDefaultMapControlDrawer in interface MapControlManager
Parameters:
mapControlDrawerClass - A MapControlDrawer.

registerMapControlDrawer

public void registerMapControlDrawer(java.lang.String name,
                                     java.lang.Class mapControlDrawerClass)
Description copied from interface: MapControlManager
Register a MapControlDrawer by name.

Specified by:
registerMapControlDrawer in interface MapControlManager
Parameters:
name - Name of the MapControlDrawer.
mapControlDrawerClass - Class used to draw graphical objects on a map.

registerSnapper

public void registerSnapper(java.lang.String name,
                            java.lang.Class snapperClass)
Description copied from interface: MapControlManager
Add a snapper.

Specified by:
registerSnapper in interface MapControlManager

setAxisReferenceSymbol

public void setAxisReferenceSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol axisReferencesSymbol)
Description copied from interface: MapControlManager
Sets the symbol that has to be used to draw a geometry that represent the axis of a geometry.

Specified by:
setAxisReferenceSymbol in interface MapControlManager
Parameters:
axisReferencesSymbol - The symbol to apply.

setGeometrySelectionSymbol

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

Specified by:
setGeometrySelectionSymbol in interface MapControlManager
Parameters:
geometrySelectionSymbol - The symbol to apply.

setHandlerSymbol

public void setHandlerSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol handlerSymbol)
Description copied from interface: MapControlManager
Sets the symbol that has to be used to draw the handlers.

Specified by:
setHandlerSymbol in interface MapControlManager
Parameters:
handlerSymbol - The symbol to apply.

setSelectionSymbol

public void setSelectionSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol selectionSymbol)
Description copied from interface: MapControlManager
Sets the symbol that has to be used to draw a geometry when it is selected.

Specified by:
setSelectionSymbol in interface MapControlManager
Parameters:
selectionSymbol - The symbol to apply.

setTolerance

public void setTolerance(int tolerance)
Description copied from interface: MapControlManager
Sets the tolerance (in pixels) that has to be used by the tools that use snapping.

Specified by:
setTolerance in interface MapControlManager
Parameters:
tolerance - The tolerance to apply


Copyright © 2014 gvSIG Association. All Rights Reserved.