Package org.gvsig.fmap.mapcontrol.impl
Class DefaultMapControlManager
java.lang.Object
org.gvsig.fmap.mapcontrol.impl.DefaultMapControlManager
- All Implemented Interfaces:
MapControlManager
- Author:
- Jorge Piera
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoublearea(org.gvsig.fmap.geom.Geometry geom, org.gvsig.crs.projection.lib.Projection proj, int areaUnits) voidCreate a TreeModel based in the layers collection of all project's views.It returns the default implementation for theMapControlDrawer.createEnvelopePickerController(Supplier<MapControl> mapControl, JTextComponent txtEnvelope, JButton btnMapControlEnvelope, JToggleButton btnCapture) createEnvelopePickerController(MapControl mapControl, JTextField txtUpperLeftX, JTextField txtUpperLeftY, JTextField txtLowerRightX, JTextField txtLowerRightY, JButton btnMapControlEnvelope, JToggleButton btnCapture) createEnvelopePickerController(MapControl mapControl, JTextComponent txtEnvelope, JButton btnMapControlEnvelope, JToggleButton btnCapture) createJMapControlPanel(org.gvsig.fmap.mapcontext.MapContext mapContext) createLayersDynObjectSetComponent(Map<String, org.gvsig.tools.dynobject.DynObjectSet> layerName2InfoByPoint) Creates a readonly component to view information of a set of layers.createLayersDynObjectSetComponent(Map<String, org.gvsig.tools.dynobject.DynObjectSet> layerName2InfoByPoint, boolean writable) Creates a component to view information of a set of layers.createLayersTreeModel(org.gvsig.fmap.mapcontext.layers.FLayers layers) Create a TreeModel based in the layers collection.createLayersTreeModel(org.gvsig.fmap.mapcontext.MapContext mapContext) Create a TreeModel based in the MapControl's layers.createMapControlDrawer(String name) Creates aMapControlDrawerfrom a name.createScalePickerController(MapControl mapControl, JComboBox cboScale, JButton btnMapControlScale, JToggleButton btnCapture) voidvoidorg.gvsig.fmap.mapcontext.rendering.symbols.ISymbolGets the symbol used to draw the axis of a geometry.org.gvsig.fmap.mapcontext.rendering.symbols.ISymbolGets the symbol used to draw the selected geometries.org.gvsig.fmap.mapcontext.rendering.symbols.ISymbolGets the symbol used to draw the handlers.org.gvsig.fmap.mapcontext.rendering.symbols.ISymbolGets the symbol used to draw the selected geometries.getSnapperAt(int index) Returns a snapper in a concrete position;intReturns the number of registered snappers.intTolerance (in pixels) that has to be used by the tools that use snapping.doubleperimeter(org.gvsig.fmap.geom.Geometry geom, org.gvsig.crs.projection.lib.Projection proj, int distanceUnits) voidregisterDefaultMapControlDrawer(Class mapControlDrawerClass) It registers the default implementation for theMapControlDrawer.voidregisterMapControlDrawer(String name, Class mapControlDrawerClass) Register aMapControlDrawerby name.voidregisterSnapper(String name, Class snapperClass) Add a snapper.voidsetAxisReferenceSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol axisReferencesSymbol) Sets the symbol that has to be used to draw a geometry that represent the axis of a geometry.voidsetGeometrySelectionSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol geometrySelectionSymbol) Sets the symbol that has to be used to draw a geometry when it is selected.voidsetHandlerSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol handlerSymbol) Sets the symbol that has to be used to draw the handlers.voidsetSelectionSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol selectionSymbol) Sets the symbol that has to be used to draw a geometry when it is selected.voidsetTolerance(int tolerance) Sets the tolerance (in pixels) that has to be used by the tools that use snapping.
-
Constructor Details
-
DefaultMapControlManager
public DefaultMapControlManager()
-
-
Method Details
-
createDefaultMapControlDrawer
Description copied from interface:MapControlManagerIt returns the default implementation for theMapControlDrawer.- Specified by:
createDefaultMapControlDrawerin interfaceMapControlManager- Returns:
- The default
MapControlDrawer. - Throws:
MapControlCreationException
-
createMapControlDrawer
Description copied from interface:MapControlManagerCreates aMapControlDrawerfrom a name.- Specified by:
createMapControlDrawerin interfaceMapControlManager- Parameters:
name- Name of theMapControlDrawer.- Returns:
- A
MapControlDrawer. - Throws:
MapControlCreationException
-
registerDefaultMapControlDrawer
Description copied from interface:MapControlManagerIt registers the default implementation for theMapControlDrawer.- Specified by:
registerDefaultMapControlDrawerin interfaceMapControlManager- Parameters:
mapControlDrawerClass- AMapControlDrawer.
-
registerMapControlDrawer
Description copied from interface:MapControlManagerRegister aMapControlDrawerby name.- Specified by:
registerMapControlDrawerin interfaceMapControlManager- Parameters:
name- Name of theMapControlDrawer.mapControlDrawerClass- Class used to draw graphical objects on a map.
-
getTolerance
public int getTolerance()Description copied from interface:MapControlManagerTolerance (in pixels) that has to be used by the tools that use snapping.- Specified by:
getTolerancein interfaceMapControlManager- Returns:
- The distance in pixels.
-
setTolerance
public void setTolerance(int tolerance) Description copied from interface:MapControlManagerSets the tolerance (in pixels) that has to be used by the tools that use snapping.- Specified by:
setTolerancein interfaceMapControlManager- Parameters:
tolerance- The tolerance to apply
-
clearSnappers
public void clearSnappers() -
getAxisReferenceSymbol
public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getAxisReferenceSymbol()Description copied from interface:MapControlManagerGets the symbol used to draw the axis of a geometry.- Specified by:
getAxisReferenceSymbolin interfaceMapControlManager- Returns:
- The symbol used to draw the axis of a geometry.
-
getGeometrySelectionSymbol
public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getGeometrySelectionSymbol()Description copied from interface:MapControlManagerGets the symbol used to draw the selected geometries.- Specified by:
getGeometrySelectionSymbolin interfaceMapControlManager- Returns:
- The symbol used to draw the selected geometries.
-
getHandlerSymbol
public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getHandlerSymbol()Description copied from interface:MapControlManagerGets the symbol used to draw the handlers.- Specified by:
getHandlerSymbolin interfaceMapControlManager- Returns:
- The symbol used to draw the handlers.
-
getSelectionSymbol
public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSelectionSymbol()Description copied from interface:MapControlManagerGets the symbol used to draw the selected geometries.- Specified by:
getSelectionSymbolin interfaceMapControlManager- Returns:
- The symbol used to draw the selected geometries.
-
setAxisReferenceSymbol
public void setAxisReferenceSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol axisReferencesSymbol) Description copied from interface:MapControlManagerSets the symbol that has to be used to draw a geometry that represent the axis of a geometry.- Specified by:
setAxisReferenceSymbolin interfaceMapControlManager- Parameters:
axisReferencesSymbol- The symbol to apply.
-
setGeometrySelectionSymbol
public void setGeometrySelectionSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol geometrySelectionSymbol) Description copied from interface:MapControlManagerSets the symbol that has to be used to draw a geometry when it is selected.- Specified by:
setGeometrySelectionSymbolin interfaceMapControlManager- Parameters:
geometrySelectionSymbol- The symbol to apply.
-
setHandlerSymbol
public void setHandlerSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol handlerSymbol) Description copied from interface:MapControlManagerSets the symbol that has to be used to draw the handlers.- Specified by:
setHandlerSymbolin interfaceMapControlManager- Parameters:
handlerSymbol- The symbol to apply.
-
setSelectionSymbol
public void setSelectionSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol selectionSymbol) Description copied from interface:MapControlManagerSets the symbol that has to be used to draw a geometry when it is selected.- Specified by:
setSelectionSymbolin interfaceMapControlManager- Parameters:
selectionSymbol- The symbol to apply.
-
registerSnapper
Description copied from interface:MapControlManagerAdd a snapper.- Specified by:
registerSnapperin interfaceMapControlManager
-
getSnapperAt
Description copied from interface:MapControlManagerReturns a snapper in a concrete position;- Specified by:
getSnapperAtin interfaceMapControlManager- Parameters:
index- Snapper position.- Returns:
- A snapper.
-
getSnapperCount
public int getSnapperCount()Description copied from interface:MapControlManagerReturns the number of registered snappers.- Specified by:
getSnapperCountin interfaceMapControlManager- Returns:
- The number of registered snappers.
-
disableSnapping
public void disableSnapping() -
enableSnapping
public void enableSnapping() -
getEditionPreferences
- Specified by:
getEditionPreferencesin interfaceMapControlManager
-
createJMapControlPanel
public MapControl createJMapControlPanel(org.gvsig.fmap.mapcontext.MapContext mapContext) throws MapControlCreationException - Specified by:
createJMapControlPanelin interfaceMapControlManager- Throws:
MapControlCreationException
-
addMapControlCreationListener
- Specified by:
addMapControlCreationListenerin interfaceMapControlManager
-
createLayersDynObjectSetComponent
public LayersDynObjectSetComponent createLayersDynObjectSetComponent(Map<String, org.gvsig.tools.dynobject.DynObjectSet> layerName2InfoByPoint) Description copied from interface:MapControlManagerCreates a readonly component to view information of a set of layers. The information must be provided as a set ofDynObjects, through aDynObjectSet.- Specified by:
createLayersDynObjectSetComponentin interfaceMapControlManager- Parameters:
layerName2InfoByPoint- the map ofDynObjectSetfor each layer.- Returns:
- the component to view the information
-
createLayersDynObjectSetComponent
public LayersDynObjectSetComponent createLayersDynObjectSetComponent(Map<String, org.gvsig.tools.dynobject.DynObjectSet> layerName2InfoByPoint, boolean writable) Description copied from interface:MapControlManagerCreates a component to view information of a set of layers. The information must be provided as a set ofDynObjects, through aDynObjectSet.- Specified by:
createLayersDynObjectSetComponentin interfaceMapControlManager- Parameters:
layerName2InfoByPoint- the map ofDynObjectSetfor each layer.writable- if the DynObjects loaded must be able to be edited- Returns:
- the component to view the information
-
createLayersTreeModel
Description copied from interface:MapControlManagerCreate a TreeModel based in the MapControl's layers.- Specified by:
createLayersTreeModelin interfaceMapControlManager- Parameters:
mapContext-- Returns:
- the TreeModel
-
createLayersTreeModel
Description copied from interface:MapControlManagerCreate a TreeModel based in the layers collection.- Specified by:
createLayersTreeModelin interfaceMapControlManager- Parameters:
layers- the layers collection to use for create the TreeModel- Returns:
- the TreeModel
-
createCompoundLayersTreeModel
Description copied from interface:MapControlManagerCreate a TreeModel based in the layers collection of all project's views.- Specified by:
createCompoundLayersTreeModelin interfaceMapControlManager- Returns:
- the TreeModel
-
createCompoundStoresTreeModel
- Specified by:
createCompoundStoresTreeModelin interfaceMapControlManager
-
perimeter
public double perimeter(org.gvsig.fmap.geom.Geometry geom, org.gvsig.crs.projection.lib.Projection proj, int distanceUnits) - Specified by:
perimeterin interfaceMapControlManager
-
area
public double area(org.gvsig.fmap.geom.Geometry geom, org.gvsig.crs.projection.lib.Projection proj, int areaUnits) - Specified by:
areain interfaceMapControlManager
-
createEnvelopePickerController
public EnvelopePickerControllerImpl createEnvelopePickerController(MapControl mapControl, JTextField txtUpperLeftX, JTextField txtUpperLeftY, JTextField txtLowerRightX, JTextField txtLowerRightY, JButton btnMapControlEnvelope, JToggleButton btnCapture) - Specified by:
createEnvelopePickerControllerin interfaceMapControlManager
-
createEnvelopePickerController
public EnvelopePickerControllerImpl createEnvelopePickerController(MapControl mapControl, JTextComponent txtEnvelope, JButton btnMapControlEnvelope, JToggleButton btnCapture) - Specified by:
createEnvelopePickerControllerin interfaceMapControlManager
-
createEnvelopePickerController
public EnvelopePickerControllerImpl createEnvelopePickerController(Supplier<MapControl> mapControl, JTextComponent txtEnvelope, JButton btnMapControlEnvelope, JToggleButton btnCapture) - Specified by:
createEnvelopePickerControllerin interfaceMapControlManager
-
createScalePickerController
public ScalePickerControllerImpl createScalePickerController(MapControl mapControl, JComboBox cboScale, JButton btnMapControlScale, JToggleButton btnCapture) - Specified by:
createScalePickerControllerin interfaceMapControlManager
-