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) |
double |
area(Geometry geom,
IProjection proj,
int areaUnits) |
javax.swing.tree.TreeModel |
createCompoundLayersTreeModel()
Create a TreeModel based in the layers collection of all project's views.
|
CompoundStoresTreeModel |
createCompoundStoresTreeModel() |
MapControlDrawer |
createDefaultMapControlDrawer()
It returns the default implementation for the
MapControlDrawer. |
PickerController<Envelope> |
createEnvelopePickerController(MapControl mapControl,
javax.swing.text.JTextComponent txtEnvelope,
javax.swing.JButton btnMapControlEnvelope,
javax.swing.JToggleButton btnCapture) |
PickerController<Envelope> |
createEnvelopePickerController(MapControl mapControl,
javax.swing.JTextField txtUpperLeftX,
javax.swing.JTextField txtUpperLeftY,
javax.swing.JTextField txtLowerRightX,
javax.swing.JTextField txtLowerRightY,
javax.swing.JButton btnMapControlEnvelope,
javax.swing.JToggleButton btnCapture) |
PickerController<Envelope> |
createEnvelopePickerController(java.util.function.Supplier<MapControl> mapControl,
javax.swing.text.JTextComponent txtEnvelope,
javax.swing.JButton btnMapControlEnvelope,
javax.swing.JToggleButton btnCapture) |
MapControl |
createJMapControlPanel(MapContext mapContext) |
LayersDynObjectSetComponent |
createLayersDynObjectSetComponent(java.util.Map<java.lang.String,DynObjectSet> layerName2InfoByPoint)
Creates a readonly component to view information of a set of layers.
|
LayersDynObjectSetComponent |
createLayersDynObjectSetComponent(java.util.Map<java.lang.String,DynObjectSet> layerName2InfoByPoint,
boolean writable)
Creates a component to view information of a set of layers.
|
javax.swing.tree.TreeModel |
createLayersTreeModel(FLayers layers)
Create a TreeModel based in the layers collection.
|
javax.swing.tree.TreeModel |
createLayersTreeModel(MapContext mapContext)
Create a TreeModel based in the MapControl's layers.
|
MapControlDrawer |
createMapControlDrawer(java.lang.String name)
Creates a
MapControlDrawer from a name. |
PickerController<java.lang.Double> |
createScalePickerController(MapControl mapControl,
javax.swing.JComboBox cboScale,
javax.swing.JButton btnMapControlScale,
javax.swing.JToggleButton btnCapture) |
ISymbol |
getAxisReferenceSymbol()
Gets the symbol used to draw the axis of a geometry.
|
java.util.prefs.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.
|
double |
perimeter(Geometry geom,
IProjection proj,
int distanceUnits) |
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(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
MapControlCreationExceptionvoid addMapControlCreationListener(MapControlCreationListener listener)
void registerMapControlDrawer(java.lang.String name,
java.lang.Class mapControolDrawerClass)
MapControlDrawer by name.name - Name of the MapControlDrawer.mapControolDrawerClass - Class used to draw graphical objects on a map.MapControlDrawer createMapControlDrawer(java.lang.String name) throws MapControlCreationException
MapControlDrawer from a name.name - Name of the MapControlDrawer.MapControlDrawer.MapControlCreationExceptionvoid registerDefaultMapControlDrawer(java.lang.Class mapControlDrawerClass)
MapControlDrawer.mapControlDrawerClass - A MapControlDrawer.MapControlDrawer createDefaultMapControlDrawer() throws MapControlCreationException
MapControlDrawer.MapControlDrawer.MapControlCreationExceptionISnapper getSnapperAt(int index)
index - Snapper position.int getSnapperCount()
void registerSnapper(java.lang.String name,
java.lang.Class snapperClass)
snapper - java.util.prefs.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(java.util.Map<java.lang.String,DynObjectSet> layerName2InfoByPoint)
DynObjects, through a
DynObjectSet.layerName2InfoByPoint - the map of DynObjectSet for each layer.LayersDynObjectSetComponent createLayersDynObjectSetComponent(java.util.Map<java.lang.String,DynObjectSet> layerName2InfoByPoint, boolean writable)
DynObjects, through a
DynObjectSet.layerName2InfoByPoint - the map of DynObjectSet for each layer.writable - if the DynObjects loaded must be able to be editedjavax.swing.tree.TreeModel createLayersTreeModel(MapContext mapContext)
mapContext - javax.swing.tree.TreeModel createLayersTreeModel(FLayers layers)
layers - the layers collection to use for create the TreeModeljavax.swing.tree.TreeModel createCompoundLayersTreeModel()
CompoundStoresTreeModel createCompoundStoresTreeModel()
double perimeter(Geometry geom, IProjection proj, int distanceUnits)
double area(Geometry geom, IProjection proj, int areaUnits)
PickerController<Envelope> createEnvelopePickerController(MapControl mapControl, javax.swing.JTextField txtUpperLeftX, javax.swing.JTextField txtUpperLeftY, javax.swing.JTextField txtLowerRightX, javax.swing.JTextField txtLowerRightY, javax.swing.JButton btnMapControlEnvelope, javax.swing.JToggleButton btnCapture)
PickerController<Envelope> createEnvelopePickerController(MapControl mapControl, javax.swing.text.JTextComponent txtEnvelope, javax.swing.JButton btnMapControlEnvelope, javax.swing.JToggleButton btnCapture)
PickerController<Envelope> createEnvelopePickerController(java.util.function.Supplier<MapControl> mapControl, javax.swing.text.JTextComponent txtEnvelope, javax.swing.JButton btnMapControlEnvelope, javax.swing.JToggleButton btnCapture)
PickerController<java.lang.Double> createScalePickerController(MapControl mapControl, javax.swing.JComboBox cboScale, javax.swing.JButton btnMapControlScale, javax.swing.JToggleButton btnCapture)