Class WorldWindowGLCanvas

  • All Implemented Interfaces:
    com.jogamp.nativewindow.awt.AWTPrintLifecycle, com.jogamp.nativewindow.NativeSurfaceHolder, com.jogamp.nativewindow.OffscreenLayerOption, com.jogamp.nativewindow.ScalableSurface, com.jogamp.nativewindow.WindowClosingProtocol, com.jogamp.opengl.awt.AWTGLAutoDrawable, com.jogamp.opengl.awt.ComponentEvents, com.jogamp.opengl.GLAutoDrawable, com.jogamp.opengl.GLDrawable, com.jogamp.opengl.GLSharedContextSetter, AVList, WorldWindow, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible
    Direct Known Subclasses:
    GliderWorldWindow

    public class WorldWindowGLCanvas
    extends com.jogamp.opengl.awt.GLCanvas
    implements WorldWindow, java.beans.PropertyChangeListener
    WorldWindowGLCanvas is a heavyweight AWT component for displaying WorldWind Models (globe and layers). It's a self-contained component intended to serve as an application's WorldWindow. Construction options exist to specify a specific graphics device and to share graphics resources with another graphics device.

    Heavyweight AWT components such as instances of this class can be used in conjunction with lightweight Swing components. A discussion of doing so is in the Heavyweight and Lightweight Issues section of the "JOGL User's Guide". All that's typically necessary is to invoke the following methods of the indicated Swing classes: ToolTipManager.setLightWeightPopupEnabled(boolean), JPopupMenu.setLightWeightPopupEnabled(boolean) and JPopupMenu.setLightWeightPopupEnabled(boolean). These methods should be invoked within a static block within an application's main class.

    This class is capable of supporting stereo devices. To cause a stereo device to be selected and used, specify the Java VM property "gov.nasa.worldwind.stereo.mode=device" prior to creating an instance of this class. A stereo capable SceneController such as StereoSceneController must also be specified in the WorldWind Configuration. The default configuration specifies a stereo-capable controller. To prevent stereo from being used by subsequently opened WorldWindowGLCanvases, set the property to a an empty string, "". If a stereo device cannot be selected and used, this falls back to a non-stereo device that supports WorldWind's minimum requirements.

    Under certain conditions, JOGL replaces the GLContext associated with instances of this class. This then necessitates that all resources such as textures that have been stored on the graphic devices must be regenerated for the new context. WorldWind does this automatically by clearing the associated GpuResourceCache. Objects subsequently rendered automatically re-create those resources. If an application creates its own graphics resources, including textures, vertex buffer objects and display lists, it must store them in the GpuResourceCache associated with the current DrawContext so that they are automatically cleared, and be prepared to re-create them if they do not exist in the DrawContext's current GpuResourceCache when needed. Examples of doing this can be found by searching for usages of the method GpuResourceCache.get(Object) and GpuResourceCache.getTexture(Object).

    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.awt.Canvas

        java.awt.Canvas.AccessibleAWTCanvas
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
      • Nested classes/interfaces inherited from interface com.jogamp.nativewindow.awt.AWTPrintLifecycle

        com.jogamp.nativewindow.awt.AWTPrintLifecycle.Context
      • Nested classes/interfaces inherited from interface com.jogamp.nativewindow.WindowClosingProtocol

        com.jogamp.nativewindow.WindowClosingProtocol.WindowClosingMode
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected WorldWindowGLDrawable wwd
      The drawable to which WorldWindow methods are delegated.
      • Fields inherited from class java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface com.jogamp.nativewindow.awt.AWTPrintLifecycle

        DEFAULT_PRINT_TILE_SIZE
      • Fields inherited from interface com.jogamp.opengl.GLAutoDrawable

        SCREEN_CHANGE_ACTION_ENABLED
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
      • Fields inherited from interface com.jogamp.nativewindow.ScalableSurface

        AUTOMAX_PIXELSCALE, IDENTITY_PIXELSCALE
    • Constructor Summary

      Constructors 
      Constructor Description
      WorldWindowGLCanvas()
      Constructs a new WorldWindowGLCanvas on the default graphics device.
      WorldWindowGLCanvas​(WorldWindow shareWith)
      Constructs a new WorldWindowGLCanvas on the default graphics device and shares graphics resources with another WorldWindow.
      WorldWindowGLCanvas​(WorldWindow shareWith, java.awt.GraphicsDevice device)
      Constructs a new WorldWindowGLCanvas on a specified graphics device and shares graphics resources with another WorldWindow.
      WorldWindowGLCanvas​(WorldWindow shareWith, java.awt.GraphicsDevice device, com.jogamp.opengl.GLCapabilities capabilities, com.jogamp.opengl.GLCapabilitiesChooser chooser)
      Constructs a new WorldWindowGLCanvas on a specified device with the specified capabilities and shares graphics resources with another WorldWindow.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPositionListener​(PositionListener listener)
      Adds a position listener to this WorldWindow.
      void addPropertyChangeListener​(java.beans.PropertyChangeListener listener)
      Adds the specified all-property property change listener that will be called for all list changes.
      void addPropertyChangeListener​(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
      Adds a property change listener for the specified key.
      void addRenderingExceptionListener​(RenderingExceptionListener listener)
      Adds an exception listener to this WorldWindow.
      void addRenderingListener​(RenderingListener listener)
      Adds a rendering listener to this WorldWindow.
      void addSelectListener​(SelectListener listener)
      Adds a select listener to this WorldWindow.
      AVList clearList()  
      AVList copy()
      Returns a shallow copy of this AVList instance: the keys and values themselves are not cloned.
      protected void createDefaultInputHandler()
      Constructs and attaches the InputHandler for this WorldWindow.
      protected void createView()
      Constructs and attaches the View for this WorldWindow.
      void firePropertyChange​(java.beans.PropertyChangeEvent propertyChangeEvent)
      Calls all registered property change listeners with the specified property change event.
      void firePropertyChange​(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
      Calls all property change listeners associated with the specified key.
      Position getCurrentPosition()
      Returns the current latitude, longitude and altitude of the current cursor position, or null if the cursor is not on the globe.
      java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.Object>> getEntries()  
      GpuResourceCache getGpuResourceCache()
      Returns the GPU Resource used by this WorldWindow.
      InputHandler getInputHandler()
      Returns the input handler associated with this instance.
      Model getModel()
      Returns the window's current model.
      PickedObjectList getObjectsAtCurrentPosition()
      Returns the WorldWind objects at the current cursor position.
      PickedObjectList getObjectsInSelectionBox()
      Returns the WorldWind objects intersecting the current selection box.
      java.util.Collection<PerformanceStatistic> getPerFrameStatistics()
      Returns the active per-frame performance statistics such as number of tiles drawn in the most recent frame.
      SceneController getSceneController()
      Returns the scene controller associated with this instance.
      java.lang.String getStringValue​(java.lang.String key)
      Returns the value for a specified key.
      java.lang.Object getValue​(java.lang.String key)
      Returns the value for a specified key.
      java.util.Collection<java.lang.Object> getValues()  
      View getView()
      Returns this window's current view.
      boolean hasKey​(java.lang.String key)
      Indicates whether a key is in the collection.
      boolean isEnableGpuCacheReinitialization()
      Indicates whether the GPU resource cache is reinitialized when this window is reinitialized.
      void propertyChange​(java.beans.PropertyChangeEvent evt)  
      void redraw()
      Causes a repaint event to be enqueued with the window system for this WorldWindow.
      void redrawNow()
      Immediately repaints the WorldWindow without waiting for a window system repaint event.
      java.lang.Object removeKey​(java.lang.String key)
      Removes a specified key from the collection if the key exists, otherwise returns without affecting the collection.
      void removePositionListener​(PositionListener listener)
      Removes the specified position listener associated with this WorldWindow.
      void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)
      Removes the specified all-property property change listener.
      void removePropertyChangeListener​(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
      Removes a property change listener associated with the specified key.
      void removeRenderingExceptionListener​(RenderingExceptionListener listener)
      Removes the specified rendering exception listener associated with this WorldWindow.
      void removeRenderingListener​(RenderingListener listener)
      Removes a specified rendering listener associated with this WorldWindow.
      void removeSelectListener​(SelectListener listener)
      Removes the specified select listener associated with this WorldWindow.
      void setEnableGpuCacheReinitialization​(boolean enableGpuCacheReinitialization)
      Specifies whether to reinitialize the GPU resource cache when this window is reinitialized.
      void setInputHandler​(InputHandler inputHandler)
      Sets the input handler to use for this instance.
      void setModel​(Model model)
      Sets the model to display in this window.
      void setModelAndView​(Model model, View view)
      Sets the model to display in this window and the view used to display it.
      void setPerFrameStatisticsKeys​(java.util.Set<java.lang.String> keys)
      Activates the per-frame performance statistic specified.
      void setSceneController​(SceneController sceneController)
      Specifies a new scene controller for the window.
      java.lang.Object setValue​(java.lang.String key, java.lang.Object value)
      Adds a key/value pair to the list.
      AVList setValues​(AVList avList)
      Adds the contents of another attribute-value list to the list.
      void setView​(View view)
      Sets the view to use when displaying this window's model.
      void shutdown()
      Causes resources used by the WorldWindow to be freed.
      • Methods inherited from class com.jogamp.opengl.awt.GLCanvas

        addGLEventListener, addGLEventListener, addNotify, areAllGLEventListenerInitialized, createContext, destroy, destroyImpl, display, disposeGLEventListener, flushGLRunnables, getAnimator, getAutoSwapBufferMode, getChosenGLCapabilities, getContext, getContextCreationFlags, getCurrentSurfaceScale, getDefaultCloseOperation, getDelegatedDrawable, getExclusiveContextThread, getFactory, getGL, getGLEventListener, getGLEventListenerCount, getGLEventListenerInitState, getGLProfile, getGraphicsConfiguration, getHandle, getMaximumSurfaceScale, getMinimumSurfaceScale, getNativeSurface, getRequestedGLCapabilities, getRequestedSurfaceScale, getShallUseOffscreenLayer, getSurfaceHeight, getSurfaceWidth, getThreadName, getUpstreamLock, getUpstreamWidget, invoke, invoke, isGLOriented, isOffscreenLayerSurfaceEnabled, isRealized, isThreadGLCapable, main, paint, print, releasePrint, removeGLEventListener, removeNotify, reshape, setAnimator, setAutoSwapBufferMode, setContext, setContextCreationFlags, setDefaultCloseOperation, setExclusiveContextThread, setGL, setGLEventListenerInitState, setRealized, setShallUseOffscreenLayer, setSharedAutoDrawable, setSharedContext, setSurfaceScale, setupPrint, swapBuffers, toString, update
      • Methods inherited from class java.awt.Canvas

        createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
      • Methods inherited from class java.awt.Component

        add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, applyComponentOrientation, areFocusTraversalKeysSet, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, doLayout, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, hasFocus, imageUpdate, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, list, list, list, list, list, paintAll, paramString, prepareImage, prepareImage, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.jogamp.opengl.awt.AWTGLAutoDrawable

        repaint, setSize
      • Methods inherited from interface com.jogamp.opengl.awt.ComponentEvents

        addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener
    • Constructor Detail

      • WorldWindowGLCanvas

        public WorldWindowGLCanvas()
        Constructs a new WorldWindowGLCanvas on the default graphics device.
      • WorldWindowGLCanvas

        public WorldWindowGLCanvas​(WorldWindow shareWith)
        Constructs a new WorldWindowGLCanvas on the default graphics device and shares graphics resources with another WorldWindow.
        Parameters:
        shareWith - a WorldWindow with which to share graphics resources.
        See Also:
        GLCanvas(GLCapabilitiesImmutable, GLCapabilitiesChooser, GraphicsDevice)
      • WorldWindowGLCanvas

        public WorldWindowGLCanvas​(WorldWindow shareWith,
                                   java.awt.GraphicsDevice device)
        Constructs a new WorldWindowGLCanvas on a specified graphics device and shares graphics resources with another WorldWindow.
        Parameters:
        shareWith - a WorldWindow with which to share graphics resources.
        device - the GraphicsDevice on which to create the window. May be null, in which case the default screen device of the local GraphicsEnvironment is used.
        See Also:
        GLCanvas(GLCapabilitiesImmutable, GLCapabilitiesChooser, GraphicsDevice)
      • WorldWindowGLCanvas

        public WorldWindowGLCanvas​(WorldWindow shareWith,
                                   java.awt.GraphicsDevice device,
                                   com.jogamp.opengl.GLCapabilities capabilities,
                                   com.jogamp.opengl.GLCapabilitiesChooser chooser)
        Constructs a new WorldWindowGLCanvas on a specified device with the specified capabilities and shares graphics resources with another WorldWindow.
        Parameters:
        shareWith - a WorldWindow with which to share graphics resources.
        device - the GraphicsDevice on which to create the window. May be null, in which case the default screen device of the local GraphicsEnvironment is used.
        capabilities - a capabilities object indicating the OpenGL rendering context's capabilities. May be null, in which case a default set of capabilities is used.
        chooser - a chooser object that customizes the specified capabilities. May be null, in which case a default chooser is used.
        See Also:
        GLCanvas(GLCapabilitiesImmutable, GLCapabilitiesChooser, GraphicsDevice)
    • Method Detail

      • propertyChange

        public void propertyChange​(java.beans.PropertyChangeEvent evt)
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
      • shutdown

        public void shutdown()
        Description copied from interface: WorldWindow
        Causes resources used by the WorldWindow to be freed. The WorldWindow cannot be used once this method is called.
        Specified by:
        shutdown in interface WorldWindow
      • isEnableGpuCacheReinitialization

        public boolean isEnableGpuCacheReinitialization()
        Description copied from interface: WorldWindow
        Indicates whether the GPU resource cache is reinitialized when this window is reinitialized.
        Specified by:
        isEnableGpuCacheReinitialization in interface WorldWindow
        Returns:
        true if reinitialization is enabled, otherwise false.
      • setEnableGpuCacheReinitialization

        public void setEnableGpuCacheReinitialization​(boolean enableGpuCacheReinitialization)
        Description copied from interface: WorldWindow
        Specifies whether to reinitialize the GPU resource cache when this window is reinitialized. A value of true indicates that the GPU resource cache this window is using should be cleared when its init() method is called, typically when re-parented. Set this to false when this window is sharing context with other windows and is likely to be re-parented. It prevents the flashing caused by clearing and re-populating the GPU resource cache during re-parenting. The default value is true.
        Specified by:
        setEnableGpuCacheReinitialization in interface WorldWindow
        Parameters:
        enableGpuCacheReinitialization - true to enable reinitialization, otherwise false.
      • createView

        protected void createView()
        Constructs and attaches the View for this WorldWindow.
      • createDefaultInputHandler

        protected void createDefaultInputHandler()
        Constructs and attaches the InputHandler for this WorldWindow.
      • getInputHandler

        public InputHandler getInputHandler()
        Description copied from interface: WorldWindow
        Returns the input handler associated with this instance.
        Specified by:
        getInputHandler in interface WorldWindow
        Returns:
        The input handler associated with this instance, or null if no input handler is associated.
      • setInputHandler

        public void setInputHandler​(InputHandler inputHandler)
        Description copied from interface: WorldWindow
        Sets the input handler to use for this instance.
        Specified by:
        setInputHandler in interface WorldWindow
        Parameters:
        inputHandler - The input handler to use for this WorldWindow. May by null if null is specified, the current input handler, if any, is disassociated with the WorldWindow.
      • getSceneController

        public SceneController getSceneController()
        Description copied from interface: WorldWindow
        Returns the scene controller associated with this instance.
        Specified by:
        getSceneController in interface WorldWindow
        Returns:
        The scene controller associated with the instance, or null if no scene controller is associated.
      • getGpuResourceCache

        public GpuResourceCache getGpuResourceCache()
        Description copied from interface: WorldWindow
        Returns the GPU Resource used by this WorldWindow. This method is for internal use only.

        Note: Applications do not need to interact with the GPU resource cache. It is self managed. Modifying it in any way will cause significant problems such as excessive memory usage or application crashes. The only reason to use the GPU resource cache is to request management of GPU resources within implementations of shapes or layers. And then access should be only through the draw context only.

        Specified by:
        getGpuResourceCache in interface WorldWindow
        Returns:
        The GPU Resource cache used by this WorldWindow.
      • redraw

        public void redraw()
        Description copied from interface: WorldWindow
        Causes a repaint event to be enqueued with the window system for this WorldWindow. The repaint will occur at the window system's discretion, within the window system toolkit's event loop, and on the thread of that loop. This is the preferred method for requesting a repaint of the WorldWindow.
        Specified by:
        redraw in interface WorldWindow
      • redrawNow

        public void redrawNow()
        Description copied from interface: WorldWindow
        Immediately repaints the WorldWindow without waiting for a window system repaint event. This is not the preferred way to cause a repaint, but is provided for the rare cases that require it.
        Specified by:
        redrawNow in interface WorldWindow
      • setModel

        public void setModel​(Model model)
        Description copied from interface: WorldWindow
        Sets the model to display in this window. If null is specified for the model, the current model, if any, is disassociated with the window.
        Specified by:
        setModel in interface WorldWindow
        Parameters:
        model - the model to display. May be null.
      • getModel

        public Model getModel()
        Description copied from interface: WorldWindow
        Returns the window's current model.
        Specified by:
        getModel in interface WorldWindow
        Returns:
        the window's current model.
      • setView

        public void setView​(View view)
        Description copied from interface: WorldWindow
        Sets the view to use when displaying this window's model. If null is specified for the view, the current view, if any, is disassociated with the window.
        Specified by:
        setView in interface WorldWindow
        Parameters:
        view - the view to use to display this window's model. May be null.
      • getView

        public View getView()
        Description copied from interface: WorldWindow
        Returns this window's current view.
        Specified by:
        getView in interface WorldWindow
        Returns:
        the window's current view.
      • setModelAndView

        public void setModelAndView​(Model model,
                                    View view)
        Description copied from interface: WorldWindow
        Sets the model to display in this window and the view used to display it. If null is specified for the model, the current model, if any, is disassociated with the window. If null is specified for the view, the current view, if any, is disassociated with the window.
        Specified by:
        setModelAndView in interface WorldWindow
        Parameters:
        model - the model to display. May benull.
        view - the view to use to display this window's model. May benull.
      • addRenderingListener

        public void addRenderingListener​(RenderingListener listener)
        Description copied from interface: WorldWindow
        Adds a rendering listener to this WorldWindow. Rendering listeners are called at key point during WorldWind drawing and provide applications the ability to participate or monitor rendering.
        Specified by:
        addRenderingListener in interface WorldWindow
        Parameters:
        listener - The rendering listener to add to those notified of rendering events by this WorldWindow.
      • removeRenderingListener

        public void removeRenderingListener​(RenderingListener listener)
        Description copied from interface: WorldWindow
        Removes a specified rendering listener associated with this WorldWindow.
        Specified by:
        removeRenderingListener in interface WorldWindow
        Parameters:
        listener - The rendering listener to remove.
      • addSelectListener

        public void addSelectListener​(SelectListener listener)
        Description copied from interface: WorldWindow
        Adds a select listener to this WorldWindow. Select listeners are called when a selection is made by the user in the WorldWindow. A selection is any operation that identifies a visible item.
        Specified by:
        addSelectListener in interface WorldWindow
        Parameters:
        listener - The select listener to add.
      • removeSelectListener

        public void removeSelectListener​(SelectListener listener)
        Description copied from interface: WorldWindow
        Removes the specified select listener associated with this WorldWindow.
        Specified by:
        removeSelectListener in interface WorldWindow
        Parameters:
        listener - The select listener to remove.
      • addPositionListener

        public void addPositionListener​(PositionListener listener)
        Description copied from interface: WorldWindow
        Adds a position listener to this WorldWindow. Position listeners are called when the cursor's position changes. They identify the position of the cursor on the globe, or that the cursor is not on the globe.
        Specified by:
        addPositionListener in interface WorldWindow
        Parameters:
        listener - The position listener to add.
      • removePositionListener

        public void removePositionListener​(PositionListener listener)
        Description copied from interface: WorldWindow
        Removes the specified position listener associated with this WorldWindow.
        Specified by:
        removePositionListener in interface WorldWindow
        Parameters:
        listener - The listener to remove.
      • addRenderingExceptionListener

        public void addRenderingExceptionListener​(RenderingExceptionListener listener)
        Description copied from interface: WorldWindow
        Adds an exception listener to this WorldWindow. Exception listeners are called when an exception or other critical event occurs during drawable initialization or during rendering.
        Specified by:
        addRenderingExceptionListener in interface WorldWindow
        Parameters:
        listener - the The exception listener to add.
      • getCurrentPosition

        public Position getCurrentPosition()
        Description copied from interface: WorldWindow
        Returns the current latitude, longitude and altitude of the current cursor position, or null if the cursor is not on the globe.
        Specified by:
        getCurrentPosition in interface WorldWindow
        Returns:
        The current position of the cursor, or null if the cursor is not positioned on the globe.
      • getObjectsAtCurrentPosition

        public PickedObjectList getObjectsAtCurrentPosition()
        Description copied from interface: WorldWindow
        Returns the WorldWind objects at the current cursor position. The list of objects under the cursor is determined each time the WorldWindow is repainted. This method returns the list of objects determined when the most recent repaint was performed.
        Specified by:
        getObjectsAtCurrentPosition in interface WorldWindow
        Returns:
        The list of objects at the cursor position, or null if no objects are under the cursor.
      • getObjectsInSelectionBox

        public PickedObjectList getObjectsInSelectionBox()
        Description copied from interface: WorldWindow
        Returns the WorldWind objects intersecting the current selection box. The list of objects in the selection box is determined each time the WorldWindow is repainted. This method returns the list of objects determined when the most recent repaint was performed.
        Specified by:
        getObjectsInSelectionBox in interface WorldWindow
        Returns:
        The list of objects intersecting the selection box, or null if no objects are in the box.
      • setValue

        public java.lang.Object setValue​(java.lang.String key,
                                         java.lang.Object value)
        Description copied from interface: AVList
        Adds a key/value pair to the list. Replaces an existing key/value pair if the list already contains the key.
        Specified by:
        setValue in interface AVList
        Parameters:
        key - the attribute name. May not be null.
        value - the attribute value. May be null, in which case any existing value for the key is removed from the collection.
        Returns:
        previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.
      • setValues

        public AVList setValues​(AVList avList)
        Description copied from interface: AVList
        Adds the contents of another attribute-value list to the list. Replaces an existing key/value pair if the list already contains the key.
        Specified by:
        setValues in interface AVList
        Parameters:
        avList - the list to copy. May not be null.
        Returns:
        this, a self reference.
      • getValue

        public java.lang.Object getValue​(java.lang.String key)
        Description copied from interface: AVList
        Returns the value for a specified key.
        Specified by:
        getValue in interface AVList
        Parameters:
        key - the attribute name. May not be null.
        Returns:
        the attribute value if one exists in the collection, otherwise null.
      • getValues

        public java.util.Collection<java.lang.Object> getValues()
        Specified by:
        getValues in interface AVList
      • getEntries

        public java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.Object>> getEntries()
        Specified by:
        getEntries in interface AVList
      • getStringValue

        public java.lang.String getStringValue​(java.lang.String key)
        Description copied from interface: AVList
        Returns the value for a specified key. The value must be a String.
        Specified by:
        getStringValue in interface AVList
        Parameters:
        key - the attribute name. May not be null.
        Returns:
        the attribute value if one exists in the collection, otherwise null.
      • hasKey

        public boolean hasKey​(java.lang.String key)
        Description copied from interface: AVList
        Indicates whether a key is in the collection.
        Specified by:
        hasKey in interface AVList
        Parameters:
        key - the attribute name. May not be null.
        Returns:
        true if the key exists in the collection, otherwise false.
      • removeKey

        public java.lang.Object removeKey​(java.lang.String key)
        Description copied from interface: AVList
        Removes a specified key from the collection if the key exists, otherwise returns without affecting the collection.
        Specified by:
        removeKey in interface AVList
        Parameters:
        key - the attribute name. May not be null.
        Returns:
        previous value associated with specified key, or null if there was no mapping for key.
      • addPropertyChangeListener

        public void addPropertyChangeListener​(java.beans.PropertyChangeListener listener)
        Description copied from interface: AVList
        Adds the specified all-property property change listener that will be called for all list changes.
        Specified by:
        addPropertyChangeListener in interface AVList
        Specified by:
        addPropertyChangeListener in interface com.jogamp.opengl.awt.ComponentEvents
        Overrides:
        addPropertyChangeListener in class java.awt.Component
        Parameters:
        listener - the listener to call.
        See Also:
        PropertyChangeSupport
      • addPropertyChangeListener

        public void addPropertyChangeListener​(java.lang.String propertyName,
                                              java.beans.PropertyChangeListener listener)
        Description copied from interface: AVList
        Adds a property change listener for the specified key.
        Specified by:
        addPropertyChangeListener in interface AVList
        Specified by:
        addPropertyChangeListener in interface com.jogamp.opengl.awt.ComponentEvents
        Overrides:
        addPropertyChangeListener in class java.awt.Component
        Parameters:
        propertyName - the key to associate the listener with.
        listener - the listener to associate with the key.
        See Also:
        PropertyChangeSupport
      • removePropertyChangeListener

        public void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)
        Description copied from interface: AVList
        Removes the specified all-property property change listener.
        Specified by:
        removePropertyChangeListener in interface AVList
        Specified by:
        removePropertyChangeListener in interface com.jogamp.opengl.awt.ComponentEvents
        Overrides:
        removePropertyChangeListener in class java.awt.Component
        Parameters:
        listener - the listener to remove.
        See Also:
        PropertyChangeSupport
      • removePropertyChangeListener

        public void removePropertyChangeListener​(java.lang.String propertyName,
                                                 java.beans.PropertyChangeListener listener)
        Description copied from interface: AVList
        Removes a property change listener associated with the specified key.
        Specified by:
        removePropertyChangeListener in interface AVList
        Specified by:
        removePropertyChangeListener in interface com.jogamp.opengl.awt.ComponentEvents
        Overrides:
        removePropertyChangeListener in class java.awt.Component
        Parameters:
        propertyName - the key associated with the change listener.
        listener - the listener to remove.
        See Also:
        PropertyChangeSupport
      • firePropertyChange

        public void firePropertyChange​(java.lang.String propertyName,
                                       java.lang.Object oldValue,
                                       java.lang.Object newValue)
        Description copied from interface: AVList
        Calls all property change listeners associated with the specified key. No listeners are called if odValue and newValue are equal and non-null.
        Specified by:
        firePropertyChange in interface AVList
        Overrides:
        firePropertyChange in class java.awt.Component
        Parameters:
        propertyName - the key
        oldValue - the value associated with the key before the even causing the firing.
        newValue - the new value associated with the key.
        See Also:
        PropertyChangeSupport
      • firePropertyChange

        public void firePropertyChange​(java.beans.PropertyChangeEvent propertyChangeEvent)
        Description copied from interface: AVList
        Calls all registered property change listeners with the specified property change event.
        Specified by:
        firePropertyChange in interface AVList
        Parameters:
        propertyChangeEvent - the event
        See Also:
        PropertyChangeSupport
      • copy

        public AVList copy()
        Description copied from interface: AVList
        Returns a shallow copy of this AVList instance: the keys and values themselves are not cloned.
        Specified by:
        copy in interface AVList
        Returns:
        a shallow copy of this AVList.
      • setPerFrameStatisticsKeys

        public void setPerFrameStatisticsKeys​(java.util.Set<java.lang.String> keys)
        Description copied from interface: WorldWindow
        Activates the per-frame performance statistic specified. Per-frame statistics measure values within a single frame of rendering, such as number of tiles drawn to produce the frame.
        Specified by:
        setPerFrameStatisticsKeys in interface WorldWindow
        Parameters:
        keys - The statistics to activate.
      • getPerFrameStatistics

        public java.util.Collection<PerformanceStatistic> getPerFrameStatistics()
        Description copied from interface: WorldWindow
        Returns the active per-frame performance statistics such as number of tiles drawn in the most recent frame.
        Specified by:
        getPerFrameStatistics in interface WorldWindow
        Returns:
        The keys and values of the active per-frame statistics.