Package ucar.unidata.view.geoloc
Class NavigatedMapPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
ucar.unidata.view.geoloc.NavigatedMapPanel
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Accessible
- Direct Known Subclasses:
GeoSelectionPanel.MyNavigatedMapPanel,PipPanel
A navigated panel that holds a set of maps.
- Author:
- Jeff McWhirter
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringname of default mapstatic ListAn application can set the list of maps to useprotected NavigatedPanelnavigated panelFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.NavigatedMapPanel(boolean makeToolBar) Default constructor.NavigatedMapPanel(boolean makeNavToolBar, boolean makeMoveToolBar) ctorNavigatedMapPanel(String defaultMap) Construct a newNavigatedMapPanelusing the specified station selection type, map and template.NavigatedMapPanel(List maps) Create a NMP with a set of mapsNavigatedMapPanel(List defaultMaps, boolean makeToolBar) Create a NMP with a set of mapsNavigatedMapPanel(List defaultMaps, boolean makeNavToolBar, boolean makeMoveToolBar) Create a NMP with a set of mapsNavigatedMapPanel(List defaultMaps, boolean makeNavToolBar, boolean makeMoveToolBar, BufferedImage preview_image, AreaFile af) Construct a NavigatedMapPanel -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a renderer.protected voidannotateMap(Graphics2D gNP) Draw any annotations on the mapprotected NavigatedPanelFactory method to make the map panel.protected voidA hook so subclasses can override and respond to pick point events.Access to the navigated panel.protected ucar.unidata.geoloc.ProjectionImplGet the projectionucar.unidata.geoloc.ProjectionImplGet the projection used by the nav panelvoidredraw()Redraw the graphics on the screen.voidresetBounds(ucar.unidata.geoloc.ProjectionRect rect) voidsetDrawBounds(double ulx, double uly, double lrx, double lry) Set the drawing bounds.voidsetDrawBounds(ucar.unidata.geoloc.LatLonPoint ul, ucar.unidata.geoloc.LatLonPoint lr) Set the drawing boundsvoidSet the map renderer for this objectvoidsetProjectionImpl(ucar.unidata.geoloc.ProjectionImpl p) Set the projection to use for this map.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods inherited from class javax.swing.JComponent
addAncestorListener, 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, updateMethods inherited from class java.awt.Container
add, 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, validateTreeMethods inherited from class java.awt.Component
action, 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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
DEFAULT_MAP
name of default map- See Also:
-
DEFAULT_MAPS
An application can set the list of maps to use
-
-
Constructor Details
-
NavigatedMapPanel
public NavigatedMapPanel()Default constructor. Uses the default map -
NavigatedMapPanel
public NavigatedMapPanel(boolean makeToolBar) Default constructor. Uses the default map- Parameters:
makeToolBar- Make the nav toolbar
-
NavigatedMapPanel
public NavigatedMapPanel(boolean makeNavToolBar, boolean makeMoveToolBar) ctor- Parameters:
makeNavToolBar- make nav tool barmakeMoveToolBar- make move tool bar
-
NavigatedMapPanel
Construct a newNavigatedMapPanelusing the specified station selection type, map and template.- Parameters:
defaultMap- map to use
-
NavigatedMapPanel
Create a NMP with a set of maps- Parameters:
maps- default set of maps.
-
NavigatedMapPanel
Create a NMP with a set of maps- Parameters:
defaultMaps- default set of maps.makeToolBar- Make the nav toolbar
-
NavigatedMapPanel
Create a NMP with a set of maps- Parameters:
defaultMaps- default set of maps.makeNavToolBar- Make the nav toolbarmakeMoveToolBar- Make the move toolbar
-
NavigatedMapPanel
public NavigatedMapPanel(List defaultMaps, boolean makeNavToolBar, boolean makeMoveToolBar, BufferedImage preview_image, AreaFile af) Construct a NavigatedMapPanel- Parameters:
defaultMaps- _more_makeNavToolBar- _more_makeMoveToolBar- _more_preview_image- _more_af- _more_
-
-
Method Details
-
doMakeMapPanel
Factory method to make the map panel. Derived classes can override this to make their own.- Returns:
- The map panel
-
resetBounds
public void resetBounds(ucar.unidata.geoloc.ProjectionRect rect) - Parameters:
rect-
-
setDrawBounds
public void setDrawBounds(double ulx, double uly, double lrx, double lry) Set the drawing bounds.- Parameters:
ulx- upper left xuly- upper left ylrx- lower right xlry- lower right y
-
setDrawBounds
public void setDrawBounds(ucar.unidata.geoloc.LatLonPoint ul, ucar.unidata.geoloc.LatLonPoint lr) Set the drawing bounds- Parameters:
ul- upper left pointlr- lower right point
-
doPickPoint
A hook so subclasses can override and respond to pick point events.- Parameters:
e-PickEventto process
-
setMapRenderer
Set the map renderer for this object- Parameters:
r- map renderer
-
addMapRenderer
Add a renderer.- Parameters:
r- renderer to add.
-
setProjectionImpl
public void setProjectionImpl(ucar.unidata.geoloc.ProjectionImpl p) Set the projection to use for this map.- Parameters:
p- projection to use
-
getProjectionImpl
public ucar.unidata.geoloc.ProjectionImpl getProjectionImpl()Get the projection used by the nav panel- Returns:
- projection
-
redraw
public void redraw()Redraw the graphics on the screen. -
annotateMap
Draw any annotations on the map- Parameters:
gNP- The Graphics to draw into
-
getProjection
protected ucar.unidata.geoloc.ProjectionImpl getProjection()Get the projection- Returns:
- the projection
-