|
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
gov.nasa.worldwind.WorldWindowGLAutoDrawable
public class WorldWindowGLAutoDrawable
A non-platform specific WorldWindow class. This class can be aggregated into platform-specific classes to
provide the core functionality of World Wind.
| Field Summary | |
|---|---|
static long |
DEFAULT_VIEW_STOP_TIME
Default time in milliseconds that the view must remain unchanged before the View.VIEW_STOPPED message is
sent. |
protected long |
lastViewID
The most recent View modelView ID. |
protected ScheduledFuture |
viewRefreshTask
Schedule task to send the View.VIEW_STOPPED message after the view stop time elapses. |
protected long |
viewStopTime
Time in milliseconds that the view must remain unchanged before the View.VIEW_STOPPED message is sent. |
| Fields inherited from class gov.nasa.worldwind.WorldWindowImpl |
|---|
gpuResourceCache |
| Constructor Summary | |
|---|---|
WorldWindowGLAutoDrawable()
Construct a new WorldWindowGLCanvas for a specified GLDrawable. |
|
| Method Summary | |
|---|---|
protected void |
checkForViewChange()
Determine if the view has changed since the previous frame. |
void |
display(GLAutoDrawable glAutoDrawable)
See GLEventListener.display(GLAutoDrawable). |
void |
dispose(GLAutoDrawable glAutoDrawable)
See GLEventListener.init(GLAutoDrawable). |
protected int |
doDisplay()
Performs the actual repaint. |
protected void |
doShutdown()
|
protected void |
doSwapBuffers(GLAutoDrawable drawable)
Performs the actual buffer swap. |
void |
endInitialization()
|
GLContext |
getContext()
Returns the GLContext associated with this WorldWindow. |
protected String[] |
getRequiredOglExtensions()
|
protected String[] |
getRequiredOglFunctions()
|
long |
getViewStopTime()
Indicates the amount of time, in milliseconds, that the View must remain unchanged before a View.VIEW_STOPPED event is triggered. |
void |
init(GLAutoDrawable glAutoDrawable)
See GLEventListener.init(GLAutoDrawable). |
void |
initDrawable(GLAutoDrawable glAutoDrawable)
|
void |
initGpuResourceCache(GpuResourceCache cache)
|
protected void |
initializeCreditsController()
|
protected boolean |
isGLContextCompatible(GLContext context)
|
void |
onMessage(Message msg)
Empty implementation of MessageListener. |
void |
propertyChange(PropertyChangeEvent propertyChangeEvent)
The property change listener for this instance. |
void |
redraw()
Causes a repaint event to be enqueued with the window system for this world window. |
void |
redrawNow()
Immediately repaints the world window without waiting for a window system repaint event. |
protected void |
reinitialize(GLAutoDrawable glAutoDrawable)
|
void |
reshape(GLAutoDrawable glAutoDrawable,
int x,
int y,
int w,
int h)
See GLEventListener.reshape(GLAutoDrawable, int, int, int, int). |
protected void |
scheduleViewStopTask(long delay)
Schedule a task that will send a View.VIEW_STOPPED message to the Model when the task executes. |
void |
setViewStopTime(long time)
Specifies the amount of time, in milliseconds, that the View must remain unchanged before a View.VIEW_STOPPED event is triggered. |
void |
shutdown()
Causes resources used by the World Window to be freed. |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, 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 |
| Field Detail |
|---|
public static final long DEFAULT_VIEW_STOP_TIME
View.VIEW_STOPPED message is
sent.
protected long lastViewID
View.getViewStateID()protected ScheduledFuture viewRefreshTask
View.VIEW_STOPPED message after the view stop time elapses.
protected long viewStopTime
View.VIEW_STOPPED message is sent.
| Constructor Detail |
|---|
public WorldWindowGLAutoDrawable()
WorldWindowGLCanvas for a specified GLDrawable.
| Method Detail |
|---|
protected void checkForViewChange()
View.VIEW_STOPPED to the Model if the view does not change for viewStopTime
milliseconds.
getViewStopTime()public void display(GLAutoDrawable glAutoDrawable)
GLEventListener.display(GLAutoDrawable).
display in interface GLEventListenerglAutoDrawable - the drawable
IllegalStateException - if no SceneController exists for this canvaspublic void dispose(GLAutoDrawable glAutoDrawable)
GLEventListener.init(GLAutoDrawable).
GLEventListener's dispose method indicates that the GL context has been released, and provides the listener an
opportunity to clean up any resources. Dispose does not imply that the component's lifecycle has ended or that
the application is closing. There are three cases in which dispose may be called:
WorldWindow.shutdown() or WorldWind.shutDown(), respectively. In the case when a WorldWindow is removed from its parent
frame or that frame is closed without a call to shutdown, it is assumed that the application intends to reuse the
WorldWindow. Resources associated with the previous GL context are released in the subsequent call to init.
dispose in interface GLEventListenerglAutoDrawable - the drawableprotected int doDisplay()
protected void doShutdown()
protected void doSwapBuffers(GLAutoDrawable drawable)
drawable - the window's associated drawable.public void endInitialization()
endInitialization in interface WorldWindowGLDrawablepublic GLContext getContext()
WorldWindowGLContext associated with this WorldWindow.
getContext in interface WorldWindowGLContext associated with this window. May be null.protected String[] getRequiredOglExtensions()
protected String[] getRequiredOglFunctions()
public long getViewStopTime()
View.VIEW_STOPPED event is triggered.
public void init(GLAutoDrawable glAutoDrawable)
GLEventListener.init(GLAutoDrawable).
init in interface GLEventListenerglAutoDrawable - the drawablepublic void initDrawable(GLAutoDrawable glAutoDrawable)
initDrawable in interface WorldWindowGLDrawablepublic void initGpuResourceCache(GpuResourceCache cache)
initGpuResourceCache in interface WorldWindowGLDrawableprotected void initializeCreditsController()
protected boolean isGLContextCompatible(GLContext context)
public void onMessage(Message msg)
onMessage in interface MessageListeneronMessage in class WWObjectImplmsg - Message event.public void propertyChange(PropertyChangeEvent propertyChangeEvent)
WWObjectImpl
propertyChange in interface PropertyChangeListenerpropertyChange in class WWObjectImplpropertyChangeEvent - the eventpublic void redraw()
WorldWindow
redraw in interface WorldWindowredraw in class WorldWindowImplpublic void redrawNow()
WorldWindow
redrawNow in interface WorldWindowredrawNow in class WorldWindowImplprotected void reinitialize(GLAutoDrawable glAutoDrawable)
public void reshape(GLAutoDrawable glAutoDrawable,
int x,
int y,
int w,
int h)
GLEventListener.reshape(GLAutoDrawable, int, int, int, int).
reshape in interface GLEventListenerglAutoDrawable - the drawableprotected void scheduleViewStopTask(long delay)
View.VIEW_STOPPED message to the Model when the task executes. If the
task runs (is not cancelled), then the view is considered stopped. Only one view stop task is scheduled at a
time. If this method is called again before the task executes, the task will be cancelled and a new task
scheduled.
delay - Delay in milliseconds until the task runs.public void setViewStopTime(long time)
View.VIEW_STOPPED event is triggered.
time - Time in milliseconds that the View must must remain unchanged before the view stopped event is
triggered.public void shutdown()
WorldWindowImpl
shutdown in interface WorldWindowshutdown in class WorldWindowImpl
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||