public class TLspAWTView extends ALspAWTView
ILspViewwhich is represented by an AWT component. The component can be accessed via the
getHostComponent()method. This implementation uses a heavyweight component for drawing into. Lightweight components overlaid on this view may hence not be drawn correctly. The
getOverlayComponent()method returns a component which is specially treated by the view to avoid these issues. Any lightweight overlays should therefore be added to this overlay component. Note that the host component is the one that should be added to the application's GUI. The overlay component is owned by the view and should only be used to add additional child components to.
|Constructor and Description|
Creates a new AWT view with a default configuration.
|Modifier and Type||Method and Description|
Creates an ILcdGLDrawable for this view canvas.
Returns the AWT component that represents this
Returns the Swing component that will be painted on top of the view.
Invalidate the content of this
addLayer, addLayeredListener, addLayerModelListener, addLayerSelectionListener, addLayersFor, addModel, addPropertyChangeListener, addViewInvalidationListener, addViewListener, beginPrinting, containsLayer, destroy, endPrinting, getAltitudeExaggerationFactor, getBackground, getController, getGLDrawable, getHeight, getImage, getLabelPlacer, getLayer, getLayerFactory, getPaintExceptionHandler, getPaintingHints, getPaintingOrder, getRequiredOpenGLProfile, getRootNode, getServices, getViewType, getViewXYZWorldTransformation, getWidth, getXYZWorldReference, indexOf, invokeLater, isAutoUpdate, layerCount, layerOf, layers, layersBackwards, moveLayerAt, print, removeAllLayers, removeLayer, removeLayeredListener, removeLayerModelListener, removeLayerSelectionListener, removeModel, removePropertyChangeListener, removeViewInvalidationListener, removeViewListener, setAltitudeExaggerationFactor, setAutoUpdate, setBackground, setController, setLabelPlacer, setLayerFactory, setPaintingOrder, setViewXYZWorldTransformation, setXYZWorldReference
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public TLspAWTView() throws java.lang.UnsatisfiedLinkError
TLspViewBuilderprovides a convenient way of configuring views if you wish to deviate from the default settings for any reason.
public javax.swing.JComponent getOverlayComponent()
TLcdOverlayLayout, which is a useful layout manager for overlays. However, other layouts may be used. Typical uses of the overlay component include on-map controls (see the
navigation controls package) or map legends. Note that this method may return
nullif the view was created without overlay component support (see
protected TLcdGLDrawableHolder createGLDrawable(ILcdGLCapabilities aCapabilities, java.awt.GraphicsDevice aGraphicsDevice, ILcdGLDrawable aShareWith) throws java.lang.UnsatisfiedLinkError
aCapabilities- an ILcdGLCapabilities
aGraphicsDevice- a GraphicsDevice
aShareWith- an ILcdGLDrawable
java.lang.UnsatisfiedLinkError- when the OpenGL binding native libraries could not be loaded
public void invalidate(boolean aRepaint, java.lang.Object aSource, java.lang.String aMessage)
aRepaint- if true, this ILcdView shall be repainted immediately.
aSource- the class instance that calls this method. Used for tracing.
aMessage- a message associated with this call. Used for tracing.
public java.awt.Component getHostComponent()
ILspView. This component can be used as the view's on-screen representation and is also the channel through which the view can receive user input events. It is not allowed to change any sub-components of this component or their layout. You can use the
overlay componentto paint components on top of the view. The host component can also be used to print the contents of the view (e.g. using TLcdPrintComponentAction).