public interface WorldWindow extends AVList
Modifier and Type | Method and Description |
---|---|
void |
addPositionListener(PositionListener listener)
Adds a position listener to this WorldWindow.
|
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.
|
GLContext |
getContext()
Returns the
GLContext associated with this WorldWindow . |
Position |
getCurrentPosition()
Returns the current latitude, longitude and altitude of the current cursor position, or
null if the
cursor is not on the globe. |
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.
|
View |
getView()
Returns this window's current view.
|
boolean |
isEnableGpuCacheReinitialization()
Indicates whether the GPU resource cache is reinitialized when this window is reinitialized.
|
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.
|
void |
removePositionListener(PositionListener listener)
Removes the specified position listener associated with this WorldWindow.
|
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.
|
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.
|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
void addPositionListener(PositionListener listener)
listener
- The position listener to add.void addRenderingExceptionListener(RenderingExceptionListener listener)
listener
- the The exception listener to add.void addRenderingListener(RenderingListener listener)
listener
- The rendering listener to add to those notified of rendering events by this WorldWindow.void addSelectListener(SelectListener listener)
listener
- The select listener to add.GLContext getContext()
GLContext
associated with this WorldWindow
.GLContext
associated with this window. May be null.Position getCurrentPosition()
null
if the
cursor is not on the globe.null
if the cursor is not positioned on the globe.GpuResourceCache getGpuResourceCache()
InputHandler getInputHandler()
null
if no input handler is associated.Model getModel()
PickedObjectList getObjectsAtCurrentPosition()
null
if no objects are under the cursor.PickedObjectList getObjectsInSelectionBox()
null
if no objects are in the box.java.util.Collection<PerformanceStatistic> getPerFrameStatistics()
SceneController getSceneController()
null
if no scene controller is
associated.View getView()
boolean isEnableGpuCacheReinitialization()
true
if reinitialization is enabled, otherwise false
.void redraw()
void redrawNow()
void removePositionListener(PositionListener listener)
listener
- The listener to remove.void removeRenderingExceptionListener(RenderingExceptionListener listener)
listener
- The listener to remove.void removeRenderingListener(RenderingListener listener)
listener
- The rendering listener to remove.void removeSelectListener(SelectListener listener)
listener
- The select listener to remove.void setEnableGpuCacheReinitialization(boolean enableGpuCacheReinitialization)
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
.enableGpuCacheReinitialization
- true
to enable reinitialization, otherwise false
.void setInputHandler(InputHandler inputHandler)
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.void setModel(Model model)
null
is specified for the model, the current model, if
any, is disassociated with the window.model
- the model to display. May be null
.void setModelAndView(Model model, View view)
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.model
- the model to display. May benull
.view
- the view to use to display this window's model. May benull
.void setPerFrameStatisticsKeys(java.util.Set<java.lang.String> keys)
keys
- The statistics to activate.void setSceneController(SceneController sceneController)
View
, Model
and any desired per-frame statistics keys.sceneController
- the new scene controller.SceneController.setView(View)
,
SceneController.setModel(Model)
,
SceneController.setPerFrameStatisticsKeys(java.util.Set)
void setView(View view)
null
is specified for the view, the
current view, if any, is disassociated with the window.view
- the view to use to display this window's model. May be null.void shutdown()