|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.WorldWindowImpl
public class WorldWindowImpl
An implementation class for the WorldWindow
interface. Classes implementing WorldWindow
can
subclass or aggreate this object to provide default WorldWindow
functionality.
Field Summary |
---|
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl |
---|
changeSupport |
Constructor Summary | |
---|---|
WorldWindowImpl()
|
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. |
protected void |
callPositionListeners(PositionEvent event)
|
protected void |
callRenderingListeners(RenderingEvent event)
|
protected void |
callSelectListeners(SelectEvent event)
|
Position |
getCurrentPosition()
Returns the current latitude, longitude and altitude of the current cursor position, or null if the
cursor is not on the globe. |
protected PickedObject |
getCurrentSelection()
|
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. |
protected void |
setTextureCache(TextureCache textureCache)
|
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 class gov.nasa.worldwind.WWObjectImpl |
---|
propertyChange |
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 |
Constructor Detail |
---|
public WorldWindowImpl()
Method Detail |
---|
public void addPositionListener(PositionListener listener)
WorldWindow
addPositionListener
in interface WorldWindow
listener
- The position listener to add.public void addRenderingListener(RenderingListener listener)
WorldWindow
addRenderingListener
in interface WorldWindow
listener
- The rendering listener to add to those notified of rendering events by this world window.public void addSelectListener(SelectListener listener)
WorldWindow
addSelectListener
in interface WorldWindow
listener
- The select listener to add.protected void callPositionListeners(PositionEvent event)
protected void callRenderingListeners(RenderingEvent event)
protected void callSelectListeners(SelectEvent event)
public Position getCurrentPosition()
WorldWindow
null
if the
cursor is not on the globe.
getCurrentPosition
in interface WorldWindow
null
if the cursor is not positioned on the globe.protected PickedObject getCurrentSelection()
public InputHandler getInputHandler()
WorldWindow
getInputHandler
in interface WorldWindow
null
if no input handler is associated.public Model getModel()
WorldWindow
getModel
in interface WorldWindow
public PickedObjectList getObjectsAtCurrentPosition()
WorldWindow
getObjectsAtCurrentPosition
in interface WorldWindow
null
if no objects are under the cursor.public Collection<PerformanceStatistic> getPerFrameStatistics()
WorldWindow
getPerFrameStatistics
in interface WorldWindow
public SceneController getSceneController()
WorldWindow
getSceneController
in interface WorldWindow
null
if no scene controller is
associated.public TextureCache getTextureCache()
WorldWindow
getTextureCache
in interface WorldWindow
public View getView()
WorldWindow
getView
in interface WorldWindow
public void redraw()
WorldWindow
redraw
in interface WorldWindow
public void redrawNow()
WorldWindow
redrawNow
in interface WorldWindow
public void removePositionListener(PositionListener listener)
WorldWindow
removePositionListener
in interface WorldWindow
listener
- The listener to remove.public void removeRenderingListener(RenderingListener listener)
WorldWindow
removeRenderingListener
in interface WorldWindow
listener
- The rendering listener to remove.public void removeSelectListener(SelectListener listener)
WorldWindow
removeSelectListener
in interface WorldWindow
listener
- The select listener to remove.public void setInputHandler(InputHandler inputHandler)
WorldWindow
setInputHandler
in interface WorldWindow
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.public void setModel(Model model)
WorldWindow
null
is specified for the model, the current model, if
any, is disassociated with the window.
setModel
in interface WorldWindow
model
- the model to display. May be null
.public void setModelAndView(Model model, View view)
WorldWindow
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.
setModelAndView
in interface WorldWindow
model
- the model to display. May benull
.view
- the view to use to display this window's model. May benull
.public void setPerFrameStatisticsKeys(Set<String> keys)
WorldWindow
setPerFrameStatisticsKeys
in interface WorldWindow
keys
- The statistics to activate.protected void setTextureCache(TextureCache textureCache)
public void setView(View view)
WorldWindow
null
is specified for the view, the
current view, if any, is disassociated with the window.
setView
in interface WorldWindow
view
- the view to use to display this window's model. May be null.public void shutdown()
shutdown
in interface WorldWindow
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |