public class MapPanel
extends javax.swing.JPanel
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
private gov.nasa.worldwind.awt.WorldWindowGLCanvas |
_wwd
Actual Map Canvas
|
private double |
currentAltitude
The current altitude of the map.
|
private java.util.Map<IRightClickAction,java.awt.event.MouseListener> |
rightClickActions
Map to associate IRightClickActions that have been added with the actual MouseListener that is installed.
|
private static long |
serialVersionUID
Serial Version UID
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
MapPanel()
Construct a MapPanel with a flat Earth view.
|
MapPanel(java.lang.Class<? extends gov.nasa.worldwind.globes.Globe> globeTypeClass)
Construct a new MapPanel using the given type of Globe view.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLayer(gov.nasa.worldwind.layers.Layer layer)
Add a layer of annotations to the map.
|
void |
addRightClickAction(IRightClickAction rightClick)
Add an action to be performed upon a right click on the map.
|
protected double |
getCurrentAltitude()
Accessor for the current altitude (eye point)
|
protected gov.nasa.worldwind.awt.WorldWindowGLCanvas |
getWWD() |
protected void |
initconfig(java.lang.Class<? extends gov.nasa.worldwind.globes.Globe> globeTypeClass)
Initialize configuration options for WorldWind to operate correctly.
|
void |
insertAtLayer(gov.nasa.worldwind.layers.Layer layer,
java.lang.Class<?> layerType,
boolean insertBefore)
Insert the given Layer before or after the first occurrence of the given layer type.
|
void |
insertAtLayer(gov.nasa.worldwind.layers.Layer layer,
gov.nasa.worldwind.layers.Layer targetLayer,
boolean insertBefore)
Insert the given layer before or after the first occurrence of the given layer object
|
protected void |
insertBeforeCompass(gov.nasa.worldwind.layers.Layer layer)
Insert layer just beneath the Compass layer.
|
void |
removeLayer(gov.nasa.worldwind.layers.Layer layer)
Remove a layer from the map
|
void |
removeRightClickAction(IRightClickAction rightClickAction)
Remove an action that is being performed upon a right click on the map.
|
protected void |
setCurrentAltitude(double currentAltitude)
Accessor for the current altitude (eye point)
|
void |
setPosition(gov.nasa.worldwind.geom.Position pos,
boolean fly)
Set the position of the map to the indicated position.
|
protected void |
setupAnnotationToggling()
Add a select listener to toggle ToggleAnnotation objects
|
protected void |
setupSky()
Convert gradient sky to color sky.
|
protected void |
setupStatusBar()
Set up the status bar, which shows latitude, longitude, altitude, etc.
|
protected void |
setupViewControllers()
Setup the controllers in the view which allow navigation around the map.
|
protected void |
setupWWD()
Setup the WorldWindow.
|
void |
start()
Starts the MapPanel by creating the WWJ Map and showing it.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprivate static final long serialVersionUID
private gov.nasa.worldwind.awt.WorldWindowGLCanvas _wwd
private java.util.Map<IRightClickAction,java.awt.event.MouseListener> rightClickActions
private double currentAltitude
public MapPanel()
public MapPanel(java.lang.Class<? extends gov.nasa.worldwind.globes.Globe> globeTypeClass)
globeTypeClass - The Class file for a class/interface extending/implementing Globe which determines the type of view of the Earth.protected void initconfig(java.lang.Class<? extends gov.nasa.worldwind.globes.Globe> globeTypeClass)
globeTypeClass - protected void setupWWD()
protected void setupStatusBar()
protected void setupViewControllers()
protected void setupSky()
protected void setupAnnotationToggling()
public void start()
protected void insertBeforeCompass(gov.nasa.worldwind.layers.Layer layer)
layer - - layer to insertpublic void addRightClickAction(IRightClickAction rightClick)
rightClick - - desired actionpublic void removeRightClickAction(IRightClickAction rightClickAction)
rightClickAction - - a IRightClickAction that was previously added by
addRightClickActionpublic void setPosition(gov.nasa.worldwind.geom.Position pos,
boolean fly)
pos - - desired destination positionfly - - fly if true, jump if falsepublic void addLayer(gov.nasa.worldwind.layers.Layer layer)
layer - layer to add to the mappublic void removeLayer(gov.nasa.worldwind.layers.Layer layer)
layer - layer to remove from the mappublic void insertAtLayer(gov.nasa.worldwind.layers.Layer layer,
java.lang.Class<?> layerType,
boolean insertBefore)
layer - The layer to insertlayerType - The type of layer to insert before or afterinsertBefore - Boolean that if true, will all insertion before the given type and if false, will insert after the type has been encountered.public void insertAtLayer(gov.nasa.worldwind.layers.Layer layer,
gov.nasa.worldwind.layers.Layer targetLayer,
boolean insertBefore)
layer - The layer to inserttargetLayer - The layer before or after which the given layer will be insertedinsertBefore - Boolean that if true, will all insertion before the given type and if false, will insert after the type has been encountered.protected gov.nasa.worldwind.awt.WorldWindowGLCanvas getWWD()
protected double getCurrentAltitude()
protected void setCurrentAltitude(double currentAltitude)
currentAltitude - the currentAltitude to set