public class TLspExternalView extends Object implements ILspView
view
that renders into an externally created OpenGL context.
The article How to integrate LuciadLightspeed in a C++ application on the Luciad Developer Platform
provides more details. It describes a sample that shows a few use-cases such as pushing track
updates from C++ to LuciadLightspeed, intercepting selection and loading background data.
This view can be integrated in non-Java (e.g. C++) applications, using JNI.
The intended usage is as follows:
TLspExternalView
.ILcdViewInvalidationListener
to the view and make it trigger repaints of the host widget.display()
whenever the host OpenGL widget requires repainting (this view cannot automatically repaint itself when it is invalidated).setSize(int, int)
when the widget's dimensions change.handleAWTEvent()
method.Destroy
this view when it is no longer needed.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.
ILspView.ViewType
Constructor and Description |
---|
TLspExternalView()
Deprecated.
Creates a new external view with a default configuration.
|
TLspExternalView(int aWidth,
int aHeight)
Deprecated.
Creates a new external view with the given width and height.
|
Modifier and Type | Method and Description |
---|---|
void |
addLayer(ILspLayer aLayer)
Deprecated.
Adds the given layer to the view.
|
void |
addLayeredListener(ILcdLayeredListener aILcdLayeredListener)
Deprecated.
Registers the given
ILcdLayeredListener to be notified when layers are added,
removed or moved in the flat list. |
void |
addLayerModelListener(ILcdModelListener aModelListener)
Deprecated.
Adds a
ILcdModelListener to receive model change events from
any layer's model in this view. |
void |
addLayerSelectionListener(ILcdSelectionListener aSelectionListener)
Deprecated.
Adds the given
ILcdSelectionListener to the view so
that is notified of any selection changes in any of the view's layers. |
Collection<ILspLayer> |
addLayersFor(ILcdModel aModel)
Deprecated.
Adds a model to be displayed in this view.
|
void |
addModel(ILcdModel aModel)
Deprecated.
Adds
aModel to be displayed in this ILcdView . |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Deprecated.
Registers the given
PropertyChangeListener
to be notified when this view's properties change. |
void |
addViewInvalidationListener(ILcdViewInvalidationListener aInvalidationListener)
Deprecated.
Registers an
ILcdViewInvalidationListener to be informed when the view's contents are invalid. |
void |
addViewListener(ILspViewListener aViewListener)
Deprecated.
Adds the given
ILspViewListener to the view
to be notified of initialization, disposal or render events. |
boolean |
containsLayer(ILcdLayer aILcdLayer)
Deprecated.
Returns whether the flat list representation of the hierarchical layer structure contains
the given layer.
|
void |
destroy()
Deprecated.
Frees resources associated with this view.
|
void |
display()
Deprecated.
Repaint this view.
|
double |
getAltitudeExaggerationFactor()
Deprecated.
Gets the vertical exaggeration factor that is applied to altitudes and
elevations in this view.
|
Color |
getBackground()
Deprecated.
Returns the view's background clear color.
|
ILspController |
getController()
Deprecated.
Gets the controller that the view uses to forward input events to.
|
ILcdGLExternalDrawable |
getGLDrawable()
Deprecated.
Returns the OpenGL drawable associated with this view.
|
int |
getHeight()
Deprecated.
Returns the view's current height in number of screen pixels.
|
ILspLabelPlacer |
getLabelPlacer()
Deprecated.
Gets the currently used label placer.
|
ILspLayer |
getLayer(int i)
Deprecated.
Returns the layer at the given index.
|
ILspLayerFactory |
getLayerFactory()
Deprecated.
Sets the factory used to create layers for models added
to the view using
addModel . |
Container |
getOverlayComponent()
Deprecated.
Returns an AWT component whose contents are overlaid on top of the view.
|
ILcdPaintExceptionHandler |
getPaintExceptionHandler()
Deprecated.
Returns a handler to report paint exceptions.
|
ILspPaintingOrder |
getPaintingOrder()
Deprecated.
Gets the order object that
determines the order in which layers and their various painters are invoked.
|
TLspOpenGLProfile |
getRequiredOpenGLProfile()
Deprecated.
Returns the minimum required OpenGL profile that an end user system must
support in order to be compatible with this view.
|
ILcdLayerTreeNode |
getRootNode()
Deprecated.
Returns the root node of the tree structure.
|
TLspViewServices |
getServices()
Deprecated.
Returns a view services object which provides various utilities that can
be leveraged by the view's layers.
|
ILspView.ViewType |
getViewType()
Deprecated.
Convenience method that returns whether the view is currently configured
for 2D or 3D visualization.
|
ALspViewXYZWorldTransformation |
getViewXYZWorldTransformation()
Deprecated.
Returns the transformation that is used to transform from view coordinates
to world coordinates and vice versa.
|
int |
getWidth()
Deprecated.
Returns the view's current width in number of screen pixels.
|
ILcdXYZWorldReference |
getXYZWorldReference()
Deprecated.
Returns the view's current world coordinate system.
|
void |
handleAWTEvent(AWTEvent aEvent)
Deprecated.
Pass UI events from the host UI toolkit into the Lightspeed view.
|
int |
indexOf(ILcdLayer aILcdLayer)
Deprecated.
Returns the index of the given layer
aLayer in the flat list representation of
the hierarchical structure. |
void |
invalidate(boolean aRepaint,
Object aSource,
String aReason)
Deprecated.
Invalidate the content of this
ILcdView . |
void |
invokeLater(Runnable aRunnable)
Deprecated.
Schedules the specified runnable to be executed on the Swing EDT.
|
boolean |
isAutoUpdate()
Deprecated.
Returns true if the view automatically updates its representation upon
receiving any event that might require an update.
|
int |
layerCount()
Deprecated.
Returns the number of layers in the flat list representation of the hierarchical layer
structure.
|
ILspLayer |
layerOf(ILcdModel aILcdModel)
Deprecated.
Returns the
ILcdLayer of the flat list that contains the given
ILcdModel . |
Enumeration |
layers()
Deprecated.
Returns an
Enumeration of all the ILcdLayer s currently in the flat
list representation of the hierarchical layer structure, starting from the bottom layer to the
top layer. |
Enumeration |
layersBackwards()
Deprecated.
Returns an
Enumeration of all the ILcdLayer s currently in the flat
list representation of the hierarchical layer structure, starting from the top layer to the
bottom layer. |
void |
moveLayerAt(int i,
ILcdLayer aILcdLayer)
Deprecated.
Moves the given layer (which is already in
ILcdLayered ) to the existing index
aIndex. |
void |
removeAllLayers()
Deprecated.
Remove all the layers from the hierarchical layer structure and the flat list
representation.
|
void |
removeLayer(ILcdLayer aILcdLayer)
Deprecated.
Removes a layer from both the hierarchical layer structure and the flat list representation.
|
void |
removeLayeredListener(ILcdLayeredListener aILcdLayeredListener)
Deprecated.
Unregisters the given
ILcdLayeredListener from receiving layered events for the
flat list. |
void |
removeLayerModelListener(ILcdModelListener aModelListener)
Deprecated.
Unregisters the given
ILcdModelListener from receiving model
change events from any layer's model in this view. |
void |
removeLayerSelectionListener(ILcdSelectionListener aSelectionListener)
Deprecated.
Removes the given
ILcdSelectionListener from the view
so that it is no longer notified of selection changes. |
void |
removeModel(ILcdModel aILcdModel)
Deprecated.
Removes a single representation of the specified model from this
view, if it is present in the view.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Deprecated.
Unregisters the given
PropertyChangeListener
from receiving property change events for this view. |
void |
removeViewInvalidationListener(ILcdViewInvalidationListener aInvalidationListener)
Deprecated.
Unregisters an
ILcdViewInvalidationListener so that it is no longer informed
of invalidation events for this view. |
void |
removeViewListener(ILspViewListener aViewListener)
Deprecated.
Removes the given
ILspViewListener from the view. |
void |
setAltitudeExaggerationFactor(double aVerticalExaggerationFactor)
Deprecated.
Sets the vertical exaggeration factor that is applied to altitudes and elevations in this view.
|
void |
setAutoUpdate(boolean b)
Deprecated.
Sets whether to update the view's representation automatically to keep it
in sync with its state and the state of its models.
|
void |
setBackground(Color aColor)
Deprecated.
Sets the view's background clear color.
|
void |
setController(ILspController aController)
Deprecated.
Sets the controller that the view will forward input events to.
|
void |
setLabelPlacer(ILspLabelPlacer aPlacer)
Deprecated.
Sets the label placer to be used by this view.
|
void |
setLayerFactory(ILspLayerFactory aLayerFactory)
Deprecated.
Sets the factory used to create layers for models added
to the view using
addModel . |
void |
setPaintingOrder(ILspPaintingOrder aPaintingOrder)
Deprecated.
Sets the order object that
determines the order in which layers and their various painters are invoked.
|
void |
setSize(int aWidth,
int aHeight)
Deprecated.
Resize this view after the host widget or window changed size.
|
void |
setViewXYZWorldTransformation(ALspViewXYZWorldTransformation aViewXYZWorldTransformation)
Deprecated.
Sets the transformation that is used to transform from view coordinates
to world coordinates and vice versa.
|
void |
setXYZWorldReference(ILcdXYZWorldReference aXYZWorldReference)
Deprecated.
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDPIScale, getLayers
addLayeredListener, removeLayeredListener
public TLspExternalView() throws UnsatisfiedLinkError
setSize(int, int)
to adjust the view to the dimensions of the
external OpenGL viewport.UnsatisfiedLinkError
- when the OpenGL binding native libraries could not be loadedpublic TLspExternalView(int aWidth, int aHeight) throws UnsatisfiedLinkError
UnsatisfiedLinkError
- when the OpenGL binding native libraries could not be loadedpublic Container getOverlayComponent()
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).ILspAWTView.getOverlayComponent()
public void addLayerSelectionListener(ILcdSelectionListener aSelectionListener)
ILspView
ILcdSelectionListener
to the view so
that is notified of any selection changes in any of the view's layers.addLayerSelectionListener
in interface ILspView
aSelectionListener
- the selection listener to addpublic void removeLayerSelectionListener(ILcdSelectionListener aSelectionListener)
ILspView
ILcdSelectionListener
from the view
so that it is no longer notified of selection changes.removeLayerSelectionListener
in interface ILspView
aSelectionListener
- the selection listener to removepublic void addLayerModelListener(ILcdModelListener aModelListener)
ILspView
ILcdModelListener
to receive model change events from
any layer's model in this view.addLayerModelListener
in interface ILspView
aModelListener
- the listener that will be notified of model change events
from any layer's model in this view.public void removeLayerModelListener(ILcdModelListener aModelListener)
ILspView
ILcdModelListener
from receiving model
change events from any layer's model in this view.removeLayerModelListener
in interface ILspView
aModelListener
- a listener that the view will no longer notify of model change eventspublic ALspViewXYZWorldTransformation getViewXYZWorldTransformation()
ILspView
getViewXYZWorldTransformation
in interface ILspView
public void setViewXYZWorldTransformation(ALspViewXYZWorldTransformation aViewXYZWorldTransformation)
ILspView
TLspViewTransformationUtil
provides a convenient way
to set up a 2D or 3D view.setViewXYZWorldTransformation
in interface ILspView
aViewXYZWorldTransformation
- the transformation that is used to transform
from view coordinates to world coordinates and vice versa.public void addLayer(ILspLayer aLayer)
ILspView
public Collection<ILspLayer> addLayersFor(ILcdModel aModel)
ILspView
ILspLayer
s 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.addLayersFor
in interface ILspView
aModel
- the model to be added to the view as a new layerpublic ILspController getController()
ILspView
getController
in interface ILspView
public void setController(ILspController aController)
ILspView
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.setController
in interface ILspView
aController
- the controller to be used for the viewpublic ILcdXYZWorldReference getXYZWorldReference()
ILspView
getXYZWorldReference
in interface ILspView
public void setXYZWorldReference(ILcdXYZWorldReference aXYZWorldReference)
ILspView
isAutoUpdate
.
TLspViewTransformationUtil
provides a convenient way
to set up a 2D or 3D view.setXYZWorldReference
in interface ILspView
aXYZWorldReference
- the new world reference associated to this viewpublic ILspLayerFactory getLayerFactory()
ILspView
addModel
.getLayerFactory
in interface ILspView
public void setLayerFactory(ILspLayerFactory aLayerFactory)
ILspView
addModel
.setLayerFactory
in interface ILspView
aLayerFactory
- the factory that will be used to create layers for
models added to the viewpublic void removeModel(ILcdModel aILcdModel)
ILcdView
removeModel
in interface ILcdView
public void addModel(ILcdModel aModel)
ILcdView
aModel
to be displayed in this ILcdView
.public boolean containsLayer(ILcdLayer aILcdLayer)
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.
containsLayer
in interface ILcdLayered
containsLayer
in interface ILcdTreeLayered
aILcdLayer
- the layer to check whether it is in the flat list representationtrue
when the flat list representation contains the given layer,
false
otherwisepublic void removeAllLayers()
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.
removeAllLayers
in interface ILcdLayered
removeAllLayers
in interface ILcdTreeLayered
public void removeLayer(ILcdLayer aILcdLayer)
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
removeLayer
in interface ILcdLayered
removeLayer
in interface ILcdTreeLayered
aILcdLayer
- the layer to remove. If the layer is not in the flat list, this method has no effect.public void moveLayerAt(int i, ILcdLayer aILcdLayer) throws NoSuchElementException, ArrayIndexOutOfBoundsException
ILcdLayered
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.
moveLayerAt
in interface ILcdLayered
i
- the index of the position where to move the layer.aILcdLayer
- the layer to move.NoSuchElementException
- if aLayer
is not in this ILcdLayered
.ArrayIndexOutOfBoundsException
- if aIndex
is not an index of one of
the layers of this ILcdLayered
.public int indexOf(ILcdLayer aILcdLayer) throws NoSuchElementException
ILcdTreeLayered
Returns the index of the given layer aLayer
in the flat list representation of
the hierarchical structure.
indexOf
in interface ILcdLayered
indexOf
in interface ILcdTreeLayered
aILcdLayer
- the layer whose index to returnaLayer
in the flat list representationNoSuchElementException
- if aLayer
is not in the flat listpublic ILspLayer layerOf(ILcdModel aILcdModel) throws NoSuchElementException
ILcdTreeLayered
ILcdLayer
of the flat list that contains the given
ILcdModel
.layerOf
in interface ILcdLayered
layerOf
in interface ILcdTreeLayered
aILcdModel
- the model to check for in the flat listILcdLayer
of the flat list that contains the given
ILcdModel
.NoSuchElementException
- if there is no layer containing the given modelpublic ILspLayer getLayer(int i) throws ArrayIndexOutOfBoundsException
ILspView
getLayer
in interface ILcdLayered
getLayer
in interface ILcdTreeLayered
getLayer
in interface ILspView
i
- the index of the requested layerArrayIndexOutOfBoundsException
- if the given index is invalidpublic Enumeration layersBackwards()
ILcdTreeLayered
Returns an Enumeration
of all the ILcdLayer
s 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.
layersBackwards
in interface ILcdLayered
layersBackwards
in interface ILcdTreeLayered
Enumeration
of all the ILcdLayer
s currently in the flat
list, starting from the top layer to the bottom layer. Does not include the root node.public Enumeration layers()
ILcdTreeLayered
Returns an Enumeration
of all the ILcdLayer
s 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.
layers
in interface ILcdLayered
layers
in interface ILcdTreeLayered
Enumeration
of all the ILcdLayer
s currently in the flat
list, starting from the bottom layer to the top layer. Does not include the root node.public int layerCount()
ILcdTreeLayered
Returns the number of layers in the flat list representation of the hierarchical layer structure. This does not include the root node.
layerCount
in interface ILcdLayered
layerCount
in interface ILcdTreeLayered
public void removeLayeredListener(ILcdLayeredListener aILcdLayeredListener)
ILcdTreeLayered
ILcdLayeredListener
from receiving layered events for the
flat list.removeLayeredListener
in interface ILcdLayered
removeLayeredListener
in interface ILcdTreeLayered
aILcdLayeredListener
- the listener that will no longer be notified of changes in the flat
list.ILcdTreeLayered.addLayeredListener(com.luciad.view.ILcdLayeredListener)
public void addLayeredListener(ILcdLayeredListener aILcdLayeredListener)
ILcdTreeLayered
ILcdLayeredListener
to be notified when layers are added,
removed or moved in the flat list.addLayeredListener
in interface ILcdLayered
addLayeredListener
in interface ILcdTreeLayered
aILcdLayeredListener
- the listener that from now on will be notified of all changes to the
flat list.ILcdTreeLayered.removeLayeredListener(com.luciad.view.ILcdLayeredListener)
public ILcdLayerTreeNode getRootNode()
ILcdTreeLayered
Returns the root node of the tree structure.
getRootNode
in interface ILcdTreeLayered
public void addViewInvalidationListener(ILcdViewInvalidationListener aInvalidationListener)
ILspView
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)addViewInvalidationListener
in interface ILspView
aInvalidationListener
- the listener to notify when the view has been invalidatedILspView.removeViewInvalidationListener(com.luciad.view.ILcdViewInvalidationListener)
public void removeViewInvalidationListener(ILcdViewInvalidationListener aInvalidationListener)
ILspView
ILcdViewInvalidationListener
so that it is no longer informed
of invalidation events for this view.removeViewInvalidationListener
in interface ILspView
aInvalidationListener
- the listener to no longer notify when the view has been invalidatedILspView.addViewInvalidationListener(com.luciad.view.ILcdViewInvalidationListener)
public void addViewListener(ILspViewListener aViewListener)
ILspView
ILspViewListener
to the view
to be notified of initialization, disposal or render events.addViewListener
in interface ILspView
aViewListener
- the view listener to addpublic void removeViewListener(ILspViewListener aViewListener)
ILspView
ILspViewListener
from the view.removeViewListener
in interface ILspView
aViewListener
- the view listener to remove.public Color getBackground()
ILspView
getBackground
in interface ILspView
public void setBackground(Color aColor)
ILspView
setBackground
in interface ILspView
aColor
- the color to be used for clearing the backgroundpublic ILcdGLExternalDrawable getGLDrawable()
ILspView
null
.getGLDrawable
in interface ILspView
public int getWidth()
ILspView
public int getHeight()
ILspView
public void addPropertyChangeListener(PropertyChangeListener listener)
ILspView
PropertyChangeListener
to be notified when this view's properties change.addPropertyChangeListener
in interface ILcdPropertyChangeSource
addPropertyChangeListener
in interface ILspView
listener
- the listener to notify of changes of this view's propertiesALcdWeakPropertyChangeListener
,
ILcdPropertyChangeSource.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void removePropertyChangeListener(PropertyChangeListener listener)
ILspView
PropertyChangeListener
from receiving property change events for this view.removePropertyChangeListener
in interface ILcdPropertyChangeSource
removePropertyChangeListener
in interface ILspView
listener
- the listener that should no longer be notified of changes of
this views propertiesILcdPropertyChangeSource.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void invalidate(boolean aRepaint, Object aSource, String aReason)
ILcdView
ILcdView
.invalidate
in interface ILcdView
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.public boolean isAutoUpdate()
ILspView
isAutoUpdate
in interface ILcdView
isAutoUpdate
in interface ILspView
ILcdView.setAutoUpdate(boolean)
public void setAutoUpdate(boolean b)
ILspView
setAutoUpdate
in interface ILcdView
setAutoUpdate
in interface ILspView
b
- true if the view should update automatically; false if it will be repainted manuallyILcdView.isAutoUpdate()
public void destroy()
public ILspPaintingOrder getPaintingOrder()
ILspView
getPaintingOrder
in interface ILspView
public void setPaintingOrder(ILspPaintingOrder aPaintingOrder)
ILspView
setPaintingOrder
in interface ILspView
aPaintingOrder
- the painting order objectpublic void setAltitudeExaggerationFactor(double aVerticalExaggerationFactor)
ILspView
0
). It is possible to disable terrain elevation using
ILspTerrainSupport#setElevationEnabled
.
A factor of 1.0
results in no exaggeration.setAltitudeExaggerationFactor
in interface ILspView
aVerticalExaggerationFactor
- the vertical exaggeration factorILspView.getAltitudeExaggerationFactor()
public double getAltitudeExaggerationFactor()
ILspView
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.getAltitudeExaggerationFactor
in interface ILspView
public ILspLabelPlacer getLabelPlacer()
ILspView
getLabelPlacer
in interface ILspView
null
.public void setLabelPlacer(ILspLabelPlacer aPlacer)
ILspView
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.
setLabelPlacer
in interface ILspView
aPlacer
- the new placer, never null
.TLspLabelPlacer
public TLspOpenGLProfile getRequiredOpenGLProfile()
ILspView
TLspOpenGLProfile.LIGHTSPEED_MINIMUM
.getRequiredOpenGLProfile
in interface ILspView
TLspGLProfile
public TLspViewServices getServices()
ILspView
ILspView.destroy()
.getServices
in interface ILspView
public ILcdPaintExceptionHandler getPaintExceptionHandler()
ILspView
getPaintExceptionHandler
in interface ILspView
public ILspView.ViewType getViewType()
ILspView
ILspView.getViewXYZWorldTransformation()
:
TLspViewXYZWorldTransformation2D
maps
to ILspView.ViewType.VIEW_2D
TLspViewXYZWorldTransformation3D
maps
to ILspView.ViewType.VIEW_3D
getViewType()
is equivalent to an instanceof
test on the ALspViewXYZWorldTransformation
.getViewType
in interface ILspView
public void display()
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.public void setSize(int aWidth, int aHeight)
public void handleAWTEvent(AWTEvent aEvent)
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.public void invokeLater(Runnable aRunnable)
invokeLater
in interface ILspView
aRunnable
- the runnable to be executed