gov.nasa.worldwind.examples.applet
Class WWJApplet
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
javax.swing.JApplet
gov.nasa.worldwind.examples.applet.WWJApplet
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer
public class WWJApplet - extends JApplet
Provides a base application framework for simple WorldWind applets.
A simple applet which runs World Wind with a StatusBar at the bottom
and lets javascript set some view attributes.
- See Also:
- Serialized Form
|
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, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, 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.Container |
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
WWJApplet
public WWJApplet()
addLabel
public void addLabel(String text,
double lat,
double lon,
String font,
String color)
- Add a text label at a position on the globe.
- Parameters:
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.
getLayerByName
public Layer getLayerByName(String layerName)
- Get a reference to a layer with part of its name
- Parameters:
layerName - part of the layer name to match.
- Returns:
- the corresponding layer or null if not found.
getOrbitView
public OrbitView getOrbitView()
- Get the current OrbitView
- Returns:
- the current OrbitView
getWW
public WorldWindowGLCanvas getWW()
- Get the WorldWindowGLCanvas
- Returns:
- the current WorldWindowGLCanvas
gotoLatLon
public void gotoLatLon(double lat,
double lon)
- Move the current view position
- Parameters:
lat - the target latitude in decimal degreeslon - the target longitude in decimal degrees
gotoLatLon
public void gotoLatLon(double lat,
double lon,
double zoom,
double heading,
double pitch)
- Move the current view position, zoom, heading and pitch
- Parameters:
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 degrees
init
public void init()
- Overrides:
init in class Applet
insertBeforeLayerName
public static void insertBeforeLayerName(WorldWindow wwd,
Layer layer,
String targetName)
- Adds a layer to WW current layerlist, before a named layer.
Target name can be a part of the layer name
- Parameters:
wwd - the WorldWindow reference.layer - the layer to be added.targetName - the partial layer name to be matched - case sensitive.
setHeadingAndPitch
public void setHeadingAndPitch(double heading,
double pitch)
- Set the current view heading and pitch
- Parameters:
heading - the traget heading in decimal degreespitch - the target pitch in decimal degrees
setZoom
public void setZoom(double zoom)
- Set the current view zoom
- Parameters:
zoom - the target eye distance in meters
start
public void start()
- Overrides:
start in class Applet
stop
public void stop()
- Overrides:
stop in class Applet
|
|