Interface ILcyGenericMapComponent<S extends ILcdView,T extends ILcdLayer>

All Superinterfaces:
AutoCloseable, ILcdDisposable, ILcdPropertyChangeSource
All Known Subinterfaces:
ILcyLspMapComponent, ILcyMapComponent
All Known Implementing Classes:
TLcyLspMapComponent, TLcyMapComponent

public interface ILcyGenericMapComponent<S extends ILcdView,T extends ILcdLayer> extends ILcdDisposable, ILcdPropertyChangeSource

An ILcyGenericMapComponent is a visual component that contains an ILcdView (a map). It also contains some additional widgets around it, such as a toolbar.

It is merely a container for a map, tool bar, popup menu, status bar, layer control, ... . In addition to components visible around the view, there is support for adding Components hovering over the view (see getMapOverlayPanel() ). Building concrete instances is typically done using a factory.

Implementations need to be a subclass of java.awt.Container (or one of its subclasses, e.g. JPanel) because a map needs to be displayed to a user.

Whenever an instance is created, the typical thing to do is to integrate the map into the back-end of the application. This can be achieved by registering it to a map manager (see TLcyGenericMapManager.addMapComponent(ILcyGenericMapComponent)). Adding it to the GUI is also a responsibility of the user of this class, for example by adding it to an ILcyApplicationPane.

This interface is subject to change, please refer to the extending interfaces and do not use delegation.

  • Method Details

    • getMapName

      String getMapName()
      Returns the name of the map. This name can be presented to the user.
      Returns:
      the name of the map.
    • setMapName

      void setMapName(String aMapName)
      Sets the name of the map.
      Parameters:
      aMapName - the new name of the map.
      See Also:
    • setSelectedLayersAsList

      void setSelectedLayersAsList(List<? extends T> 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.

      Parameters:
      aSelectedLayers - the layers to be selected. Must not be null
      See Also:
    • getSelectedLayersAsList

      List<T> 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.

      Returns:
      a list containing the selected layers, or an empty list when no layers were selected.
      See Also:
    • getMainView

      S getMainView()

      Returns the main component of a lucy map: the view.

      Returns:
      the main view.
    • getNorthPanel

      Container getNorthPanel()

      Returns the container at the north of the main view. Can be used to insert custom components to the map.

      Returns:
      the container at the north of the main view.
    • getSouthPanel

      Container getSouthPanel()

      Returns the container at the south of the main view. Can be used to insert custom components to the map.

      Returns:
      the container at the south of the main view.
    • getWestPanel

      Container getWestPanel()

      Returns the container at the west of the main view. Can be used to insert custom components to the map.

      Returns:
      the container at the west of the main view.
    • getEastPanel

      Container getEastPanel()

      Returns the container at the east of the main view. Can be used to insert custom components to the map.

      Returns:
      the container at the east of the main view.
    • getCenterPanel

      Container getCenterPanel()

      Returns the container in the center, typically containing the main view. Can be used to insert custom components to the map.

      Returns:
      the container in the center, typically containing the main view.
    • getMapOverlayPanel

      Container getMapOverlayPanel()

      Returns the Map Overlay Panel.

      This panel can be used to add components that have to hover over the view. It uses a custom layout manager, TLcdOverlayLayout. For information on how to add components in specific locations, see the documentation there.

      Returns:
      A container that usually contains components that are visible over the view.
      See Also:
    • getComponent

      Component getComponent()

      Returns the Component representing this map, e.g., this.

      Returns:
      the Component representing this map.
    • isMenuBarCapable

      @Deprecated boolean isMenuBarCapable()
      Deprecated.
      It is strongly recommended not to access the action bars of the map component directly. If you want to insert actions or active settables into one of those action bars, use one of the TLcyActionBarUtil#insertInConfiguredActionBars methods instead. Consult the Lucy developer guide for more information about the action bar mechanism.

      Returns true if the map has its own menu bar, false otherwise.

      Returns:
      true if the map has its own menu bar, false otherwise.
      See Also:
    • getMenuBar

      @Deprecated ILcyMenuBar getMenuBar()
      Deprecated.
      It is strongly recommended not to access the action bars of the map component directly. If you want to insert actions or active settables into one of those action bars, use one of the TLcyActionBarUtil#insertInConfiguredActionBars methods instead. Consult the Lucy developer guide for more information about the action bar mechanism.

      Returns the menu bar of the map. Only relevant if isMenuBarCapable returns true.

      Returns:
      the menu bar of the map or null if there is no menu bar.
      See Also:
    • isToolBarCapable

      @Deprecated boolean isToolBarCapable()
      Deprecated.
      It is strongly recommended not to access the action bars of the map component directly. If you want to insert actions or active settables into one of those action bars, use one of the TLcyActionBarUtil#insertInConfiguredActionBars methods instead. Consult the Lucy developer guide for more information about the action bar mechanism.

      Returns true if this map has its own toolbar, false otherwise.

      Returns:
      true if this map has its own toolbar, false otherwise.
      See Also:
    • getToolBar

      @Deprecated ILcyToolBar getToolBar()
      Deprecated.
      It is strongly recommended not to access the action bars of the map component directly. If you want to insert actions or active settables into one of those action bars, use one of the TLcyActionBarUtil#insertInConfiguredActionBars methods instead. Consult the Lucy developer guide for more information about the action bar mechanism.

      Returns the toolbar of this map. Only relevant if isToolBarCapable returns true.

      Returns:
      the toolbar of this map, or null if there is no toolbar.
      See Also:
    • getStatusBar

      @Deprecated ILcyToolBar getStatusBar()
      Deprecated.
      It is strongly recommended not to access the action bars of the map component directly. If you want to insert actions or active settables into one of those action bars, use one of the TLcyActionBarUtil#insertInConfiguredActionBars methods instead. Consult the Lucy developer guide for more information about the action bar mechanism.

      Returns the statusbar of this map. Only relevant if isStatusBarCapable returns true.

      Returns:
      the statusbar of this map, or null if there is no statusbar.
    • isStatusBarCapable

      @Deprecated boolean isStatusBarCapable()
      Deprecated.
      It is strongly recommended not to access the action bars of the map component directly. If you want to insert actions or active settables into one of those action bars, use one of the TLcyActionBarUtil#insertInConfiguredActionBars methods instead. Consult the Lucy developer guide for more information about the action bar mechanism.

      Returns true if this map has its own statusbar, false otherwise

      Returns:
      true if this map component has its own status bar, false otherwise.
      See Also:
    • isLayerControlCapable

      boolean isLayerControlCapable()

      Returns true if this map has its own layer control, false otherwise.

      Returns:
      true if this map has its own layer control, false otherwise.
      See Also:
    • getLayerControlComponent

      Component getLayerControlComponent()

      Returns the layer control component. Note that it can be different from getLayerControl(), possibly to add some decoration. This component is used to toggle the visibility of the layercontrol.

      Returns:
      the layer control component.
      See Also:
    • getLayerControl

      ILcyMapLayerControl getLayerControl()

      Returns the layer control of this map. Only relevant if isLayerControlCapable returns true.

      Returns:
      the layer control of this map.
      See Also:
    • dispose

      void dispose()

      Disposes of this object and allows it to release any system resources that it is holding.

      The result of calling any other method (other than finalize) on this object subsequent to a call to this method is undefined.

      Allows this map component to perform clean up tasks. The map component cannot be used after this method has been invoked.

      Specified by:
      dispose in interface ILcdDisposable
    • getToolBarComponent

      Component getToolBarComponent()

      Returns the tool bar component. Note that it can be different from getToolBar(), possibly to add some decoration. This component is used to toggle the visibility of the toolbar.

      Returns:
      the tool bar component.
      See Also:
    • getMenuBarComponent

      Component getMenuBarComponent()

      Returns the menu bar component. Note that it can be different from getMenuBar(), possibly to add some decoration. This component is used to toggle the visibility of the menu bar.

      Returns:
      the menu bar component.
      See Also:
    • getStatusBarComponent

      Component getStatusBarComponent()

      Returns the status bar component. This component is used to toggle the visibility of the status bar.

      Returns:
      the status bar component.
    • isToolBarVisible

      boolean isToolBarVisible()

      Returns true if the tool bar is visible, false otherwise.

      Returns:
      true if the tool bar is visible, false otherwise.
    • isMenuBarVisible

      boolean isMenuBarVisible()

      Returns true if the menu bar is visible, false otherwise.

      Returns:
      true if the menu bar is visible, false otherwise.
    • isStatusBarVisible

      boolean isStatusBarVisible()

      Returns true if the status bar is visible, false otherwise.

      Returns:
      true if the status bar is visible, false otherwise.
    • isLayerControlVisible

      boolean isLayerControlVisible()

      Returns true if the layer control is visible, false otherwise.

      Returns:
      true if the layer control is visible, false otherwise.
    • isPopupMenuCapable

      boolean isPopupMenuCapable()

      Returns true if this map component has a popup menu (getPopupMenu() != null)

      Returns:
      true if this map component has a popup menu.
    • getPopupMenu

      ILcyPopupMenu getPopupMenu()

      Returns the popup menu of this map component. Only relevant if isPopupMenuCapable() returns true.

      Returns:
      the popup menu of this map component.
      See Also:
    • setBalloonManager

      void setBalloonManager(ALcdBalloonManager aBalloonManager)

      Set the balloon manager of this map component.

      The balloon manager allows to display balloons on the map.

      Parameters:
      aBalloonManager - the balloon manager. May be null.
      See Also:
    • getBalloonManager

      ALcdBalloonManager getBalloonManager()

      Returns the balloon manager of this map component.

      Returns:
      the balloon manager of this map component. Can be null
      See Also: