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
MapControlManagerMapControlDrawer.createDefaultMapControlDrawer in interface MapControlManagerMapControlDrawer.MapControlCreationExceptionpublic MapControlDrawer createMapControlDrawer(java.lang.String name) throws MapControlCreationException
MapControlManagerMapControlDrawer from a name.createMapControlDrawer in interface MapControlManagername - Name of the MapControlDrawer.MapControlDrawer.MapControlCreationExceptionpublic void registerDefaultMapControlDrawer(java.lang.Class mapControlDrawerClass)
MapControlManagerMapControlDrawer.registerDefaultMapControlDrawer in interface MapControlManagermapControlDrawerClass - A MapControlDrawer.public void registerMapControlDrawer(java.lang.String name,
java.lang.Class mapControlDrawerClass)
MapControlManagerMapControlDrawer by name.registerMapControlDrawer in interface MapControlManagername - Name of the MapControlDrawer.mapControlDrawerClass - Class used to draw graphical objects on a map.public int getTolerance()
MapControlManagergetTolerance in interface MapControlManagerpublic void setTolerance(int tolerance)
MapControlManagersetTolerance in interface MapControlManagertolerance - The tolerance to applypublic void clearSnappers()
public ISymbol getAxisReferenceSymbol()
MapControlManagergetAxisReferenceSymbol in interface MapControlManagerpublic ISymbol getGeometrySelectionSymbol()
MapControlManagergetGeometrySelectionSymbol in interface MapControlManagerpublic ISymbol getHandlerSymbol()
MapControlManagergetHandlerSymbol in interface MapControlManagerpublic ISymbol getSelectionSymbol()
MapControlManagergetSelectionSymbol in interface MapControlManagerpublic void setAxisReferenceSymbol(ISymbol axisReferencesSymbol)
MapControlManagersetAxisReferenceSymbol in interface MapControlManageraxisReferencesSymbol - The symbol to apply.public void setGeometrySelectionSymbol(ISymbol geometrySelectionSymbol)
MapControlManagersetGeometrySelectionSymbol in interface MapControlManagergeometrySelectionSymbol - The symbol to apply.public void setHandlerSymbol(ISymbol handlerSymbol)
MapControlManagersetHandlerSymbol in interface MapControlManagerhandlerSymbol - The symbol to apply.public void setSelectionSymbol(ISymbol selectionSymbol)
MapControlManagersetSelectionSymbol in interface MapControlManagerselectionSymbol - The symbol to apply.public void registerSnapper(java.lang.String name,
java.lang.Class snapperClass)
MapControlManagerregisterSnapper in interface MapControlManagerpublic ISnapper getSnapperAt(int index)
MapControlManagergetSnapperAt in interface MapControlManagerindex - Snapper position.public int getSnapperCount()
MapControlManagergetSnapperCount in interface MapControlManagerpublic void disableSnapping()
public void enableSnapping()
public java.util.prefs.Preferences getEditionPreferences()
getEditionPreferences in interface MapControlManagerpublic MapControl createJMapControlPanel(MapContext mapContext) throws MapControlCreationException
createJMapControlPanel in interface MapControlManagerMapControlCreationExceptionpublic void addMapControlCreationListener(MapControlCreationListener listener)
addMapControlCreationListener in interface MapControlManagerpublic LayersDynObjectSetComponent createLayersDynObjectSetComponent(java.util.Map<java.lang.String,DynObjectSet> layerName2InfoByPoint)
MapControlManagerDynObjects, through a
DynObjectSet.createLayersDynObjectSetComponent in interface MapControlManagerlayerName2InfoByPoint - the map of DynObjectSet for each layer.public LayersDynObjectSetComponent createLayersDynObjectSetComponent(java.util.Map<java.lang.String,DynObjectSet> layerName2InfoByPoint, boolean writable)
MapControlManagerDynObjects, through a
DynObjectSet.createLayersDynObjectSetComponent in interface MapControlManagerlayerName2InfoByPoint - 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)
MapControlManagercreateLayersTreeModel in interface MapControlManagerpublic javax.swing.tree.TreeModel createLayersTreeModel(FLayers layers)
MapControlManagercreateLayersTreeModel in interface MapControlManagerlayers - the layers collection to use for create the TreeModelpublic javax.swing.tree.TreeModel createCompoundLayersTreeModel()
MapControlManagercreateCompoundLayersTreeModel in interface MapControlManagerpublic CompoundStoresTreeModel createCompoundStoresTreeModel()
createCompoundStoresTreeModel in interface MapControlManagerpublic double perimeter(Geometry geom, IProjection proj, int distanceUnits)
perimeter in interface MapControlManagerpublic double area(Geometry geom, IProjection proj, int areaUnits)
area in interface MapControlManagerpublic 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 MapControlManagerpublic EnvelopePickerControllerImpl createEnvelopePickerController(MapControl mapControl, javax.swing.text.JTextComponent txtEnvelope, javax.swing.JButton btnMapControlEnvelope, javax.swing.JToggleButton btnCapture)
createEnvelopePickerController in interface MapControlManagerpublic EnvelopePickerControllerImpl createEnvelopePickerController(java.util.function.Supplier<MapControl> mapControl, javax.swing.text.JTextComponent txtEnvelope, javax.swing.JButton btnMapControlEnvelope, javax.swing.JToggleButton btnCapture)
createEnvelopePickerController in interface MapControlManagerpublic ScalePickerControllerImpl createScalePickerController(MapControl mapControl, javax.swing.JComboBox cboScale, javax.swing.JButton btnMapControlScale, javax.swing.JToggleButton btnCapture)
createScalePickerController in interface MapControlManager