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.
Modifier and Type | Method and Description |
---|---|
void |
addMapControlCreationListener(MapControlCreationListener listener) |
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. |
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.
|
MapControl createJMapControlPanel(MapContext mapContext) throws MapControlCreationException
MapControlCreationException
void addMapControlCreationListener(MapControlCreationListener listener)
void registerMapControlDrawer(String name, Class mapControolDrawerClass)
MapControlDrawer
by name.name
- Name of the MapControlDrawer
.mapControolDrawerClass
- Class used to draw graphical objects on a map.MapControlDrawer createMapControlDrawer(String name) throws MapControlCreationException
MapControlDrawer
from a name.name
- Name of the MapControlDrawer
.MapControlDrawer
.MapControlCreationException
void registerDefaultMapControlDrawer(Class mapControlDrawerClass)
MapControlDrawer
.mapControlDrawerClass
- A MapControlDrawer
.MapControlDrawer createDefaultMapControlDrawer() throws MapControlCreationException
MapControlDrawer
.MapControlDrawer
.MapControlCreationException
ISnapper getSnapperAt(int index)
index
- Snapper position.int getSnapperCount()
void registerSnapper(String name, Class snapperClass)
snapper
- Preferences getEditionPreferences()
int getTolerance()
void setTolerance(int tolerance)
tolerance
- The tolerance to applyvoid setSelectionSymbol(ISymbol selectionSymbol)
selectionSymbol
- The symbol to apply.ISymbol getSelectionSymbol()
void setAxisReferenceSymbol(ISymbol axisReferencesSymbol)
axisReferencesSymbol
- The symbol to apply.ISymbol getAxisReferenceSymbol()
void setGeometrySelectionSymbol(ISymbol geometrySelectionSymbol)
geometrySelectionSymbol
- The symbol to apply.ISymbol getGeometrySelectionSymbol()
void setHandlerSymbol(ISymbol handlerSymbol)
handlerSymbol
- The symbol to apply.ISymbol getHandlerSymbol()
LayersDynObjectSetComponent createLayersDynObjectSetComponent(Map<String,DynObjectSet> layerName2InfoByPoint)
DynObject
s, through a
DynObjectSet
.layerName2InfoByPoint
- the map of DynObjectSet
for each layer.LayersDynObjectSetComponent createLayersDynObjectSetComponent(Map<String,DynObjectSet> layerName2InfoByPoint, boolean writable)
DynObject
s, through a
DynObjectSet
.layerName2InfoByPoint
- the map of DynObjectSet
for each layer.writable
- if the DynObjects loaded must be able to be editedTreeModel createLayersTreeModel(MapContext mapContext)
mapContext
- TreeModel createLayersTreeModel(FLayers layers)
layers
- the layers collection to use for create the TreeModelTreeModel createCompoundLayersTreeModel()