NASA World Wind

gov.nasa.worldwind
Interface WorldWindow

All Superinterfaces:
AVList
All Known Subinterfaces:
WorldWindowGLDrawable
All Known Implementing Classes:
WorldWindowGLAutoDrawable, WorldWindowGLCanvas, WorldWindowGLJPanel, WorldWindowImpl

public interface WorldWindow
extends AVList

The top-level interface common to all toolkit-specific World Wind windows.


Method Summary
 void addPositionListener(PositionListener listener)
          Adds a position listener to this world window.
 void addRenderingListener(RenderingListener listener)
          Adds a rendering listener to this world window.
 void addSelectListener(SelectListener listener)
          Adds a select listener to this world window.
 Position getCurrentPosition()
          Returns the current latitude, longitude and altitude of the current cursor position, or null if the cursor is not on the globe.
 InputHandler getInputHandler()
          Returns the input handler associated with this instance.
 Model getModel()
          Returns the window's current model.
 PickedObjectList getObjectsAtCurrentPosition()
          Returns the World Wind ojbects at the current cursor position.
 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 assocciated with this instance.
 TextureCache getTextureCache()
          Returns the texture cache used by this World Window.?
 View getView()
          Returns this window's current view.
 void redraw()
          Causes a repaint event to be enqued with the window system for this world window.
 void redrawNow()
          Immediately repaints the world window without waiting for a window system repaint event.
 void removePositionListener(PositionListener listener)
          Removes the specified position listener associated with this world window.
 void removeRenderingListener(RenderingListener listener)
          Removes a specified rendering listener associated with this world window.
 void removeSelectListener(SelectListener listener)
          Removes the specified select listener associated with this world window.
 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(Set<String> keys)
          Activates the per-frame performance statistic specified.
 void setView(View view)
          Sets the view to use when displaying this window's model.
 void shutdown()
          Causes resources used by the World Window to be freed.
 
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 

Method Detail

addPositionListener

void addPositionListener(PositionListener listener)
Adds a position listener to this world window. 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.

Parameters:
listener - The position listener to add.

addRenderingListener

void addRenderingListener(RenderingListener listener)
Adds a rendering listener to this world window. Rendering listeners are called at key point during World Wind drawing and provide applications the ability to participate or monitor rendering.

Parameters:
listener - The rendering listener to add to those notified of rendering events by this world window.

addSelectListener

void addSelectListener(SelectListener listener)
Adds a select listener to this world window. Select listeners are called when a selection is made by the user in the world window. A selection is any operation that idetifies a visible item.

Parameters:
listener - The select listener to add.

getCurrentPosition

Position getCurrentPosition()
Returns the current latitude, longitude and altitude of the current cursor position, or null if the cursor is not on the globe.

Returns:
The current position of the cursor, or null if the cursor is not positioned on the globe.

getInputHandler

InputHandler getInputHandler()
Returns the input handler associated with this instance.

Returns:
The input handler associated with this instance, or null if no input handler is associated.

getModel

Model getModel()
Returns the window's current model.

Returns:
the window's current model.

getObjectsAtCurrentPosition

PickedObjectList getObjectsAtCurrentPosition()
Returns the World Wind ojbects at the current cursor position. The list of objects under the cursor is determined each time the world window is repainted. This method returns the list of objects determined when the most recent repaint was performed.

Returns:
The list of objects at the cursor position, or null if no objects are under the cursor.

getPerFrameStatistics

Collection<PerformanceStatistic> getPerFrameStatistics()
Returns the active per-frame performance statistics such as number of tiles drawn in the most recent frame.

Returns:
The keys and values of the active per-frame statistics.

getSceneController

SceneController getSceneController()
Returns the scene controller assocciated with this instance.

Returns:
The scene controller associated with the instance, or null if no scene controller is associated.

getTextureCache

TextureCache getTextureCache()
Returns the texture cache used by this World Window.?

Returns:
The texture cache used by the World Window.

getView

View getView()
Returns this window's current view.

Returns:
the window's current view.

redraw

void redraw()
Causes a repaint event to be enqued with the window system for this world window. 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 world window.


redrawNow

void redrawNow()
Immediately repaints the world window 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.


removePositionListener

void removePositionListener(PositionListener listener)
Removes the specified position listener associated with this world window.

Parameters:
listener - The listener to remove.

removeRenderingListener

void removeRenderingListener(RenderingListener listener)
Removes a specified rendering listener associated with this world window.

Parameters:
listener - The rendering listener to remove.

removeSelectListener

void removeSelectListener(SelectListener listener)
Removes the specified select listener associated with this world window.

Parameters:
listener - The select listener to remove.

setInputHandler

void setInputHandler(InputHandler inputHandler)
Sets the input handler to use for this instance.

Parameters:
inputHandler - The input handler to use for this world window. May by null if null is specified, the current input handler, if any, is disassociated with the world window.

setModel

void setModel(Model model)
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.

Parameters:
model - the model to display. May be null.

setModelAndView

void setModelAndView(Model model,
                     View view)
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.

Parameters:
model - the model to display. May benull.
view - the view to use to display this window's model. May benull.

setPerFrameStatisticsKeys

void setPerFrameStatisticsKeys(Set<String> keys)
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.

Parameters:
keys - The statistics to activate.

setView

void setView(View view)
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.

Parameters:
view - the view to use to display this window's model. May be null.

shutdown

void shutdown()
Causes resources used by the World Window to be freed. The World Window cannot be used once this method is called.


NASA World Wind