public class DefaultMapControlManager extends Object implements MapControlManager
Constructor and Description |
---|
DefaultMapControlManager() |
Modifier and Type | Method and Description |
---|---|
void |
addMapControlCreationListener(MapControlCreationListener listener) |
void |
clearSnappers() |
TreeModel |
createCompoundLayersTreeModel()
Create a TreeModel based in the layers collection of all project's views.
|
MapControlDrawer |
createDefaultMapControlDrawer()
It returns the default implementation for the
MapControlDrawer . |
MapControl |
createJMapControlPanel(MapContext mapContext) |
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.
|
TreeModel |
createLayersTreeModel(FLayers layers)
Create a TreeModel based in the layers collection.
|
TreeModel |
createLayersTreeModel(MapContext mapContext)
Create a TreeModel based in the MapControl's layers.
|
MapControlDrawer |
createMapControlDrawer(String name)
Creates a
MapControlDrawer from a name. |
void |
disableSnapping() |
void |
enableSnapping() |
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()
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(Class mapControlDrawerClass)
It registers the default implementation for the
MapControlDrawer . |
void |
registerMapControlDrawer(String name,
Class mapControlDrawerClass)
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)
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.
|
public MapControlDrawer createDefaultMapControlDrawer() throws MapControlCreationException
MapControlManager
MapControlDrawer
.createDefaultMapControlDrawer
in interface MapControlManager
MapControlDrawer
.MapControlCreationException
public MapControlDrawer createMapControlDrawer(String name) throws MapControlCreationException
MapControlManager
MapControlDrawer
from a name.createMapControlDrawer
in interface MapControlManager
name
- Name of the MapControlDrawer
.MapControlDrawer
.MapControlCreationException
public void registerDefaultMapControlDrawer(Class mapControlDrawerClass)
MapControlManager
MapControlDrawer
.registerDefaultMapControlDrawer
in interface MapControlManager
mapControlDrawerClass
- A MapControlDrawer
.public void registerMapControlDrawer(String name, Class mapControlDrawerClass)
MapControlManager
MapControlDrawer
by name.registerMapControlDrawer
in interface MapControlManager
name
- Name of the MapControlDrawer
.mapControlDrawerClass
- Class used to draw graphical objects on a map.public int getTolerance()
MapControlManager
getTolerance
in interface MapControlManager
public void setTolerance(int tolerance)
MapControlManager
setTolerance
in interface MapControlManager
tolerance
- The tolerance to applypublic void clearSnappers()
public ISymbol getAxisReferenceSymbol()
MapControlManager
getAxisReferenceSymbol
in interface MapControlManager
public ISymbol getGeometrySelectionSymbol()
MapControlManager
getGeometrySelectionSymbol
in interface MapControlManager
public ISymbol getHandlerSymbol()
MapControlManager
getHandlerSymbol
in interface MapControlManager
public ISymbol getSelectionSymbol()
MapControlManager
getSelectionSymbol
in interface MapControlManager
public void setAxisReferenceSymbol(ISymbol axisReferencesSymbol)
MapControlManager
setAxisReferenceSymbol
in interface MapControlManager
axisReferencesSymbol
- The symbol to apply.public void setGeometrySelectionSymbol(ISymbol geometrySelectionSymbol)
MapControlManager
setGeometrySelectionSymbol
in interface MapControlManager
geometrySelectionSymbol
- The symbol to apply.public void setHandlerSymbol(ISymbol handlerSymbol)
MapControlManager
setHandlerSymbol
in interface MapControlManager
handlerSymbol
- The symbol to apply.public void setSelectionSymbol(ISymbol selectionSymbol)
MapControlManager
setSelectionSymbol
in interface MapControlManager
selectionSymbol
- The symbol to apply.public void registerSnapper(String name, Class snapperClass)
MapControlManager
registerSnapper
in interface MapControlManager
public ISnapper getSnapperAt(int index)
MapControlManager
getSnapperAt
in interface MapControlManager
index
- Snapper position.public int getSnapperCount()
MapControlManager
getSnapperCount
in interface MapControlManager
public void disableSnapping()
public void enableSnapping()
public Preferences getEditionPreferences()
getEditionPreferences
in interface MapControlManager
public MapControl createJMapControlPanel(MapContext mapContext) throws MapControlCreationException
createJMapControlPanel
in interface MapControlManager
MapControlCreationException
public void addMapControlCreationListener(MapControlCreationListener listener)
addMapControlCreationListener
in interface MapControlManager
public LayersDynObjectSetComponent createLayersDynObjectSetComponent(Map<String,DynObjectSet> layerName2InfoByPoint)
MapControlManager
DynObject
s, through a
DynObjectSet
.createLayersDynObjectSetComponent
in interface MapControlManager
layerName2InfoByPoint
- the map of DynObjectSet
for each layer.public LayersDynObjectSetComponent createLayersDynObjectSetComponent(Map<String,DynObjectSet> layerName2InfoByPoint, boolean writable)
MapControlManager
DynObject
s, through a
DynObjectSet
.createLayersDynObjectSetComponent
in interface MapControlManager
layerName2InfoByPoint
- the map of DynObjectSet
for each layer.writable
- if the DynObjects loaded must be able to be editedpublic TreeModel createLayersTreeModel(MapContext mapContext)
MapControlManager
createLayersTreeModel
in interface MapControlManager
public TreeModel createLayersTreeModel(FLayers layers)
MapControlManager
createLayersTreeModel
in interface MapControlManager
layers
- the layers collection to use for create the TreeModelpublic TreeModel createCompoundLayersTreeModel()
MapControlManager
createCompoundLayersTreeModel
in interface MapControlManager