Interface ILcyMapComponent
- All Superinterfaces:
AutoCloseable,ILcdDisposable,ILcdPropertyChangeSource,ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
- All Known Implementing Classes:
TLcyMapComponent
ILcyMapComponent is an ILcyGenericMapComponent for ILcdGXYView (a flat map).
Whenever an instance is created, the map needs to be added to the ILcyMapManager
of the ILcyLucyEnv to integrate it in the back-end of the application.
This interface is subject to change, please use the available factories
(TLcyMapComponentFactory) and
TLcyMapOverviewComponentFactory) to create instances that
implement this interface and do not use delegation.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TLcyGroupDescriptorDeprecated.Group descriptors are defined in configuration files. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAvailableGXYController(ILcdGXYController aGXYController) Adds the given controller to the list of available controllers associated with this map.voidaddAvailableGXYController(ILcdGXYController aGXYController, int aID) Adds the given controller, together with its ID, to the list of available controllers associated with this map.Returns the associated area of interest layer.getAvailableGXYController(int aIndex) Returns the GXY Controller at the given index.intReturns the number of controllers associated with this map.intgetAvailableGXYControllerID(int aIndex) Returns the ID of the GXY Controller at the given index, or -1 if no ID was ever associated with the controller at the given index.Deprecated.UseILcyGenericMapComponent.getEastPanel()insteadReturns the main component of a lucy map: the view.Returns theALcyMapComponentFactorythat was used to create thisILcyMapComponent.Deprecated.UseILcyGenericMapComponent.getNorthPanel()insteadReturns the selected layers.Returns the selected layers.Use this method to get the list of snappables for this map component.Deprecated.UseILcyGenericMapComponent.getSouthPanel()insteadDeprecated.UseILcyGenericMapComponent.getWestPanel()insteadvoidinsertGXYLayer(ILcdGXYLayer aGXYLayer) voidinsertGXYLayer(ILcdGXYLayer aGXYLayer, int aGXYLayerType, int aModelType) voidremoveAvailableGXYController(ILcdGXYController aGXYController) Removes the given controller from the list of available controllers.retrieveAvailableGXYController(int aID) Returns the controller with the given ID, ornullif there is no such controller.voidsetSelectedLayers(ILcdGXYLayer[] aSelectedLayers) Sets the selected layers to the layers contained inaSelectedLayers.voidsetSelectedLayersAsList(List<? extends ILcdGXYLayer> aSelectedLayers) Sets the selected layers to the layers contained inaSelectedLayers.Methods inherited from interface com.luciad.util.ILcdDisposable
closeMethods inherited from interface com.luciad.util.ILcdPropertyChangeSource
addPropertyChangeListener, removePropertyChangeListenerMethods inherited from interface com.luciad.lucy.map.ILcyGenericMapComponent
dispose, getBalloonManager, getCenterPanel, getComponent, getEastPanel, getLayerControl, getLayerControlComponent, getMainView, getMapName, getMapOverlayPanel, getMenuBar, getMenuBarComponent, getNorthPanel, getPopupMenu, getSouthPanel, getStatusBar, getStatusBarComponent, getToolBar, getToolBarComponent, getWestPanel, isLayerControlCapable, isLayerControlVisible, isMenuBarCapable, isMenuBarVisible, isPopupMenuCapable, isStatusBarCapable, isStatusBarVisible, isToolBarCapable, isToolBarVisible, setBalloonManager, setMapName
-
Field Details
-
CONTROLLER_GROUP
Deprecated.Group descriptors are defined in configuration files. Please refer to the developer guide for more information. The group descriptor used to insert controllers into menu bars and toolbars.
-
-
Method Details
-
getMainGXYView
ILcdGXYView getMainGXYView()Returns the main component of a lucy map: the view.- Returns:
- the main view.
-
insertGXYLayer
Inserts the givenILcdGXYLayerinto the main view of thisILcyMapComponent. The difference between this method andILcdGXYView.addGXYLayeris that this method behaves differently forILcdGXYLayerLists (seeinsertGXYLayer(com.luciad.view.gxy.ILcdGXYLayer)). Using this method is discouraged as the given layer and model types can get lost after re-loading a workspace, dragging the layer to a new map, etc. These layer and model types should better be provided usingILcyGXYLayerTypeProviders andILcyModelContentTypeProviders.- Parameters:
aGXYLayer- The ILcdGXYLayer to be added.aGXYLayerType- The layer type of the given layeraModelType- The model type of the given layer.- See Also:
-
insertGXYLayer
Inserts the givenILcdGXYLayerinto the main view of thisILcyMapComponent. The difference between this method andILcdGXYView.addGXYLayeris that this method behaves differently forILcdGXYLayerLists. As described inILcdGXYLayerList, there are some limitations when addingILcdGXYLayerLists to anILcdGXYViewusingaddGXYLayer. This method solves these problems by not adding theILcdGXYLayerListitself to theILcdGXYView, but instead it creates anILcdLayerTreeNoderepresenting the layer list. The layer list and the layer node will automatically kept in sync. Should the layer list become empty, the corresponding layer node will automatically be removed from the view. Suppose we have this layer structure:- ILcdGXYLayerList_1
- ILcdGXYLayerList_2
- ILcdGXYLayer_A
- ILcdGXYLayer_B
- ILcdGXYLayerList_2
ILcdGXYLayerList_1as an argument will add a node to the view with the following structure:- ILcdLayerTreeNode_1
- ILcdLayerTreeNode_2
- ILcdGXYLayer_A
- ILcdGXYLayer_B
- ILcdLayerTreeNode_2
- Parameters:
aGXYLayer- TheILcdGXYLayerorILcdGXYLayerListto be added.
- ILcdGXYLayerList_1
-
getAreaOfInterestLayer
TLcyAreaOfInterestLayer getAreaOfInterestLayer()Returns the associated area of interest layer.- Returns:
- the associated area of interest layer.
-
getAvailableGXYControllerCount
int getAvailableGXYControllerCount()Returns the number of controllers associated with this map.- Returns:
- the number of controllers associated with this map.
- See Also:
-
getAvailableGXYController
Returns the GXY Controller at the given index.- Parameters:
aIndex- The index of the controller to retrieve. 0 <= aIndex < getAvailableGXYControllerCount()- Returns:
- The controller at the given index.
- See Also:
-
getAvailableGXYControllerID
int getAvailableGXYControllerID(int aIndex) Returns the ID of the GXY Controller at the given index, or -1 if no ID was ever associated with the controller at the given index.- Parameters:
aIndex- The index of the controller to retrieve the ID for. 0 <= aIndex < getAvailableGXYControllerCount()- Returns:
- The ID of the controller at the given index, or -1 if no ID was ever registered (see
addAvailableGXYController). - See Also:
-
retrieveAvailableGXYController
Returns the controller with the given ID, ornullif there is no such controller.- Parameters:
aID- The ID of the controller to retrieve. This is the ID that was used when adding the controller. Typical ID's are the ID's specified inTLcyMapComponentFactoryending inCONTROLLER, e.g.SELECT_CONTROLLER.- Returns:
- The controller for the given ID, or
nullif there is no such controller. - See Also:
-
addAvailableGXYController
Adds the given controller to the list of available controllers associated with this map. Available means they can be set to the map. No ID is registered for this controller. That meansgetAvailableGXYControllerIDfor the index of this controller will return -1.- Parameters:
aGXYController- The controller to add.- See Also:
-
addAvailableGXYController
Adds the given controller, together with its ID, to the list of available controllers associated with this map. Available means they can be set to the map.- Parameters:
aGXYController- The controller to add.aID- The ID for the controller. The ID can be useful to retrieve a controller for a given ID. ID's are positive integers, and must be unique. Customers should use ID's greater than or equal to 100000. Controllers provided by Lucy will use ID's less than 100000. Typical ID's are the ID's specified inTLcyMapComponentFactoryending inCONTROLLER, e.g.SELECT_CONTROLLER.- See Also:
-
removeAvailableGXYController
Removes the given controller from the list of available controllers.- Parameters:
aGXYController- The controller to remove.- See Also:
-
getSnapList
ILcdGXYLayerSubsetList getSnapList()Use this method to get the list of snappables for this map component. The returned object should be shared by all possible controllers and actions that use the snap list (e.g. TLcdGXYEditController, TLcdGXYNewController). Note that this list is automatically updated with the snap target candidates retrieved from the layers of this map that implementILcySnappableand that returntruefor their methodisSnappingOn. Please refer to the developer guide for more information about snapping.- Returns:
- The list of snap target candidates.
-
getMapComponentFactory
ALcyMapComponentFactory getMapComponentFactory()Returns theALcyMapComponentFactorythat was used to create thisILcyMapComponent.- Returns:
- the
ALcyMapComponentFactorythat was used to create thisILcyMapComponent.
-
setSelectedLayers
Sets the selected layers to the layers contained in
aSelectedLayers. Note that all these layers must be part of the view. A property change event will be fired when the selection has changedIf none of the layers should be selected, this method should be called with an empty array.
This method is identical to
setSelectedLayersAsList(java.util.List). Setting the selected layers with this method will fire a property change event for both theselectedLayersproperty and theselectedLayersAsListproperty.- Parameters:
aSelectedLayers- the layers to be selected. Must not benull
-
setSelectedLayersAsList
Sets the selected layers to the layers contained in
aSelectedLayers. Note that all these layers must be part of the view. A property change event will be fired when the selection has changedIf none of the layers should be selected, this method should be called with an empty list.
This method is identical to
setSelectedLayers(com.luciad.view.gxy.ILcdGXYLayer[]). Setting the selected layers with this method will fire a property change event for both theselectedLayersproperty and theselectedLayersAsListproperty.- Specified by:
setSelectedLayersAsListin interfaceILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer> - Parameters:
aSelectedLayers- the layers to be selected. Must not benull- See Also:
-
getSelectedLayers
ILcdGXYLayer[] getSelectedLayers()Returns the selected layers. These are the layers that the user has selected in the user interface, or the layers that has been set by calling
setSelectedLayers. All these layers are part of the view.The returned layers are the same as when calling
getSelectedLayersAsList().A property change event will be fired when the selection has changed.
- Returns:
- an array containing the selected layers, or an empty array when no layers were selected.
- See Also:
-
getSelectedLayersAsList
List<ILcdGXYLayer> getSelectedLayersAsList()Returns the selected layers. These are the layers that the user has selected in the user interface, or the layers that has been set by calling
setSelectedLayersAsList. All these layers are part of the view.A property change event will be fired when the selection has changed.
The returned layers are the same as when calling
getSelectedLayers().- Specified by:
getSelectedLayersAsListin interfaceILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer> - Returns:
- a list containing the selected layers, or an empty list when no layers were selected.
- See Also:
-
getNorthContentPane
Deprecated.UseILcyGenericMapComponent.getNorthPanel()insteadReturns the container at the north of the main gxy view. Can be used to insert custom components to the map.- Returns:
- the container at the north of the main gxy view.
-
getSouthContentPane
Deprecated.UseILcyGenericMapComponent.getSouthPanel()insteadReturns the container at the south of the main gxy view. Can be used to insert custom components to the map.- Returns:
- the container at the south of the main gxy view.
-
getWestContentPane
Deprecated.UseILcyGenericMapComponent.getWestPanel()insteadReturns the container at the west of the main gxy view. Can be used to insert custom components to the map.- Returns:
- the container at the west of the main gxy view.
-
getEastContentPane
Deprecated.UseILcyGenericMapComponent.getEastPanel()insteadReturns the container at the east of the main gxy view. Can be used to insert custom components to the map.- Returns:
- the container at the east of the main gxy view.
-