Class TLspExternalView

java.lang.Object
com.luciad.view.lightspeed.TLspExternalView
All Implemented Interfaces:
ILcdPropertyChangeSource, ILcdLayered, ILcdTreeLayered, ILcdView, ILspView, Serializable

public class TLspExternalView extends Object implements ILspView
Deprecated.
Integration of LuciadLightspeed in C++ applications is no longer actively supported as of V2020.0. Please contact your account manager or support.luciad.gsp@hexagon.com to discuss possible alternatives.
A Lightspeed view that renders into an externally created OpenGL context.

This view can be integrated in non-Java (e.g. C++) applications, using JNI. The intended usage is as follows:

  1. Launch a JVM with all LuciadLightspeed classes on its classpath.
  2. Create an OpenGL context using your windowing toolkit of choice (e.g. Qt, WinForms, ...).
  3. While the GL context is current, instantiate a TLspExternalView.
  4. Attach an ILcdViewInvalidationListener to the view and make it trigger repaints of the host widget.
  5. Call display() whenever the host OpenGL widget requires repainting (this view cannot automatically repaint itself when it is invalidated).
  6. Call setSize(int, int) when the widget's dimensions change.
  7. Convert input events from the host windowing toolkit into Java AWT events and pass them to the handleAWTEvent() method.
  8. Destroy this view when it is no longer needed.

All interactions with this view should be done on the GUI thread of the host application. The display(), setSize(int, int) and destroy() methods require the host GL context to be current. Note that the view will use the AWT event dispatch thread to repaint any Swing overlay components added to it. Care should be taken to prevent such components from accessing the view on the wrong thread (e.g. by using ILcdGLDrawable.invokeLater(ILcdGLRunnable) to defer access to the view's state until the next repaint).

This view does not offer application-level integration, only the core view display and UI event integration.

Since:
2016.1.19
See Also:
  • Constructor Details

    • TLspExternalView

      public TLspExternalView() throws UnsatisfiedLinkError
      Deprecated.
      Creates a new external view with a default configuration. Call setSize(int, int) to adjust the view to the dimensions of the external OpenGL viewport.
      Throws:
      UnsatisfiedLinkError - when the OpenGL binding native libraries could not be loaded
    • TLspExternalView

      public TLspExternalView(int aWidth, int aHeight) throws UnsatisfiedLinkError
      Deprecated.
      Creates a new external view with the given width and height.
      Throws:
      UnsatisfiedLinkError - when the OpenGL binding native libraries could not be loaded
  • Method Details

    • getOverlayComponent

      public Container getOverlayComponent()
      Deprecated.
      Returns an AWT component whose contents are overlaid on top of the view. This is very similar to the overlay component of a regular view: see ILspAWTView.getOverlayComponent().

      Note that the components added to the overlay container are painted to an offscreen buffer. Because they are technically invisible, there are some limitations to the functionality of the overlay components. Popup menus, for instance, will not work (and as a result, neither will combo boxes).

      Returns:
      a component whose contents are overlaid on top of the view
      See Also:
    • addLayerSelectionListener

      public void addLayerSelectionListener(ILcdSelectionListener aSelectionListener)
      Deprecated.
      Description copied from interface: ILspView
      Adds the given ILcdSelectionListener to the view so that is notified of any selection changes in any of the view's layers.
      Specified by:
      addLayerSelectionListener in interface ILspView
      Parameters:
      aSelectionListener - the selection listener to add
    • removeLayerSelectionListener

      public void removeLayerSelectionListener(ILcdSelectionListener aSelectionListener)
      Deprecated.
      Description copied from interface: ILspView
      Removes the given ILcdSelectionListener from the view so that it is no longer notified of selection changes.
      Specified by:
      removeLayerSelectionListener in interface ILspView
      Parameters:
      aSelectionListener - the selection listener to remove
    • addLayerModelListener

      public void addLayerModelListener(ILcdModelListener aModelListener)
      Deprecated.
      Description copied from interface: ILspView
      Adds a ILcdModelListener to receive model change events from any layer's model in this view.
      Specified by:
      addLayerModelListener in interface ILspView
      Parameters:
      aModelListener - the listener that will be notified of model change events from any layer's model in this view.
    • removeLayerModelListener

      public void removeLayerModelListener(ILcdModelListener aModelListener)
      Deprecated.
      Description copied from interface: ILspView
      Unregisters the given ILcdModelListener from receiving model change events from any layer's model in this view.
      Specified by:
      removeLayerModelListener in interface ILspView
      Parameters:
      aModelListener - a listener that the view will no longer notify of model change events
    • getViewXYZWorldTransformation

      public ALspViewXYZWorldTransformation getViewXYZWorldTransformation()
      Deprecated.
      Description copied from interface: ILspView
      Returns the transformation that is used to transform from view coordinates to world coordinates and vice versa.
      Specified by:
      getViewXYZWorldTransformation in interface ILspView
      Returns:
      the transformation that is used to transform from view coordinates to world coordinates and vice versa.
    • setViewXYZWorldTransformation

      public void setViewXYZWorldTransformation(ALspViewXYZWorldTransformation aViewXYZWorldTransformation)
      Deprecated.
      Description copied from interface: ILspView
      Sets the transformation that is used to transform from view coordinates to world coordinates and vice versa.

      TLspViewTransformationUtil provides a convenient way to set up a 2D or 3D view.

      Specified by:
      setViewXYZWorldTransformation in interface ILspView
      Parameters:
      aViewXYZWorldTransformation - the transformation that is used to transform from view coordinates to world coordinates and vice versa.
    • addLayer

      public void addLayer(ILspLayer aLayer)
      Deprecated.
      Description copied from interface: ILspView
      Adds the given layer to the view.
      Specified by:
      addLayer in interface ILspView
      Parameters:
      aLayer - the layer to add
    • addLayersFor

      public Collection<ILspLayer> addLayersFor(ILcdModel aModel)
      Deprecated.
      Description copied from interface: ILspView
      Adds a model to be displayed in this view. To this effect, the view asks its layer factory to create one or more ILspLayers for the model, and adds that to its layer list. This method returns the layers that were created, or null if the layer factory failed to create a layer.
      Specified by:
      addLayersFor in interface ILspView
      Parameters:
      aModel - the model to be added to the view as a new layer
      Returns:
      the layers that were added
    • getController

      public ILspController getController()
      Deprecated.
      Description copied from interface: ILspView
      Gets the controller that the view uses to forward input events to.
      Specified by:
      getController in interface ILspView
      Returns:
      the controller the view uses to forward input events to
    • setController

      public void setController(ILspController aController)
      Deprecated.
      Description copied from interface: ILspView
      Sets the controller that the view will forward input events to. Only one controller can be active at a time. It is the responsibility of the view to call startInteraction when a controller is set on the view, and terminateInteraction when the controller is removed from the view. To detach a controller from the view, you either set another controller or you set the controller to null. Furthermore, the view is responsible for providing input events to the controller via its ILcdAWTEventListener.handleAWTEvent(java.awt.AWTEvent) handleAWTEvent} method. Finally, the view must also invoke the paint method of its controller any time the view itself is repainted.
      Specified by:
      setController in interface ILspView
      Parameters:
      aController - the controller to be used for the view
    • getXYZWorldReference

      public ILcdXYZWorldReference getXYZWorldReference()
      Deprecated.
      Description copied from interface: ILspView
      Returns the view's current world coordinate system.
      Specified by:
      getXYZWorldReference in interface ILspView
      Returns:
      the view's world coordinate system
    • setXYZWorldReference

      public void setXYZWorldReference(ILcdXYZWorldReference aXYZWorldReference)
      Deprecated.
      Description copied from interface: ILspView
      Sets the view's world coordinate system, repainting the view according to isAutoUpdate.

      TLspViewTransformationUtil provides a convenient way to set up a 2D or 3D view.

      Specified by:
      setXYZWorldReference in interface ILspView
      Parameters:
      aXYZWorldReference - the new world reference associated to this view
    • getLayerFactory

      public ILspLayerFactory getLayerFactory()
      Deprecated.
      Description copied from interface: ILspView
      Sets the factory used to create layers for models added to the view using addModel.
      Specified by:
      getLayerFactory in interface ILspView
      Returns:
      the factory used to create layers for models added to the view
    • setLayerFactory

      public void setLayerFactory(ILspLayerFactory aLayerFactory)
      Deprecated.
      Description copied from interface: ILspView
      Sets the factory used to create layers for models added to the view using addModel.
      Specified by:
      setLayerFactory in interface ILspView
      Parameters:
      aLayerFactory - the factory that will be used to create layers for models added to the view
    • removeModel

      public void removeModel(ILcdModel aILcdModel)
      Deprecated.
      Description copied from interface: ILcdView
      Removes a single representation of the specified model from this view, if it is present in the view.
      Specified by:
      removeModel in interface ILcdView
    • addModel

      public void addModel(ILcdModel aModel)
      Deprecated.
      Description copied from interface: ILcdView
      Adds aModel to be displayed in this ILcdView.
      Specified by:
      addModel in interface ILcdView
    • containsLayer

      public boolean containsLayer(ILcdLayer aILcdLayer)
      Deprecated.
      Description copied from interface: ILcdTreeLayered

      Returns whether the flat list representation of the hierarchical layer structure contains the given layer. More formally, returns true if and only if the flat list representation contains at least one layer l such that (aLayer==null ? l==null : aLayer.equals(l)).

      Calling this method with the root node will return false, since the root node is not a part of the flat list representation.

      Specified by:
      containsLayer in interface ILcdLayered
      Specified by:
      containsLayer in interface ILcdTreeLayered
      Parameters:
      aILcdLayer - the layer to check whether it is in the flat list representation
      Returns:
      true when the flat list representation contains the given layer, false otherwise
    • removeAllLayers

      public void removeAllLayers()
      Deprecated.
      Description copied from interface: ILcdTreeLayered

      Remove all the layers from the hierarchical layer structure and the flat list representation. An event will be fired for every layer that has been removed. This will not remove the root node.

      Specified by:
      removeAllLayers in interface ILcdLayered
      Specified by:
      removeAllLayers in interface ILcdTreeLayered
    • removeLayer

      public void removeLayer(ILcdLayer aILcdLayer)
      Deprecated.
      Description copied from interface: ILcdTreeLayered

      Removes a layer from both the hierarchical layer structure and the flat list representation. When removing an ILcdLayerTreeNode all of its children will also be removed. An event will then be generated for every layer that has been removed (one for the node and one for each of its child layers).

      It is not possible to remove the root node

      Specified by:
      removeLayer in interface ILcdLayered
      Specified by:
      removeLayer in interface ILcdTreeLayered
      Parameters:
      aILcdLayer - the layer to remove. If the layer is not in the flat list, this method has no effect.
    • moveLayerAt

      public void moveLayerAt(int i, ILcdLayer aILcdLayer) throws NoSuchElementException, ArrayIndexOutOfBoundsException
      Deprecated.
      Description copied from interface: ILcdLayered
      Moves the given layer (which is already in ILcdLayered) to the existing index aIndex. When a layer is moved down, all layers in between the previous and future position of the given layer (including the layer at index aIndex) are moved one position up. When a layer is moved up, all layers in between the previous and future position of the given layer (including the layer at index aIndex) are moved one position down.

      More formally, let previousIndex be the index of aLayer before the move. If previousIndex < aIndex, then the index of all ILcdLayer objects in from previousIndex + 1 to aIndex is decremented with 1. If previousIndex > aIndex, then the index of all ILcdLayer objects in from aIndex to previousIndex -1 is incremented with 1.

      Specified by:
      moveLayerAt in interface ILcdLayered
      Parameters:
      i - the index of the position where to move the layer.
      aILcdLayer - the layer to move.
      Throws:
      NoSuchElementException - if aLayer is not in this ILcdLayered.
      ArrayIndexOutOfBoundsException - if aIndex is not an index of one of the layers of this ILcdLayered.
    • indexOf

      public int indexOf(ILcdLayer aILcdLayer) throws NoSuchElementException
      Deprecated.
      Description copied from interface: ILcdTreeLayered

      Returns the index of the given layer aLayer in the flat list representation of the hierarchical structure.

      Specified by:
      indexOf in interface ILcdLayered
      Specified by:
      indexOf in interface ILcdTreeLayered
      Parameters:
      aILcdLayer - the layer whose index to return
      Returns:
      the index of aLayer in the flat list representation
      Throws:
      NoSuchElementException - if aLayer is not in the flat list
    • layerOf

      public ILspLayer layerOf(ILcdModel aILcdModel) throws NoSuchElementException
      Deprecated.
      Description copied from interface: ILcdTreeLayered
      Returns the ILcdLayer of the flat list that contains the given ILcdModel.
      Specified by:
      layerOf in interface ILcdLayered
      Specified by:
      layerOf in interface ILcdTreeLayered
      Parameters:
      aILcdModel - the model to check for in the flat list
      Returns:
      the ILcdLayer of the flat list that contains the given ILcdModel.
      Throws:
      NoSuchElementException - if there is no layer containing the given model
    • getLayer

      public ILspLayer getLayer(int i) throws ArrayIndexOutOfBoundsException
      Deprecated.
      Description copied from interface: ILspView
      Returns the layer at the given index.
      Specified by:
      getLayer in interface ILcdLayered
      Specified by:
      getLayer in interface ILcdTreeLayered
      Specified by:
      getLayer in interface ILspView
      Parameters:
      i - the index of the requested layer
      Returns:
      the layer at the given index
      Throws:
      ArrayIndexOutOfBoundsException - if the given index is invalid
    • layersBackwards

      public Enumeration layersBackwards()
      Deprecated.
      Description copied from interface: ILcdTreeLayered

      Returns an Enumeration of all the ILcdLayers currently in the flat list representation of the hierarchical layer structure, starting from the top layer to the bottom layer. This does not include the root node.

      Specified by:
      layersBackwards in interface ILcdLayered
      Specified by:
      layersBackwards in interface ILcdTreeLayered
      Returns:
      an Enumeration of all the ILcdLayers currently in the flat list, starting from the top layer to the bottom layer. Does not include the root node.
    • layers

      public Enumeration layers()
      Deprecated.
      Description copied from interface: ILcdTreeLayered

      Returns an Enumeration of all the ILcdLayers currently in the flat list representation of the hierarchical layer structure, starting from the bottom layer to the top layer. This does not include the root node.

      Specified by:
      layers in interface ILcdLayered
      Specified by:
      layers in interface ILcdTreeLayered
      Returns:
      an Enumeration of all the ILcdLayers currently in the flat list, starting from the bottom layer to the top layer. Does not include the root node.
    • layerCount

      public int layerCount()
      Deprecated.
      Description copied from interface: ILcdTreeLayered

      Returns the number of layers in the flat list representation of the hierarchical layer structure. This does not include the root node.

      Specified by:
      layerCount in interface ILcdLayered
      Specified by:
      layerCount in interface ILcdTreeLayered
      Returns:
      the number of layers in the flat list. Does not include the root node.
    • removeLayeredListener

      public void removeLayeredListener(ILcdLayeredListener aILcdLayeredListener)
      Deprecated.
      Description copied from interface: ILcdTreeLayered
      Unregisters the given ILcdLayeredListener from receiving layered events for the flat list.
      Specified by:
      removeLayeredListener in interface ILcdLayered
      Specified by:
      removeLayeredListener in interface ILcdTreeLayered
      Parameters:
      aILcdLayeredListener - the listener that will no longer be notified of changes in the flat list.
      See Also:
    • addLayeredListener

      public void addLayeredListener(ILcdLayeredListener aILcdLayeredListener)
      Deprecated.
      Description copied from interface: ILcdTreeLayered
      Registers the given ILcdLayeredListener to be notified when layers are added, removed or moved in the flat list.
      Specified by:
      addLayeredListener in interface ILcdLayered
      Specified by:
      addLayeredListener in interface ILcdTreeLayered
      Parameters:
      aILcdLayeredListener - the listener that from now on will be notified of all changes to the flat list.
      See Also:
    • getRootNode

      public ILcdLayerTreeNode getRootNode()
      Deprecated.
      Description copied from interface: ILcdTreeLayered

      Returns the root node of the tree structure.

      Specified by:
      getRootNode in interface ILcdTreeLayered
      Returns:
      the root node of the tree structure
    • addViewInvalidationListener

      public void addViewInvalidationListener(ILcdViewInvalidationListener aInvalidationListener)
      Deprecated.
      Description copied from interface: ILspView
      Registers an ILcdViewInvalidationListener to be informed when the view's contents are invalid. This can happen directly (e.g. by calling ILcdView.invalidate(boolean, Object, String)) or indirectly (e.g. by using a controller)
      Specified by:
      addViewInvalidationListener in interface ILspView
      Parameters:
      aInvalidationListener - the listener to notify when the view has been invalidated
      See Also:
    • removeViewInvalidationListener

      public void removeViewInvalidationListener(ILcdViewInvalidationListener aInvalidationListener)
      Deprecated.
      Description copied from interface: ILspView
      Unregisters an ILcdViewInvalidationListener so that it is no longer informed of invalidation events for this view.
      Specified by:
      removeViewInvalidationListener in interface ILspView
      Parameters:
      aInvalidationListener - the listener to no longer notify when the view has been invalidated
      See Also:
    • addViewListener

      public void addViewListener(ILspViewListener aViewListener)
      Deprecated.
      Description copied from interface: ILspView
      Adds the given ILspViewListener to the view to be notified of initialization, disposal or render events.
      Specified by:
      addViewListener in interface ILspView
      Parameters:
      aViewListener - the view listener to add
    • removeViewListener

      public void removeViewListener(ILspViewListener aViewListener)
      Deprecated.
      Description copied from interface: ILspView
      Removes the given ILspViewListener from the view.
      Specified by:
      removeViewListener in interface ILspView
      Parameters:
      aViewListener - the view listener to remove.
    • getBackground

      public Color getBackground()
      Deprecated.
      Description copied from interface: ILspView
      Returns the view's background clear color.
      Specified by:
      getBackground in interface ILspView
      Returns:
      the color which is used for clearing the background
    • setBackground

      public void setBackground(Color aColor)
      Deprecated.
      Description copied from interface: ILspView
      Sets the view's background clear color.
      Specified by:
      setBackground in interface ILspView
      Parameters:
      aColor - the color to be used for clearing the background
    • getGLDrawable

      public ILcdGLExternalDrawable getGLDrawable()
      Deprecated.
      Description copied from interface: ILspView
      Returns the OpenGL drawable associated with this view. The drawable acts as the view's entry point to the OpenGL API.

      The default implementation of this method returns null.

      Specified by:
      getGLDrawable in interface ILspView
      Returns:
      the OpenGL drawable associated with this view
    • getWidth

      public int getWidth()
      Deprecated.
      Description copied from interface: ILspView
      Returns the view's current width in number of screen pixels. Divide by the DPI scale to obtain toolkit pixels.
      Specified by:
      getWidth in interface ILspView
      Returns:
      the width of the view
    • getHeight

      public int getHeight()
      Deprecated.
      Description copied from interface: ILspView
      Returns the view's current height in number of screen pixels. Divide by the DPI scale to obtain toolkit pixels.
      Specified by:
      getHeight in interface ILspView
      Returns:
      the height of the view
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener listener)
      Deprecated.
      Description copied from interface: ILspView
      Registers the given PropertyChangeListener to be notified when this view's properties change.
      Specified by:
      addPropertyChangeListener in interface ILcdPropertyChangeSource
      Specified by:
      addPropertyChangeListener in interface ILspView
      Parameters:
      listener - the listener to notify of changes of this view's properties
      See Also:
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)
      Deprecated.
      Description copied from interface: ILspView
      Unregisters the given PropertyChangeListener from receiving property change events for this view.
      Specified by:
      removePropertyChangeListener in interface ILcdPropertyChangeSource
      Specified by:
      removePropertyChangeListener in interface ILspView
      Parameters:
      listener - the listener that should no longer be notified of changes of this views properties
      See Also:
    • invalidate

      public void invalidate(boolean aRepaint, Object aSource, String aReason)
      Deprecated.
      Description copied from interface: ILcdView
      Invalidate the content of this ILcdView.
      Specified by:
      invalidate in interface ILcdView
      Parameters:
      aRepaint - if true, this ILcdView shall be repainted immediately.
      aSource - the class instance that calls this method. Used for tracing.
      aReason - a message associated with this call. Used for tracing.
    • isAutoUpdate

      public boolean isAutoUpdate()
      Deprecated.
      Description copied from interface: ILspView
      Returns true if the view automatically updates its representation upon receiving any event that might require an update. Such events can include changes to properties of the view or to an Object in a model, or addition/removal of models.
      Specified by:
      isAutoUpdate in interface ILcdView
      Specified by:
      isAutoUpdate in interface ILspView
      Returns:
      true if the view automatically updates when necessary; false if the view must be repainted manually
      See Also:
    • setAutoUpdate

      public void setAutoUpdate(boolean b)
      Deprecated.
      Description copied from interface: ILspView
      Sets whether to update the view's representation automatically to keep it in sync with its state and the state of its models.
      Specified by:
      setAutoUpdate in interface ILcdView
      Specified by:
      setAutoUpdate in interface ILspView
      Parameters:
      b - true if the view should update automatically; false if it will be repainted manually
      See Also:
    • destroy

      public void destroy()
      Deprecated.
      Frees resources associated with this view. The view must not be used anymore after this method has been called.

      This method should only be called by the host application, and the OpenGL context must be current.

      Specified by:
      destroy in interface ILspView
    • getPaintingOrder

      public ILspPaintingOrder getPaintingOrder()
      Deprecated.
      Description copied from interface: ILspView
      Gets the order object that determines the order in which layers and their various painters are invoked.
      Specified by:
      getPaintingOrder in interface ILspView
      Returns:
      the painting order object
    • setPaintingOrder

      public void setPaintingOrder(ILspPaintingOrder aPaintingOrder)
      Deprecated.
      Description copied from interface: ILspView
      Sets the order object that determines the order in which layers and their various painters are invoked.
      Specified by:
      setPaintingOrder in interface ILspView
      Parameters:
      aPaintingOrder - the painting order object
    • setAltitudeExaggerationFactor

      public void setAltitudeExaggerationFactor(double aVerticalExaggerationFactor)
      Deprecated.
      Description copied from interface: ILspView
      Sets the vertical exaggeration factor that is applied to altitudes and elevations in this view. Note that this method throws an exception when a non-strict positive value is passed to it (i.e. a negative number or 0). It is possible to disable terrain elevation using ILspTerrainSupport#setElevationEnabled.

      A factor of 1.0 results in no exaggeration.

      Specified by:
      setAltitudeExaggerationFactor in interface ILspView
      Parameters:
      aVerticalExaggerationFactor - the vertical exaggeration factor
      See Also:
    • getAltitudeExaggerationFactor

      public double getAltitudeExaggerationFactor()
      Deprecated.
      Description copied from interface: ILspView
      Gets the vertical exaggeration factor that is applied to altitudes and elevations in this view. All elevations are multiplied with this factor during visualization.

      The exaggeration factor must be strictly positive. A factor of 1.0 results in no exaggeration. Values between 0 and 1 result in reduced relief, values higher than 1 result in increased relief. Rendering artifacts may occur when using values that are too small or too large; for most applications, values below 1 and above 20 or so will not produce useful results.

      Specified by:
      getAltitudeExaggerationFactor in interface ILspView
      Returns:
      the vertical exaggeration factor
    • getLabelPlacer

      public ILspLabelPlacer getLabelPlacer()
      Deprecated.
      Description copied from interface: ILspView
      Gets the currently used label placer.
      Specified by:
      getLabelPlacer in interface ILspView
      Returns:
      the current placer, never null.
    • setLabelPlacer

      public void setLabelPlacer(ILspLabelPlacer aPlacer)
      Deprecated.
      Description copied from interface: ILspView
      Sets the label placer to be used by this view.

      A label placer positions the labels of all the view's layers. The layers are only responsible for painting of their labels, not de-cluttering them.

      Specified by:
      setLabelPlacer in interface ILspView
      Parameters:
      aPlacer - the new placer, never null.
      See Also:
    • getRequiredOpenGLProfile

      public TLspOpenGLProfile getRequiredOpenGLProfile()
      Deprecated.
      Description copied from interface: ILspView
      Returns the minimum required OpenGL profile that an end user system must support in order to be compatible with this view. This profile does NOT take into account any of the layers or painters that are present in the view -- these should be checked individually to get a complete overview of an application's OpenGL requirements.

      All current implementations of this method return TLspOpenGLProfile.LIGHTSPEED_MINIMUM.

      Specified by:
      getRequiredOpenGLProfile in interface ILspView
      Returns:
      a TLspGLProfile
    • getServices

      public TLspViewServices getServices()
      Deprecated.
      Description copied from interface: ILspView
      Returns a view services object which provides various utilities that can be leveraged by the view's layers. Examples include caching mechanisms and asynchronous processing support. Note that this method returns null if invoked after a call to ILspView.destroy().
      Specified by:
      getServices in interface ILspView
      Returns:
      a view services object
    • getPaintExceptionHandler

      public ILcdPaintExceptionHandler getPaintExceptionHandler()
      Deprecated.
      Description copied from interface: ILspView
      Returns a handler to report paint exceptions. The view, as well as layers and painters can use this handler if they encounter an exception during painting. Because painting may happen asynchronously, the handler may be called from different threads.
      Specified by:
      getPaintExceptionHandler in interface ILspView
      Returns:
      a handler to report paint exceptions.
    • getViewType

      public ILspView.ViewType getViewType()
      Deprecated.
      Description copied from interface: ILspView
      Convenience method that returns whether the view is currently configured for 2D or 3D visualization. This is actually determined by the type of ILspView.getViewXYZWorldTransformation(): In other words, getViewType() is equivalent to an instanceof test on the ALspViewXYZWorldTransformation.
      Specified by:
      getViewType in interface ILspView
      Returns:
      the current view type
    • display

      public void display()
      Deprecated.
      Repaint this view. Typically part of repainting a widget in the host UI toolkit.

      This method should only be called by the host application, and the OpenGL context must be current.

      You can attach a view invalidation listener to this view to be notified when LuciadLightspeed decides this view should be repainted (e.g. when data is updated). You can then repaint the host widget, as LuciadLightspeed will not actively repaint this view.

    • setSize

      public void setSize(int aWidth, int aHeight)
      Deprecated.
      Resize this view after the host widget or window changed size.

      This method should only be called by the host application, and the OpenGL context must be current.

    • handleAWTEvent

      public void handleAWTEvent(AWTEvent aEvent)
      Deprecated.
      Pass UI events from the host UI toolkit into the Lightspeed view. You must convert the UI events from your toolkit into AWT events. Mouse events are passed to the appropriate component in the view's overlay panel (if any). If there are no overlay components under the cursor, or if the incoming event is not a mouse event, the event is passed on to the view's ILspController.

      This method should only be called by the host application.

      Note that event dispatching to overlaid Swing components has some limitations. As mentioned above, only mouse events are supported. All events other than MouseEvent are only handled by the view's controller. Notably, this prevents the use of various text input components such as JTextField. Furthermore, the view does not automatically generate events that could be considered a "side effect" of mouse button and motion events, such as click, double click or enter/exit.

    • invokeLater

      public void invokeLater(Runnable aRunnable)
      Deprecated.
      Schedules the specified runnable to be executed on the Swing EDT. This method returns immediately, without waiting for the runnable to execute. Note that if the view is destroyed, any runnables that are still pending will be discarded without being executed.
      Specified by:
      invokeLater in interface ILspView
      Parameters:
      aRunnable - the runnable to be executed
      Since:
      2019.0