public class DefaultMapControlManager extends java.lang.Object implements MapControlManager
Constructor and Description |
---|
DefaultMapControlManager() |
Modifier and Type | Method and Description |
---|---|
void |
addMapControlCreationListener(MapControlCreationListener listener) |
double |
area(Geometry geom,
IProjection proj,
int areaUnits) |
void |
clearSnappers() |
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 . |
EnvelopePickerControllerImpl |
createEnvelopePickerController(MapControl mapControl,
javax.swing.text.JTextComponent txtEnvelope,
javax.swing.JButton btnMapControlEnvelope,
javax.swing.JToggleButton btnCapture) |
EnvelopePickerControllerImpl |
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) |
EnvelopePickerControllerImpl |
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. |
ScalePickerControllerImpl |
createScalePickerController(MapControl mapControl,
javax.swing.JComboBox cboScale,
javax.swing.JButton btnMapControlScale,
javax.swing.JToggleButton btnCapture) |
void |
disableSnapping() |
void |
enableSnapping() |
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()
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.
|
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 mapControlDrawerClass)
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)
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(java.lang.String name) throws MapControlCreationException
MapControlManager
MapControlDrawer
from a name.createMapControlDrawer
in interface MapControlManager
name
- Name of the MapControlDrawer
.MapControlDrawer
.MapControlCreationException
public void registerDefaultMapControlDrawer(java.lang.Class mapControlDrawerClass)
MapControlManager
MapControlDrawer
.registerDefaultMapControlDrawer
in interface MapControlManager
mapControlDrawerClass
- A MapControlDrawer
.public void registerMapControlDrawer(java.lang.String name, java.lang.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(java.lang.String name, java.lang.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 java.util.prefs.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(java.util.Map<java.lang.String,DynObjectSet> layerName2InfoByPoint)
MapControlManager
DynObject
s, through a
DynObjectSet
.createLayersDynObjectSetComponent
in interface MapControlManager
layerName2InfoByPoint
- the map of DynObjectSet
for each layer.public LayersDynObjectSetComponent createLayersDynObjectSetComponent(java.util.Map<java.lang.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 javax.swing.tree.TreeModel createLayersTreeModel(MapContext mapContext)
MapControlManager
createLayersTreeModel
in interface MapControlManager
public javax.swing.tree.TreeModel createLayersTreeModel(FLayers layers)
MapControlManager
createLayersTreeModel
in interface MapControlManager
layers
- the layers collection to use for create the TreeModelpublic javax.swing.tree.TreeModel createCompoundLayersTreeModel()
MapControlManager
createCompoundLayersTreeModel
in interface MapControlManager
public CompoundStoresTreeModel createCompoundStoresTreeModel()
createCompoundStoresTreeModel
in interface MapControlManager
public double perimeter(Geometry geom, IProjection proj, int distanceUnits)
perimeter
in interface MapControlManager
public double area(Geometry geom, IProjection proj, int areaUnits)
area
in interface MapControlManager
public EnvelopePickerControllerImpl 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)
createEnvelopePickerController
in interface MapControlManager
public EnvelopePickerControllerImpl createEnvelopePickerController(MapControl mapControl, javax.swing.text.JTextComponent txtEnvelope, javax.swing.JButton btnMapControlEnvelope, javax.swing.JToggleButton btnCapture)
createEnvelopePickerController
in interface MapControlManager
public EnvelopePickerControllerImpl createEnvelopePickerController(java.util.function.Supplier<MapControl> mapControl, javax.swing.text.JTextComponent txtEnvelope, javax.swing.JButton btnMapControlEnvelope, javax.swing.JToggleButton btnCapture)
createEnvelopePickerController
in interface MapControlManager
public ScalePickerControllerImpl createScalePickerController(MapControl mapControl, javax.swing.JComboBox cboScale, javax.swing.JButton btnMapControlScale, javax.swing.JToggleButton btnCapture)
createScalePickerController
in interface MapControlManager