Package com.luciad.view.lightspeed
Interface ILspAWTView
- All Superinterfaces:
ILcdLayered
,ILcdPropertyChangeSource
,ILcdTreeLayered
,ILcdView
,ILspView
,Serializable
- All Known Implementing Classes:
ALspAWTView
,TLspAWTView
,TLspSwingView
Defines an
ILspView
which is represented on screen by an AWT or Swing
component. Two components are actually provided by this interface:
- The
host component
represents the actual view and is the one that should be added to the application's GUI; - The
overlay component
serves as a container for components that should be overlaid on the view. Examples of such components include map navigation controls as created with TLspNavigationControlsBuilder
- Since:
- 2012.1.05
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.luciad.view.lightspeed.ILspView
ILspView.ViewType
-
Method Summary
Modifier and TypeMethodDescriptionReturns the component representing this view.Returns a component whose contents are overlaid on top of the view.Methods inherited from interface com.luciad.view.ILcdLayered
addLayeredListener, moveLayerAt, removeLayeredListener
Methods inherited from interface com.luciad.view.ILcdTreeLayered
addLayeredListener, containsLayer, getRootNode, indexOf, layerCount, layerOf, layers, layersBackwards, removeAllLayers, removeLayer, removeLayeredListener
Methods inherited from interface com.luciad.view.ILcdView
addModel, invalidate, removeModel
Methods inherited from interface com.luciad.view.lightspeed.ILspView
addLayer, addLayerModelListener, addLayerSelectionListener, addLayersFor, addPropertyChangeListener, addViewInvalidationListener, addViewListener, destroy, getAltitudeExaggerationFactor, getBackground, getController, getDPIScale, getGLDrawable, getHeight, getLabelPlacer, getLayer, getLayerFactory, getLayers, getPaintExceptionHandler, getPaintingOrder, getRequiredOpenGLProfile, getServices, getViewType, getViewXYZWorldTransformation, getWidth, getXYZWorldReference, invokeLater, isAutoUpdate, removeLayerModelListener, removeLayerSelectionListener, removePropertyChangeListener, removeViewInvalidationListener, removeViewListener, setAltitudeExaggerationFactor, setAutoUpdate, setBackground, setController, setLabelPlacer, setLayerFactory, setPaintingOrder, setViewXYZWorldTransformation, setXYZWorldReference
-
Method Details
-
getHostComponent
Component getHostComponent()Returns the component representing this view. This is the component that should be added to the application's GUI. The host component can also be used to print the contents of the view (e.g. using TLcdPrintComponentAction). When creating a more elaborate printing layout, consider usingTLspViewComponentPrintable
instead.- Returns:
- a component containing the view
-
getOverlayComponent
Container getOverlayComponent()Returns a component whose contents are overlaid on top of the view.
Whenever child components are added to or removed from a Swing component that is already showing on screen, care must be taken. This is often the case for the overlay panel. Please refer to
A typical code snippet to add a component to the overlay looks like this:TLcdAWTUtil
for more explanation. These rules are general Swing considerations, so they also apply to all sub-components.Container overlay = view.getOverlayComponent(); TLcdAWTUtil.addComponent(overlay, new JLabel("Info"), TLcdOverlayLayout.Location.NORTH);
- Returns:
- a component whose contents are overlaid on top of the view
-