public class WWJApplet extends JApplet
WorldWindow
in a Java Applet and interact with the
WorldWindow through JavaScript code running in the browser. This class extends JApplet
and
embeds a WorldWindowGLCanvas and a StatusBar in the Applet's content pane.JApplet.AccessibleJApplet
Applet.AccessibleApplet
Panel.AccessibleAWTPanel
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected RenderableLayer |
labelsLayer |
protected WorldWindowGLCanvas |
wwd |
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
WWJApplet() |
Modifier and Type | Method and Description |
---|---|
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() |
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus
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, transferFocusDownCycle, validate, validateTree
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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, revalidate, 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, transferFocusBackward, transferFocusUpCycle
protected RenderableLayer labelsLayer
protected WorldWindowGLCanvas wwd
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 degreespublic 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 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 meters