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.
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes of this object and allows it to release any system resources that it is holding.
|
ALcdBalloonManager |
getBalloonManager()
Returns the balloon manager of this map component.
|
Container |
getCenterPanel()
Returns the container in the center, typically containing the main view.
|
Component |
getComponent()
Returns the Component representing this map, e.g.,
this . |
Container |
getEastPanel()
Returns the container at the east of the main view.
|
ILcyMapLayerControl |
getLayerControl()
Returns the layer control of this map.
|
Component |
getLayerControlComponent()
Returns the layer control component.
|
S |
getMainView()
Returns the main component of a lucy map: the view.
|
String |
getMapName()
Returns the name of the map.
|
Container |
getMapOverlayPanel()
Returns the Map Overlay Panel.
|
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. |
Component |
getMenuBarComponent()
Returns the menu bar component.
|
Container |
getNorthPanel()
Returns the container at the north of the main view.
|
ILcyPopupMenu |
getPopupMenu()
Returns the popup menu of this map component.
|
List<T> |
getSelectedLayersAsList()
Returns the selected layers.
|
Container |
getSouthPanel()
Returns the container at the south of the main view.
|
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. |
Component |
getStatusBarComponent()
Returns the status bar component.
|
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. |
Component |
getToolBarComponent()
Returns the tool bar component.
|
Container |
getWestPanel()
Returns the container at the west of the main view.
|
boolean |
isLayerControlCapable()
Returns true if this map has its own layer control, false otherwise.
|
boolean |
isLayerControlVisible()
Returns true if the layer control is visible, false otherwise.
|
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. |
boolean |
isMenuBarVisible()
Returns true if the menu bar is visible, false otherwise.
|
boolean |
isPopupMenuCapable()
Returns true if this map component has a popup menu (getPopupMenu() != null)
|
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. |
boolean |
isStatusBarVisible()
Returns true if the status bar is visible, false otherwise.
|
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. |
boolean |
isToolBarVisible()
Returns true if the tool bar is visible, false otherwise.
|
void |
setBalloonManager(ALcdBalloonManager aBalloonManager)
Set the balloon manager of this map component.
|
void |
setMapName(String aMapName)
Sets the name of the map.
|
void |
setSelectedLayersAsList(List<? extends T> aSelectedLayers)
Sets the selected layers to the layers contained in
aSelectedLayers . |
close
addPropertyChangeListener, removePropertyChangeListener
String getMapName()
void setMapName(String aMapName)
aMapName
- the new name of the map.getMapName()
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.
aSelectedLayers
- the layers to be selected. Must not be null
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.
setSelectedLayersAsList(java.util.List)
S getMainView()
Returns the main component of a lucy map: the view.
Container getNorthPanel()
Returns the container at the north of the main view. Can be used to insert custom components to the map.
Container getSouthPanel()
Returns the container at the south of the main view. Can be used to insert custom components to the map.
Container getWestPanel()
Returns the container at the west of the main view. Can be used to insert custom components to the map.
Container getEastPanel()
Returns the container at the east of the main view. Can be used to insert custom components to the map.
Container getCenterPanel()
Returns the container in the center, typically containing the main view. Can be used to insert custom components to the map.
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.
TLcdOverlayLayout
Component getComponent()
Returns the Component representing this map, e.g., this
.
@Deprecated boolean isMenuBarCapable()
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.
getMenuBar()
@Deprecated ILcyMenuBar getMenuBar()
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.
isMenuBarCapable()
@Deprecated boolean isToolBarCapable()
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.
getToolBar()
@Deprecated ILcyToolBar getToolBar()
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.
null
if there is no toolbar.isToolBarCapable()
@Deprecated ILcyToolBar getStatusBar()
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.
null
if there is no statusbar.@Deprecated boolean isStatusBarCapable()
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
getStatusBar()
boolean isLayerControlCapable()
Returns true if this map has its own layer control, false otherwise.
getLayerControl()
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.
getLayerControl()
ILcyMapLayerControl getLayerControl()
Returns the layer control of this map. Only relevant if isLayerControlCapable returns true.
isLayerControlCapable()
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.
dispose
in interface ILcdDisposable
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.
getToolBar()
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.
getMenuBar()
Component getStatusBarComponent()
Returns the status bar component. This component is used to toggle the visibility of the status bar.
boolean isToolBarVisible()
Returns true if the tool bar is visible, false otherwise.
boolean isMenuBarVisible()
Returns true if the menu bar is visible, false otherwise.
boolean isStatusBarVisible()
Returns true if the status bar is visible, false otherwise.
boolean isLayerControlVisible()
Returns true if the layer control is visible, false otherwise.
boolean isPopupMenuCapable()
Returns true if this map component has a popup menu (getPopupMenu() != null)
ILcyPopupMenu getPopupMenu()
Returns the popup menu of this map component. Only relevant if isPopupMenuCapable() returns true.
isPopupMenuCapable()
void setBalloonManager(ALcdBalloonManager aBalloonManager)
Set the balloon manager of this map component.
The balloon manager allows to display balloons on the map.
aBalloonManager
- the balloon manager. May be null
.getBalloonManager()
ALcdBalloonManager getBalloonManager()
Returns the balloon manager of this map component.
null
setBalloonManager(com.luciad.view.swing.ALcdBalloonManager)