|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
javax.swing.JApplet
gov.nasa.worldwindx.examples.applet.WWJApplet
public class WWJApplet
Illustrates the how to display a World Wind in a Java Applet and interact with the
WorldWindow through JavaScript code running in the browser. This class extends WorldWindow and
embeds a WorldWindowGLCanvas and a StatusBar in the Applet's content pane.
JApplet
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JApplet |
|---|
JApplet.AccessibleJApplet |
| Nested classes/interfaces inherited from class java.applet.Applet |
|---|
Applet.AccessibleApplet |
| Nested classes/interfaces inherited from class java.awt.Panel |
|---|
Panel.AccessibleAWTPanel |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected RenderableLayer |
labelsLayer
|
protected WorldWindowGLCanvas |
wwd
|
| Fields inherited from class javax.swing.JApplet |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
WWJApplet()
|
|
| Method Summary | |
|---|---|
void |
addLabel(String text,
double lat,
double lon,
String font,
String color)
Add a text label at a position on the globe. |
Layer |
getLayerByName(String layerName)
Get a reference to a layer with part of its name |
OrbitView |
getOrbitView()
Get the current OrbitView |
WorldWindowGLCanvas |
getWW()
Get the WorldWindowGLCanvas |
void |
gotoLatLon(double lat,
double lon)
Move the current view position |
void |
gotoLatLon(double lat,
double lon,
double zoom,
double heading,
double pitch)
Move the current view position, zoom, heading and pitch |
void |
init()
|
static void |
insertBeforeLayerName(WorldWindow wwd,
Layer layer,
String targetName)
Adds a layer to WW current layerlist, before a named layer. |
void |
setHeadingAndPitch(double heading,
double pitch)
Set the current view heading and pitch |
void |
setZoom(double zoom)
Set the current view zoom |
void |
start()
|
void |
stop()
|
| Methods inherited from class javax.swing.JApplet |
|---|
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
| Methods inherited from class java.applet.Applet |
|---|
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus |
| Methods inherited from class java.awt.Panel |
|---|
addNotify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected RenderableLayer labelsLayer
protected WorldWindowGLCanvas wwd
| Constructor Detail |
|---|
public WWJApplet()
| Method Detail |
|---|
public void addLabel(String text,
double lat,
double lon,
String font,
String color)
text - the text to be displayed.lat - the latitude in decimal degrees.lon - the longitude in decimal degrees.font - a string describing the font to be used.color - the color to be used as an hexadecimal coded string.public Layer getLayerByName(String layerName)
layerName - part of the layer name to match.
public OrbitView getOrbitView()
public WorldWindowGLCanvas getWW()
public void gotoLatLon(double lat,
double lon)
lat - the target latitude in decimal degreeslon - the target longitude in decimal degrees
public void gotoLatLon(double lat,
double lon,
double zoom,
double heading,
double pitch)
lat - the target latitude in decimal degreeslon - the target longitude in decimal degreeszoom - the target eye distance in metersheading - the target heading in decimal degreespitch - the target pitch in decimal degreespublic void init()
init in class Applet
public static void insertBeforeLayerName(WorldWindow wwd,
Layer layer,
String targetName)
wwd - the WorldWindow reference.layer - the layer to be added.targetName - the partial layer name to be matched - case sensitive.
public void setHeadingAndPitch(double heading,
double pitch)
heading - the target heading in decimal degreespitch - the target pitch in decimal degreespublic void setZoom(double zoom)
zoom - the target eye distance in meterspublic void start()
start in class Appletpublic void stop()
stop in class Applet
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||