public class TLcyMapComponent extends JPanel implements ILcyMapComponent
ILcyMapComponent
. It provides support for an
ILcdGXYView
(often in the center), and support for an optional toolbar,
optional menubar, optional status bar and optional layer control. Note however that the
TLcyMapComponent
does not contain anything after it is constructed, it is up to
the user of this class to add these components. Also note that no component is ever added
to the Swing component hierarchy, this is the responsibility of the user of this class. When
for example the north pane is set using setNorthPanel
, it is not
added to the user interface.
TLcyMapComponent
s are typically created using a TLcyMapComponentFactory
.JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
CONTROLLER_GROUP
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
TLcyMapComponent()
Constructs a new
TLcyMapComponent . |
TLcyMapComponent(ILcdGXYView aMainGXYView)
Constructs a new
TLcyMapComponent for the given gxy view. |
Modifier and Type | Method and Description |
---|---|
void |
addAvailableGXYController(ILcdGXYController aGXYController)
Adds the given controller to the list of available controllers associated
with this map.
|
void |
addAvailableGXYController(ILcdGXYController aGXYController,
int aID)
Adds the given controller, together with its ID, to the list of available controllers associated
with this map.
|
void |
dispose()
Disposes of this object and allows it to release any system resources that it is holding.
|
TLcyAreaOfInterestLayer |
getAreaOfInterestLayer()
Returns the associated area of interest layer.
|
ILcdGXYController |
getAvailableGXYController(int aIndex)
Returns the GXY Controller at the given index.
|
int |
getAvailableGXYControllerCount()
Returns the number of controllers associated with this map.
|
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.
|
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 |
getEastContentPane()
Returns the container at the east of the main gxy view.
|
Container |
getEastPanel()
Returns the container at the east of the main view.
|
ILcyGXYLayerOrderManager |
getGXYLayerOrderManager()
Returns the layer order manager this map uses to order its layers.
|
ILcyMapLayerControl |
getLayerControl()
Returns the layer control of this map.
|
Component |
getLayerControlComponent()
Returns the layer control component.
|
ILcdGXYView |
getMainGXYView()
Returns the main component of a lucy map: the view.
|
ILcdGXYView |
getMainView()
Returns the main component of a lucy map: the view.
|
ALcyMapComponentFactory |
getMapComponentFactory()
Returns the
ALcyMapComponentFactory that was used to create
this ILcyMapComponent . |
String |
getMapName()
Returns the name of the map.
|
Container |
getMapOverlayPanel()
Returns the Map Overlay Panel.
|
ILcyPopupMenu |
getMapPopupMenu()
Deprecated.
Use
getPopupMenu() instead |
ILcyMenuBar |
getMenuBar()
Returns the menu bar of the map.
|
Component |
getMenuBarComponent()
Returns the menu bar component.
|
Container |
getNorthContentPane()
Returns the container at the north of the main gxy view.
|
Container |
getNorthPanel()
Returns the container at the north of the main view.
|
ILcyPopupMenu |
getPopupMenu()
Returns the popup menu of this map component.
|
ILcdGXYLayer[] |
getSelectedLayers()
Returns the selected layers.
|
List<ILcdGXYLayer> |
getSelectedLayersAsList()
Returns the selected layers.
|
ILcdGXYLayerSubsetList |
getSnapList()
Returns the list of snappables.
|
Container |
getSouthContentPane()
Returns the container at the south of the main gxy view.
|
Container |
getSouthPanel()
Returns the container at the south of the main view.
|
ILcyToolBar |
getStatusBar()
Returns the statusbar of this map.
|
Component |
getStatusBarComponent()
Returns the status bar component.
|
ILcyToolBar |
getToolBar()
Returns the toolbar of this map.
|
Component |
getToolBarComponent()
Returns the tool bar component.
|
Container |
getWestContentPane()
Returns the container at the west of the main gxy view.
|
Container |
getWestPanel()
Returns the container at the west of the main view.
|
void |
insertGXYLayer(ILcdGXYLayer aGXYLayer)
|
void |
insertGXYLayer(ILcdGXYLayer aGXYLayer,
int aGXYLayerType,
int aModelType)
|
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()
Returns true if the map has its own menu bar, false otherwise.
|
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 |
isSnappingActive()
Returns true if snapping is active.
|
boolean |
isStatusBarCapable()
Returns true if this map has its own statusbar, false otherwise
|
boolean |
isStatusBarVisible()
Returns true if the status bar is visible, false otherwise.
|
boolean |
isToolBarCapable()
Returns true if this map has its own toolbar, false otherwise.
|
boolean |
isToolBarVisible()
Returns true if the tool bar is visible, false otherwise.
|
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
removeAvailableGXYController(ILcdGXYController aGXYController)
Removes the given controller from the list of available controllers.
|
ILcdGXYController |
retrieveAvailableGXYController(int aID)
Returns the controller with the given ID, or
null if there is no such controller. |
void |
setAreaOfInterestLayer(TLcyAreaOfInterestLayer aAreaOfInterestLayer)
Sets the area of interest layer of this map component.
|
void |
setBalloonManager(ALcdBalloonManager aBalloonManager)
Set the balloon manager of this map component.
|
void |
setCenterPanel(Container aCenterPanel)
Sets the center panel of this map component.
|
static void |
setClassTraceOn(boolean aClassTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setEastPanel(Container aEastPanel)
Sets the east panel of this map component.
|
void |
setGXYLayerOrderManager(ILcyGXYLayerOrderManager aGXYLayerOrderManager)
Sets the layer order manager this map uses to order its layers.
|
void |
setLayerControl(ILcyMapLayerControl aLayerControl)
Sets the layer control of this map.
|
void |
setLayerControlComponent(Component aMapLayerControlComponent)
Sets the layer control component.
|
void |
setLayerControlVisible(boolean aLayerControlVisible)
Sets the layer control visible or not.
|
void |
setMapComponentFactory(ALcyMapComponentFactory aMapComponentFactory)
Sets the map component factory that was used to create this
TLcyMapComponent . |
void |
setMapName(String aMapName)
Sets the name of the map.
|
void |
setMapOverlayPanel(Container aMapOverlayPanel)
Sets the map overlay panel of this map component.
|
void |
setMapPopupMenu(ILcyPopupMenu aMapPopupMenu)
Deprecated.
Use
setPopupMenu(com.luciad.lucy.gui.ILcyPopupMenu) instead |
void |
setMenuBar(ILcyMenuBar aMenuBar)
Sets the menu bar of this map component.
|
void |
setMenuBarComponent(Component aMenuBarComponent)
Sets the menu bar component.
|
void |
setMenuBarVisible(boolean aMenuBarVisible)
Sets the menu bar visible or not.
|
void |
setNorthPanel(Container aNorthPanel)
Sets the north panel of this map component.
|
void |
setPopupMenu(ILcyPopupMenu aPopupMenu)
Sets the popup menu of this map component.
|
void |
setSelectedLayers(ILcdGXYLayer[] aSelectedLayers)
Sets the selected layers to the layers contained in
aSelectedLayers . |
void |
setSelectedLayersAsList(List<? extends ILcdGXYLayer> aSelectedLayers)
Sets the selected layers to the layers contained in
aSelectedLayers . |
void |
setSnappingActive(boolean aSnappingActive)
Set true to active snapping.
|
void |
setSouthPanel(Container aSouthPanel)
Sets the south panel of this map component.
|
void |
setStatusBar(ILcyToolBar aStatusBar)
Sets the statusbar of this map compoennt.
|
void |
setStatusBarComponent(Component aStatusBarComponent)
Sets the status bar compoment.
|
void |
setStatusBarVisible(boolean aStatusBarVisible)
Sets the status bar visible or not.
|
void |
setToolBar(ILcyToolBar aToolBar)
Sets the tool bar of this map component.
|
void |
setToolBarComponent(Component aToolBarComponent)
Sets the tool bar component.
|
void |
setToolBarVisible(boolean aToolBarVisible)
Sets the tool bar visible or not.
|
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setWestPanel(Container aWestPanel)
Sets the west panel of this map component.
|
String |
toString() |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close
addPropertyChangeListener, removePropertyChangeListener
public TLcyMapComponent()
TLcyMapComponent
.public TLcyMapComponent(ILcdGXYView aMainGXYView)
TLcyMapComponent
for the given gxy view.aMainGXYView
- The gxy view of this map component. Note that the view is not added to the Swing component
hierarchy, this is the responsibility of the user of this method.@Deprecated public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.@Deprecated public void setTraceOn(boolean aTraceOn)
true
or false
as argument automatically turns
off tracing for all other class instances for which
setTraceOn
has not been called.
If the argument is false
then only the informative, warning
and error log messages are recorded.aTraceOn
- if true then all log messages are recorded for this
instance. If false, then only the informative, warning and
error log messages are recorded.@Deprecated public boolean isTraceOn()
true
if tracing is enabled for this class.public boolean isSnappingActive()
setSnappingActive(boolean)
public void setSnappingActive(boolean aSnappingActive)
aSnappingActive
- True if snapping should be active, false otherwise.isSnappingActive()
,
getSnapList()
public Component getComponent()
ILcyGenericMapComponent
Returns the Component representing this map, e.g., this
.
getComponent
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
public void dispose()
ILcyGenericMapComponent
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 ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
dispose
in interface ILcdDisposable
public ALcyMapComponentFactory getMapComponentFactory()
ILcyMapComponent
ALcyMapComponentFactory
that was used to create
this ILcyMapComponent
.getMapComponentFactory
in interface ILcyMapComponent
ALcyMapComponentFactory
that was used to create
this ILcyMapComponent
.public void setMapComponentFactory(ALcyMapComponentFactory aMapComponentFactory)
TLcyMapComponent
.aMapComponentFactory
- The map component factorygetMapComponentFactory()
public ILcdGXYLayerSubsetList getSnapList()
getSnapList
in interface ILcyMapComponent
ILcyMapComponent.getSnapList()
,
isSnappingActive()
public TLcyAreaOfInterestLayer getAreaOfInterestLayer()
ILcyMapComponent
getAreaOfInterestLayer
in interface ILcyMapComponent
public void setAreaOfInterestLayer(TLcyAreaOfInterestLayer aAreaOfInterestLayer)
aAreaOfInterestLayer
- The area of interest layer.getAreaOfInterestLayer()
public ILcyGXYLayerOrderManager getGXYLayerOrderManager()
public void setGXYLayerOrderManager(ILcyGXYLayerOrderManager aGXYLayerOrderManager)
aGXYLayerOrderManager
- The layer order manager.public int getAvailableGXYControllerCount()
ILcyMapComponent
getAvailableGXYControllerCount
in interface ILcyMapComponent
ILcyMapComponent.getAvailableGXYController(int)
public ILcdGXYController getAvailableGXYController(int aIndex)
ILcyMapComponent
getAvailableGXYController
in interface ILcyMapComponent
aIndex
- The index of the controller to retrieve. 0 <= aIndex < getAvailableGXYControllerCount()ILcyMapComponent.getAvailableGXYControllerCount()
public int getAvailableGXYControllerID(int aIndex)
ILcyMapComponent
getAvailableGXYControllerID
in interface ILcyMapComponent
aIndex
- The index of the controller to retrieve the ID for. 0 <= aIndex < getAvailableGXYControllerCount()addAvailableGXYController
).ILcyMapComponent.getAvailableGXYControllerCount()
,
ILcyMapComponent.addAvailableGXYController(com.luciad.view.gxy.ILcdGXYController, int)
public void addAvailableGXYController(ILcdGXYController aGXYController)
ILcyMapComponent
getAvailableGXYControllerID
for the
index of this controller will return -1.addAvailableGXYController
in interface ILcyMapComponent
aGXYController
- The controller to add.ILcyMapComponent.removeAvailableGXYController(com.luciad.view.gxy.ILcdGXYController)
,
ILcyMapComponent.getAvailableGXYControllerCount()
,
ILcyMapComponent.getAvailableGXYController(int)
public void addAvailableGXYController(ILcdGXYController aGXYController, int aID)
ILcyMapComponent
addAvailableGXYController
in interface ILcyMapComponent
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
.ILcyMapComponent.removeAvailableGXYController(com.luciad.view.gxy.ILcdGXYController)
,
ILcyMapComponent.getAvailableGXYControllerCount()
,
ILcyMapComponent.getAvailableGXYController(int)
,
ILcyMapComponent.getAvailableGXYControllerID(int)
,
ILcyMapComponent.retrieveAvailableGXYController(int)
public void removeAvailableGXYController(ILcdGXYController aGXYController)
ILcyMapComponent
removeAvailableGXYController
in interface ILcyMapComponent
aGXYController
- The controller to remove.ILcyMapComponent.addAvailableGXYController(com.luciad.view.gxy.ILcdGXYController)
public ILcdGXYController retrieveAvailableGXYController(int aID)
ILcyMapComponent
null
if there is no such controller.retrieveAvailableGXYController
in interface ILcyMapComponent
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
.null
if there is no such controller.ILcyMapComponent.getAvailableGXYControllerCount()
,
ILcyMapComponent.addAvailableGXYController(com.luciad.view.gxy.ILcdGXYController, int)
public ILcdGXYView getMainGXYView()
ILcyMapComponent
getMainGXYView
in interface ILcyMapComponent
public void insertGXYLayer(ILcdGXYLayer aGXYLayer, int aGXYLayerType, int aModelType)
ILcyMapComponent
ILcdGXYLayer
into the main view of this
ILcyMapComponent
. The difference between this method and ILcdGXYView.addGXYLayer
is that
this method behaves differently for ILcdGXYLayerList
s (see
ILcyMapComponent.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
ILcyGXYLayerTypeProvider
s and ILcyModelContentTypeProvider
s.insertGXYLayer
in interface ILcyMapComponent
aGXYLayer
- The ILcdGXYLayer to be added.aGXYLayerType
- The layer type of the given layeraModelType
- The model type of the given layer.ILcyMapComponent.insertGXYLayer(com.luciad.view.gxy.ILcdGXYLayer)
public void insertGXYLayer(ILcdGXYLayer aGXYLayer)
ILcyMapComponent
ILcdGXYLayer
into the main view of this
ILcyMapComponent
. The difference between this method and ILcdGXYView.addGXYLayer
is that
this method behaves differently for ILcdGXYLayerList
s.
As described in ILcdGXYLayerList
, there are some limitations when adding
ILcdGXYLayerList
s 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
as an argument will add a node to the view
with the following structure:
insertGXYLayer
in interface ILcyMapComponent
aGXYLayer
- The ILcdGXYLayer
or ILcdGXYLayerList
to be added.public void setSelectedLayers(ILcdGXYLayer[] aSelectedLayers)
ILcyMapComponent
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 ILcyMapComponent.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.
setSelectedLayers
in interface ILcyMapComponent
aSelectedLayers
- the layers to be selected. Must not be null
public ILcdGXYLayer[] getSelectedLayers()
ILcyMapComponent
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 ILcyMapComponent.getSelectedLayersAsList()
.
A property change event will be fired when the selection has changed.
getSelectedLayers
in interface ILcyMapComponent
ILcyMapComponent.setSelectedLayers(com.luciad.view.gxy.ILcdGXYLayer[])
,
ILcyMapComponent.getSelectedLayersAsList()
public void setPopupMenu(ILcyPopupMenu aPopupMenu)
Sets the popup menu of this map component. It is not added to the GUI, nor registered to be shown on mouse click or similar actions.
The 'aPopupMenu
' must be mediated by the TLcyActionBarUtil
with
action bar ID "popupMenu" and this map as the context, e.g.:
TLcyActionBarUtil.mediate( aPopupMenu, "popupMenu", this, lucyEnv.getUserInterfaceManager().getActionBarManager() );
aPopupMenu
- The popup menu.There normally isn't any need to do this, as TLcyMapComponentFactory
already
takes care of this.
public String getMapName()
ILcyGenericMapComponent
getMapName
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
public void setMapName(String aMapName)
ILcyGenericMapComponent
setMapName
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
aMapName
- the new name of the map.ILcyGenericMapComponent.getMapName()
public void setSelectedLayersAsList(List<? extends ILcdGXYLayer> aSelectedLayers)
ILcyMapComponent
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 ILcyMapComponent.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.
setSelectedLayersAsList
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
setSelectedLayersAsList
in interface ILcyMapComponent
aSelectedLayers
- the layers to be selected. Must not be null
ILcyGenericMapComponent.getSelectedLayersAsList()
public List<ILcdGXYLayer> getSelectedLayersAsList()
ILcyMapComponent
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 ILcyMapComponent.getSelectedLayers()
.
getSelectedLayersAsList
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
getSelectedLayersAsList
in interface ILcyMapComponent
ILcyGenericMapComponent.setSelectedLayersAsList(java.util.List)
public Component getToolBarComponent()
ILcyGenericMapComponent
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.
getToolBarComponent
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
ILcyGenericMapComponent.getToolBar()
public void setToolBarComponent(Component aToolBarComponent)
Sets the tool bar component.
aToolBarComponent
- the tool bar componentgetToolBarComponent()
public Component getMenuBarComponent()
ILcyGenericMapComponent
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.
getMenuBarComponent
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
ILcyGenericMapComponent.getMenuBar()
public void setMenuBarComponent(Component aMenuBarComponent)
Sets the menu bar component.
aMenuBarComponent
- the menu bar componentgetMenuBarComponent()
public Component getLayerControlComponent()
ILcyGenericMapComponent
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.
getLayerControlComponent
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
ILcyGenericMapComponent.getLayerControl()
public void setLayerControlComponent(Component aMapLayerControlComponent)
Sets the layer control component.
aMapLayerControlComponent
- The componentgetLayerControlComponent()
public Component getStatusBarComponent()
ILcyGenericMapComponent
Returns the status bar component. This component is used to toggle the visibility of the status bar.
getStatusBarComponent
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
public void setStatusBarComponent(Component aStatusBarComponent)
Sets the status bar compoment.
aStatusBarComponent
- The status bar component.public void setToolBarVisible(boolean aToolBarVisible)
Sets the tool bar visible or not. Works on the tool bar component.
aToolBarVisible
- True if the tool bar must be visible, false otherwise.isToolBarVisible()
,
getToolBarComponent()
public boolean isToolBarVisible()
ILcyGenericMapComponent
Returns true if the tool bar is visible, false otherwise.
isToolBarVisible
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
public void setMenuBarVisible(boolean aMenuBarVisible)
Sets the menu bar visible or not. Works on the menu bar component.
aMenuBarVisible
- True if the menu bar must be visible, false otherwise.isMenuBarVisible()
,
getMenuBarComponent()
public boolean isMenuBarVisible()
ILcyGenericMapComponent
Returns true if the menu bar is visible, false otherwise.
isMenuBarVisible
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
public void setStatusBarVisible(boolean aStatusBarVisible)
Sets the status bar visible or not. Works on the status bar component.
aStatusBarVisible
- True if the status bar must be visible, false otherwise.isStatusBarVisible()
,
getStatusBarComponent()
public boolean isStatusBarVisible()
ILcyGenericMapComponent
Returns true if the status bar is visible, false otherwise.
isStatusBarVisible
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
public void setLayerControlVisible(boolean aLayerControlVisible)
Sets the layer control visible or not. Works on the layer control component.
aLayerControlVisible
- True if the layer control must be visible, false otherwise.isLayerControlVisible()
,
getLayerControlComponent()
public boolean isLayerControlVisible()
ILcyGenericMapComponent
Returns true if the layer control is visible, false otherwise.
isLayerControlVisible
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
public boolean isPopupMenuCapable()
ILcyGenericMapComponent
Returns true if this map component has a popup menu (getPopupMenu() != null)
isPopupMenuCapable
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
public boolean isMenuBarCapable()
ILcyGenericMapComponent
Returns true if the map has its own menu bar, false otherwise.
isMenuBarCapable
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
ILcyGenericMapComponent.getMenuBar()
public boolean isToolBarCapable()
ILcyGenericMapComponent
Returns true if this map has its own toolbar, false otherwise.
isToolBarCapable
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
ILcyGenericMapComponent.getToolBar()
public boolean isStatusBarCapable()
ILcyGenericMapComponent
Returns true if this map has its own statusbar, false otherwise
isStatusBarCapable
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
ILcyGenericMapComponent.getStatusBar()
public boolean isLayerControlCapable()
ILcyGenericMapComponent
Returns true if this map has its own layer control, false otherwise.
isLayerControlCapable
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
ILcyGenericMapComponent.getLayerControl()
public Container getNorthPanel()
Returns the container at the north of the main view. Can be used to insert custom components to the map.
It returns the panel that was set usingsetNorthPanel(java.awt.Container)
.getNorthPanel
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
public Container getSouthPanel()
Returns the container at the south of the main view. Can be used to insert custom components to the map.
It returns the panel that was set usingsetSouthPanel(java.awt.Container)
.getSouthPanel
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
public Container getWestPanel()
Returns the container at the west of the main view. Can be used to insert custom components to the map.
It returns the panel that was set usingsetWestPanel(java.awt.Container)
.getWestPanel
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
public Container getEastPanel()
Returns the container at the east of the main view. Can be used to insert custom components to the map.
It returns the panel that was set usingsetEastPanel(java.awt.Container)
.getEastPanel
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
public Container getCenterPanel()
ILcyGenericMapComponent
Returns the container in the center, typically containing the main view. Can be used to insert custom components to the map.
getCenterPanel
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
public Container getMapOverlayPanel()
ILcyGenericMapComponent
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.
getMapOverlayPanel
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
TLcdOverlayLayout
public void setNorthPanel(Container aNorthPanel)
aNorthPanel
- The north panel.public void setSouthPanel(Container aSouthPanel)
aSouthPanel
- The south panel.public void setWestPanel(Container aWestPanel)
aWestPanel
- The west panel.public void setEastPanel(Container aEastPanel)
aEastPanel
- The east panel.public void setCenterPanel(Container aCenterPanel)
aCenterPanel
- The center panel.public void setMapOverlayPanel(Container aMapOverlayPanel)
aMapOverlayPanel
- The map overlay panel.public ILcyMenuBar getMenuBar()
ILcyGenericMapComponent
Returns the menu bar of the map. Only relevant if isMenuBarCapable returns true.
getMenuBar
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
ILcyGenericMapComponent.isMenuBarCapable()
public void setMenuBar(ILcyMenuBar aMenuBar)
Sets the menu bar of this map component. It is not added to the GUI.
The 'aMenuBar
' must be mediated by the TLcyActionBarUtil
with
action bar ID "menuBar" and this map as the context, e.g.:
TLcyActionBarUtil.mediate( aMenuBar, "menuBar", this, lucyEnv.getUserInterfaceManager().getActionBarManager() );
aMenuBar
- The menu bar.There normally isn't any need to do this, as TLcyMapComponentFactory
already
takes care of this.
public ILcyToolBar getToolBar()
ILcyGenericMapComponent
Returns the toolbar of this map. Only relevant if isToolBarCapable returns true.
getToolBar
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
null
if there is no toolbar.ILcyGenericMapComponent.isToolBarCapable()
public void setToolBar(ILcyToolBar aToolBar)
Sets the tool bar of this map component. It is not added to the GUI.
The 'aToolBar
' must be mediated by the TLcyActionBarUtil
with
action bar ID "toolBar" and this map as the context, e.g.:
TLcyActionBarUtil.mediate( aToolBar, "toolBar", this, lucyEnv.getUserInterfaceManager().getActionBarManager() );
aToolBar
- The tool bar.There normally isn't any need to do this, as TLcyMapComponentFactory
already
takes care of this.
public ILcyMapLayerControl getLayerControl()
ILcyGenericMapComponent
Returns the layer control of this map. Only relevant if isLayerControlCapable returns true.
getLayerControl
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
ILcyGenericMapComponent.isLayerControlCapable()
public void setLayerControl(ILcyMapLayerControl aLayerControl)
Sets the layer control of this map.
aLayerControl
- The layer controlgetLayerControl()
public ILcyPopupMenu getPopupMenu()
ILcyGenericMapComponent
Returns the popup menu of this map component. Only relevant if isPopupMenuCapable() returns true.
getPopupMenu
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
ILcyGenericMapComponent.isPopupMenuCapable()
public ILcdGXYView getMainView()
ILcyGenericMapComponent
Returns the main component of a lucy map: the view.
getMainView
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
public ILcyToolBar getStatusBar()
ILcyGenericMapComponent
Returns the statusbar of this map. Only relevant if isStatusBarCapable returns true.
getStatusBar
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
null
if there is no statusbar.public void setStatusBar(ILcyToolBar aStatusBar)
Sets the statusbar of this map compoennt. It is not added to the GUI.
The 'aStatusBar
' must be mediated by the TLcyActionBarUtil
with
action bar ID "statusBar" and this map as the context, e.g.:
TLcyActionBarUtil.mediate( aToolBar, "toolBar", this, lucyEnv.getUserInterfaceManager().getActionBarManager());
aStatusBar
- the statusbargetStatusBar()
public Container getNorthContentPane()
ILcyMapComponent
getNorthContentPane
in interface ILcyMapComponent
public Container getSouthContentPane()
ILcyMapComponent
getSouthContentPane
in interface ILcyMapComponent
public Container getWestContentPane()
ILcyMapComponent
getWestContentPane
in interface ILcyMapComponent
public Container getEastContentPane()
ILcyMapComponent
getEastContentPane
in interface ILcyMapComponent
@Deprecated public void setMapPopupMenu(ILcyPopupMenu aMapPopupMenu)
setPopupMenu(com.luciad.lucy.gui.ILcyPopupMenu)
insteadSets the popup menu of this map component. It is not added to the GUI, nor registered to be shown on mouse click or similar actions.
The 'aMapPopupMenu
' must be mediated by the TLcyActionBarUtil
with
action bar ID "popupMenu" and this map as the context, e.g.:
TLcyActionBarUtil.mediate( aMapPopupMenu, "popupMenu", this, lucyEnv.getUserInterfaceManager().getActionBarManager() );
aMapPopupMenu
- The popup menu.getMapPopupMenu()
@Deprecated public ILcyPopupMenu getMapPopupMenu()
getPopupMenu()
insteadReturns the popup menu of this map component. Only relevant if isPopupMenuCapable() returns true.
setMapPopupMenu(com.luciad.lucy.gui.ILcyPopupMenu)
,
isPopupMenuCapable()
public ALcdBalloonManager getBalloonManager()
ILcyGenericMapComponent
Returns the balloon manager of this map component.
getBalloonManager
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
null
ILcyGenericMapComponent.setBalloonManager(com.luciad.view.swing.ALcdBalloonManager)
public void setBalloonManager(ALcdBalloonManager aBalloonManager)
ILcyGenericMapComponent
Set the balloon manager of this map component.
The balloon manager allows to display balloons on the map.
setBalloonManager
in interface ILcyGenericMapComponent<ILcdGXYView,ILcdGXYLayer>
aBalloonManager
- the balloon manager. May be null
.ILcyGenericMapComponent.getBalloonManager()