public interface ILspAWTView extends ILspView
ILspView
which is represented on screen by an AWT or Swing
component. Two components are actually provided by this interface:
host component
represents the actual view
and is the one that should be added to the application's GUI;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
TLspNavigationControlsBuilderILspView.ViewType
Modifier and Type | Method and Description |
---|---|
Component |
getHostComponent()
Returns the component representing this view.
|
Container |
getOverlayComponent()
Returns a component whose contents are overlaid on top of the view.
|
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
addModel, invalidate, removeModel
addLayeredListener, containsLayer, getRootNode, indexOf, layerCount, layerOf, layers, layersBackwards, removeAllLayers, removeLayer, removeLayeredListener
addLayeredListener, moveLayerAt, removeLayeredListener
Component getHostComponent()
TLspViewComponentPrintable
instead.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
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);