Interface ILcyMapComponent

All Superinterfaces:
AutoCloseable, ILcdDisposable, ILcdPropertyChangeSource, ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
All Known Implementing Classes:
TLcyMapComponent

public interface ILcyMapComponent extends ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
An 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 Details

    • CONTROLLER_GROUP

      @Deprecated static final TLcyGroupDescriptor 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

      void insertGXYLayer(ILcdGXYLayer aGXYLayer, int aGXYLayerType, int aModelType)
      Inserts the given ILcdGXYLayer into the main view of this ILcyMapComponent. The difference between this method and ILcdGXYView.addGXYLayer is that this method behaves differently for ILcdGXYLayerLists (see insertGXYLayer(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 using ILcyGXYLayerTypeProviders and ILcyModelContentTypeProviders.

      Parameters:
      aGXYLayer - The ILcdGXYLayer to be added.
      aGXYLayerType - The layer type of the given layer
      aModelType - The model type of the given layer.
      See Also:
    • insertGXYLayer

      void insertGXYLayer(ILcdGXYLayer aGXYLayer)
      Inserts the given ILcdGXYLayer into the main view of this ILcyMapComponent. The difference between this method and ILcdGXYView.addGXYLayer is that this method behaves differently for ILcdGXYLayerLists.

      As described in ILcdGXYLayerList, there are some limitations when adding ILcdGXYLayerLists to an ILcdGXYView using addGXYLayer. This method solves these problems by not adding the ILcdGXYLayerList itself to the ILcdGXYView, but instead it creates an ILcdLayerTreeNode representing 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
      Using this method with ILcdGXYLayerList_1 as an argument will add a node to the view with the following structure:
      • ILcdLayerTreeNode_1
        • ILcdLayerTreeNode_2
          • ILcdGXYLayer_A
          • ILcdGXYLayer_B
      Parameters:
      aGXYLayer - The ILcdGXYLayer or ILcdGXYLayerList to be added.
    • 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

      ILcdGXYController getAvailableGXYController(int aIndex)
      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

      ILcdGXYController retrieveAvailableGXYController(int aID)
      Returns the controller with the given ID, or null if 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 in TLcyMapComponentFactory ending in CONTROLLER, e.g. SELECT_CONTROLLER.
      Returns:
      The controller for the given ID, or null if there is no such controller.
      See Also:
    • addAvailableGXYController

      void addAvailableGXYController(ILcdGXYController aGXYController)
      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 means getAvailableGXYControllerID for the index of this controller will return -1.

      Parameters:
      aGXYController - The controller to add.
      See Also:
    • addAvailableGXYController

      void addAvailableGXYController(ILcdGXYController aGXYController, int aID)
      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 in TLcyMapComponentFactory ending in CONTROLLER, e.g. SELECT_CONTROLLER.
      See Also:
    • removeAvailableGXYController

      void removeAvailableGXYController(ILcdGXYController aGXYController)
      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 implement ILcySnappable and that return true for their method isSnappingOn. Please refer to the developer guide for more information about snapping.
      Returns:
      The list of snap target candidates.
    • getMapComponentFactory

      ALcyMapComponentFactory getMapComponentFactory()
      Returns the ALcyMapComponentFactory that was used to create this ILcyMapComponent.
      Returns:
      the ALcyMapComponentFactory that was used to create this ILcyMapComponent.
    • setSelectedLayers

      void setSelectedLayers(ILcdGXYLayer[] aSelectedLayers)

      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 changed

      If 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 the selectedLayers property and the selectedLayersAsList property.

      Parameters:
      aSelectedLayers - the layers to be selected. Must not be null
    • setSelectedLayersAsList

      void setSelectedLayersAsList(List<? extends ILcdGXYLayer> aSelectedLayers)

      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 changed

      If 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 the selectedLayers property and the selectedLayersAsList property.

      Specified by:
      setSelectedLayersAsList in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
      Parameters:
      aSelectedLayers - the layers to be selected. Must not be null
      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:
      getSelectedLayersAsList in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
      Returns:
      a list containing the selected layers, or an empty list when no layers were selected.
      See Also:
    • getNorthContentPane

      @Deprecated Container getNorthContentPane()
      Returns 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 Container getSouthContentPane()
      Returns 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 Container getWestContentPane()
      Returns 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 Container getEastContentPane()
      Returns 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.