Package hec.map
Class MapPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
hec.map.MapPanel
- All Implemented Interfaces:
ActionListener,AdjustmentListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible
Geo-referenced mapping widget that contains a MapCanvas, horizontal and
vertical scrollbars, and a toolpanel.
- Since:
- 9/20/99
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classMouseWheelHandler is an inner class which implements the MouseWheelListener interface.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 TypeFieldDescriptionprotected Listlist of background glyphsprotected booleanDescriptionprotected Listlist of all glyphsprotected MapToolPanelDescriptionprotected MapToolPanelDescriptionprotected WorldRectthe current extentsprotected Listlist of map glyphsprotected RMAJScrollBarDescriptionprotected booleanflag indicating the viewport is being adjustedprotected Listlist of manager glyphsprotected WorldRectthe maximum extentsprotected MapDescriptionprotected Vectorthe list of observersprotected intDescriptionprotected intDescriptionprotected Listlist of the ordering of the glyphsprotected booleanflag indicating whether painting should occurprotected Threadthe thread that handles paintingprotected MapScalescale object that contains world to local coordinate transformation dataprotected UserInterfacethe user interface to display messages toprotected RMAJScrollBarDescriptionprotected MapCanvasDescriptionstatic final Stringset origin change type stringstatic final Stringscrolled change type stringstatic final Stringshowall change type stringstatic final StringZoom in by factor change type stringstatic final StringZoom in change type stringprotected booleanFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcalled when a user presses a toolbar button.booleanadd a background map to the MapPanelvoidaddBackgroundMaps(List mapVec) add Background MapObjectInterfaces to the list of Background mapsvoidno op methodprotected voidbooleanadd a new ManagerMap to the MapPanelbooleanaddManagerMap(MapObjectInterface map, boolean fireEvent) Adds a feature to the ManagerMap attribute of the MapPanel objectbooleanaddManagerMap(MapObjectInterface map, MapGlyph mapGlyph, boolean fireEvent) protected voidaddManagerMapGlyph(MapGlyph mapGlyph) voidaddManagerMaps(List mapVec) add Manager MapObjectInterfaces to the list of Manager mapsbooleanaddMap(MapObjectInterface map) add a Map to the MapPanelbooleanaddMap(MapObjectInterface map, boolean fireEvent) Adds a feature to the Map attribute of the MapPanel objectbooleanaddMap(MapObjectInterface map, boolean fireEvent, boolean toBottom) voidadd a MapGlyph Listener to the MapPanel.voidthe the Maps in maps to the MapPanelvoidaddMapToolClassLoader(MapToolClassLoader classLoader) protected voidvoidadd an Observer to the observerListvoidvoidcalled when a scrollbar is movedreturn the List of Background Glyphs.causes the combined glyph list to be rebuilt.protected booleanreturn a copy of the background glyph listreturn a copy of the CombinedGlyphList.return a copy of the Map glyph listreturn a copy of the ManagerGLyph listcreate the default map tool panelvoidremove the Observer o from the observer listsearch the Manager and Background glyph lists for the MapGlyph that holds the MapObjectfindGlyphForMapObjectClass(String classname) search the Manager and Background glyph lists for the MapGlyph that holds the MapObject of class classname<T extends MapGlyph>
TfindGlyphOfClass(Class<T> c, boolean searchChildren) search the Manager and Background glyph lists for the MapGlyph of class classnamefindGlyphOfClass(String classname) search the Manager and Background glyph lists for the MapGlyph of class classnamefindGlyphOfClass(String classname, boolean searchChildren) findGlyphsOfClass(String classname) search the Manager and Background glyph lists for any MapGlyphs of class classnamefindToolButtonFor(String name) find the ToolButton for the specified MouseAdapter classprotected voidMethod DescriptionGets the CurrentExtents attribute of the MapPanel objectGets a copy of the current Extents of the MapPanelintgetGlyphLevel(MapGlyph glyph) Gets the Glyph Level for glyphbooleanreturn whether the MapPanel will grow to it extentsintGets the current MapMouseAdapterGets the Max Extents of the MapPanelGets the UserInterface used by the MapPanel objectintGets the Viewport Size of the MapCanvasget a List of the Maps that are visible (isShown() == true)return the list of Map Glyphs.voidgrowRegionExtents(WorldRect rect) grow the map extents to include rectbooleanhasMap(MapObjectInterface map) check to see if there is already a glyph for map already loaded in this MapPanel.protected voidinit(boolean buildControls) initialize the controls for the MapPanelbooleanGets whether painting is enabled for the MapPanelreturn the List of Manager Glyphs.voidnotifyObservers(String chgMsg) notify the Observers of a changevoidvoidpaints the cached image for the MapCanvasvoidpaintMap()redraw the map.voidpaintMap(int x, int y, int width, int height) redraw the map.voidprintStatus(String msg) print a statuc message to the UserInterface object of this MapPanelvoidremove all maps from the MapPanelvoidremoveManagerMap(MapObjectInterface mapObject) booleanremoveMap(MapIdentifier mapId) remove the map identified by mapid from the MapPanelbooleanremove the map from this MapPanelvoidremove the MapGlyphListener l from the listener listvoidremove the maps in this MapPanelvoidvoidresetBackgroundMaps(List mapVec) set the Background MapObjectInterface listvoidresetManagerMaps(List mapVec) set the Manager MapObjectInterface listvoidresetManagerOrder(List positionList) set the order of the List of Manager MapObjectInterface objectsvoidreset the horizontal and vertical scroll barsscale()get the MapPanel's MapScalevoidscroll the vertical scrollbar down one block incrementvoidscroll the horizontal scrollbar to the left one block incrementvoidscroll the horizontal scrollbar to the right one block incrementprotected voidscrollTowardMax(JScrollBar scrollbar) protected voidscrollTowardMin(JScrollBar scrollbar) voidscrollUp()scroll the vertical scrollbar up one block incrementvoidsetBackgroundGlyphList(List list) set the List of Background MapObjectInterface objects.voidvoidsetExtents(WorldRect e, boolean resetWkspExtents) Sets the Extents of the MapPanelvoidsetGlassPane(JPanel glassPane) voidsetGlyphList(List newGlyphList) add static Map MapObjectInterfaces to the list of MapsvoidsetGlyphList(List newGlyphList, boolean saveToWksp) add static Map MapObjectInterfaces to the list of MapsvoidsetLegendRenderer(LegendRenderer renderer) voidsetManagerGlyphList(List list) set the List of Manager MapObjectInterface objects.voidsetManagerOrder(List positionList) Sets the ManagerOrder attribute of the MapPanel object calls setManagerOrder(positionList, true)voidsetManagerOrder(List positionList, boolean saveToWksp) Sets the ManagerOrder attribute of the MapPanel objectvoidsetMapTools(MapToolPanel tools) Sets the current MapTools of the MapPanel objectvoidSets the Max Extents of the MapPanelbooleansetMouseAdapter(String className) voidbooleansetPaintEnabled(boolean state) Sets whether painting is enabled for the mappanelvoidSets the UserInterface for the MapPanel objectvoidshowAll()zoom the MapPanel to the max extentsprotected voidvoidUpdate region extents based on current setting of the workspaceviewport()get the MapPanel's MapCanvasvoidcauses the Thread that calls this method to wait until the MapCanvas has finished image creation and displayed it.voidzoomByFactor(double factor) zoom in by factorvoidzoom the viewport to rcMethods 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, 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
-
_horizScrollbar
Description -
_vertScrollbar
Description -
_viewport
Description -
_defaultToolsPanel
Description -
_currentToolsPanel
Description -
_mouseAdapters
Description -
OBS_ZOOMIN
Zoom in change type string- See Also:
-
OBS_ZOOMBYFACTOR
Zoom in by factor change type string- See Also:
-
OBS_SCROLLED
scrolled change type string- See Also:
-
OBS_SHOWALL
showall change type string- See Also:
-
OBS_ORIGIN_SET
set origin change type string- See Also:
-
_maxExtents
the maximum extents -
_extents
the current extents -
_scale
scale object that contains world to local coordinate transformation data -
_glyphList
list of map glyphs -
_managerGlyphList
list of manager glyphs -
_backgroundGlyphList
list of background glyphs -
_combinedGlyphList
list of all glyphs -
_orderList
list of the ordering of the glyphs -
_paintThread
the thread that handles painting -
_paintEnabled
protected boolean _paintEnabledflag indicating whether painting should occur -
_userInterface
the user interface to display messages to -
_observerList
the list of observers -
_changed
protected boolean _changedDescription -
_isAdjusting
protected boolean _isAdjustingflag indicating the viewport is being adjusted -
_oldVerticalValue
protected int _oldVerticalValueDescription -
_oldHorizontalValue
protected int _oldHorizontalValueDescription -
useRenderer
protected boolean useRenderer
-
-
Constructor Details
-
MapPanel
public MapPanel(boolean buildControls) Create a new MapPanel object- Parameters:
buildControls- flag indicating whether to add the default tools and scrollbars
-
MapPanel
public MapPanel()Create a new MapPanel object with default tools and scrollbars -
MapPanel
Create a new MapPanel object with default tools and scrollbars- Parameters:
frame- currently not used
-
-
Method Details
-
addMapToolClassLoader
-
paintComponent
- Overrides:
paintComponentin classJComponent
-
addPaintCompleteListener
-
removePaintCompleteListener
-
getGlyphLevel
Gets the Glyph Level for glyph- Parameters:
glyph- a MapGlyph current displayed in the MapPanel- Returns:
- glyph's index into the MapPanel layers
-
init
protected void init(boolean buildControls) initialize the controls for the MapPanel- Parameters:
buildControls- true to create the scrollbars and map tools
-
setGlassPane
-
getGlassPane
-
addListeners
protected void addListeners() -
showHideScrollbars
protected void showHideScrollbars() -
setLegendRenderer
-
createViewport
-
setPaintEnabled
public boolean setPaintEnabled(boolean state) Sets whether painting is enabled for the mappanel- Parameters:
state- The new PaintEnabled value- Returns:
- the previous paint enabled state
-
isPaintEnabled
public boolean isPaintEnabled()Gets whether painting is enabled for the MapPanel- Returns:
- true if painting is enabled
-
createDefaultMapTools
create the default map tool panel- Returns:
- the new MapToolPanel
-
getMapToolPanel
-
setMapTools
Sets the current MapTools of the MapPanel object- Parameters:
tools- The new MapToolsPanel
-
addMaps
the the Maps in maps to the MapPanel- Parameters:
maps- The feature to be added to the Maps attribute- Throws:
IOException- Description
-
resetManagerMaps
set the Manager MapObjectInterface list- Parameters:
mapVec- List of Manager MapObjectInterface objects
-
resetBackgroundMaps
set the Background MapObjectInterface list- Parameters:
mapVec- List of Background MapObjectInterface objects
-
addBackgroundMaps
add Background MapObjectInterfaces to the list of Background maps- Parameters:
mapVec- List of MapObjectInterface Background Maps- Throws:
IOException- Description
-
addManagerMaps
add Manager MapObjectInterfaces to the list of Manager maps- Parameters:
mapVec- List of MapObjectInterface Manager Maps- Throws:
IOException- Description
-
setGlyphList
add static Map MapObjectInterfaces to the list of Maps- Parameters:
newGlyphList- List of MapObjectInterface Maps
-
setGlyphList
add static Map MapObjectInterfaces to the list of Maps- Parameters:
newGlyphList- List of MapObjectInterface MapssaveToWksp- true to save the newGlyphList to the workspace
-
resetManagerOrder
set the order of the List of Manager MapObjectInterface objects- Parameters:
positionList- the list of MapPosition objects
-
setManagerOrder
Sets the ManagerOrder attribute of the MapPanel object calls setManagerOrder(positionList, true)- Parameters:
positionList- The new ManagerOrder value
-
setManagerOrder
Sets the ManagerOrder attribute of the MapPanel object- Parameters:
positionList- The new ManagerOrder valuesaveToWksp- true to save the order to the workspace
-
setManagerGlyphList
set the List of Manager MapObjectInterface objects. This is just a reference assignment.- Parameters:
list- The new ManagerGlyph List
-
setBackgroundGlyphList
set the List of Background MapObjectInterface objects. This is just a reference assignment.- Parameters:
list- The new BackgroundGlyph List
-
cloneCombinedGlyphList
return a copy of the CombinedGlyphList.- Returns:
- a copy of the Combined Glyph List
-
cloneGlyphList
return a copy of the Map glyph list- Returns:
- a copy of the map glyph list
-
cloneManagerGlyphList
return a copy of the ManagerGLyph list- Returns:
- a copy of the ManagerGlyph list
-
cloneBackgroundGlyphList
return a copy of the background glyph list- Returns:
- a copy of the background glyph list
-
findToolButtonFor
find the ToolButton for the specified MouseAdapter class- Parameters:
name- the class name of the MouseAdapter- Returns:
- the Button or null
-
setMouseAdapter
-
getMapMouseAdapter
Gets the current MapMouseAdapter- Returns:
- The current MapMouseAdapter
-
paintImage
public void paintImage()paints the cached image for the MapCanvas -
paintMap
public void paintMap()redraw the map. This is the method to call when a glyph has changes that need to be reflected on the MapPanel -
paintMap
public void paintMap(int x, int y, int width, int height) redraw the map. This is the method to call when a glyph has changes that need to be reflected on the MapPanel /** Repaints the specified rectangle of this component.Note: For more information on the paint mechanisms utilitized by AWT and Swing, including information on how to write the most efficient painting code, see Painting in AWT and Swing.
- Parameters:
x- the x coordinatey- the y coordinatewidth- the widthheight- the height
-
waitforPaintComplete
public void waitforPaintComplete()causes the Thread that calls this method to wait until the MapCanvas has finished image creation and displayed it. -
glyphList
return the list of Map Glyphs. This List is not a copy.- Returns:
- the list of MapGlyphs
-
managerGlyphList
return the List of Manager Glyphs. This method should not be public, but is so for historical reasons. User code that needs to find a particular glyph of a class type should usefindGlyphOfClass(String className)- Returns:
- Description
-
backGroundGlyphList
return the List of Background Glyphs. This method should not be public, but is so for historical reasons. User code that needs to find a particular glyph of a class type should usefindGlyphOfClass(String className)- Returns:
- Description
-
hasMap
check to see if there is already a glyph for map already loaded in this MapPanel.- Parameters:
map- the map to check- Returns:
- true if map is already loaded in this MapPanel
-
addMap
add a Map to the MapPanel- Parameters:
map- the new Map to add
-
addMap
Adds a feature to the Map attribute of the MapPanel object- Parameters:
map- The feature to be added to the Map attributefireEvent- The feature to be added to the Map attribute
-
addMap
-
addBackgroundMap
add a background map to the MapPanel- Parameters:
map- the new background map
-
addManagerMap
add a new ManagerMap to the MapPanel- Parameters:
map- the new Manager Map
-
canAddManagerMap
-
addManagerMap
Adds a feature to the ManagerMap attribute of the MapPanel object- Parameters:
map- The feature to be added to the ManagerMap attributefireEvent- The feature to be added to the ManagerMap attribute
-
addManagerMap
-
addMaptools
-
addManagerMapGlyph
-
fireGlyphVectorChanged
protected void fireGlyphVectorChanged()Method Description -
buildGlyphList
causes the combined glyph list to be rebuilt.- Returns:
- the new combined glyph list
-
addMapGlyphListener
add a MapGlyph Listener to the MapPanel. These listeners get notified when any of the lists of MapGlyphs gets changed- Parameters:
l- the new MapGlyphListener
-
removeMapGlyphListener
remove the MapGlyphListener l from the listener list- Parameters:
l- the MapGlyphListener to remove
-
growRegionExtents
grow the map extents to include rect- Parameters:
rect- the WorldRect to grow the extents to
-
removeAllMaps
public void removeAllMaps()remove all maps from the MapPanel -
zoomIn
zoom the viewport to rc- Parameters:
rc- the new viewport rectangle
-
zoomByFactor
public void zoomByFactor(double factor) zoom in by factor- Parameters:
factor- the new zoom factor
-
actionPerformed
called when a user presses a toolbar button.- Specified by:
actionPerformedin interfaceActionListener- Parameters:
e- Description
-
adjustmentValueChanged
called when a scrollbar is moved- Specified by:
adjustmentValueChangedin interfaceAdjustmentListener- Parameters:
event- Description
-
resetScrollbars
public void resetScrollbars()reset the horizontal and vertical scroll bars -
scrollUp
public void scrollUp()scroll the vertical scrollbar up one block increment -
scrollLeft
public void scrollLeft()scroll the horizontal scrollbar to the left one block increment -
scrollRight
public void scrollRight()scroll the horizontal scrollbar to the right one block increment -
scrollDown
public void scrollDown()scroll the vertical scrollbar down one block increment -
scrollTowardMin
-
scrollTowardMax
-
scale
get the MapPanel's MapScale- Returns:
- the MapScale
-
scale
-
getCoordinateReferenceSystem
-
viewport
get the MapPanel's MapCanvas- Returns:
- the MapCanvas
-
getExtents
Gets a copy of the current Extents of the MapPanel- Returns:
- The Extents
-
setExtents
-
setExtents
Sets the Extents of the MapPanel- Parameters:
e- The new Extents
-
getMaxExtents
Gets the Max Extents of the MapPanel- Returns:
- The Max Extents
-
setMaxExtents
Sets the Max Extents of the MapPanel- Parameters:
e- The new Max Extents
-
getViewportSize
Gets the Viewport Size of the MapCanvas- Returns:
- The Viewport Size
-
addGlyphs
no op method- Parameters:
glyphs- The feature to be added to the Glyphs attribute- Throws:
IOException- Description
-
showAll
public void showAll()zoom the MapPanel to the max extents -
setOrigin
-
findGlyphForMapObject
search the Manager and Background glyph lists for the MapGlyph that holds the MapObject- Parameters:
map- the MapObject to find the glyph for- Returns:
- the MapGlyph that holds the MapObject or null if none found
-
findGlyphForMapObjectClass
search the Manager and Background glyph lists for the MapGlyph that holds the MapObject of class classname- Parameters:
classname- the class name of the MapObject to find- Returns:
- the first MapGlyph of class type classname
-
findGlyphOfClass
search the Manager and Background glyph lists for the MapGlyph of class classname- Parameters:
classname- the class name of the MapGlyph to find- Returns:
- the first MapGlyph of class type classname
-
findGlyphOfClass
-
findGlyphOfClass
search the Manager and Background glyph lists for the MapGlyph of class classname- Parameters:
c- the class of the MapGlyph to find- Returns:
- the first MapGlyph of class type classname
-
findGlyphsOfClass
search the Manager and Background glyph lists for any MapGlyphs of class classname- Parameters:
classname- the class name of the MapGlyph to find- Returns:
- all the MapGlyphs of class type classname
-
getGrowToExtents
public boolean getGrowToExtents()return whether the MapPanel will grow to it extents- Returns:
- The GrowToExtents value
- See Also:
-
updateExtents
public void updateExtents()Update region extents based on current setting of the workspace -
getCurrentExtents
Gets the CurrentExtents attribute of the MapPanel object- Returns:
- The CurrentExtents value
-
setUserInterface
Sets the UserInterface for the MapPanel object- Parameters:
ui- The new UserInterface value
-
getUserInterface
Gets the UserInterface used by the MapPanel object- Returns:
- The UserInterface value
-
printStatus
print a statuc message to the UserInterface object of this MapPanel- Parameters:
msg- Description
-
addObserver
add an Observer to the observerList- Parameters:
o- the Observer to add
-
deleteObserver
remove the Observer o from the observer list- Parameters:
o- Description
-
notifyObservers
notify the Observers of a change- Parameters:
chgMsg- Description
-
removeManagerMap
- Parameters:
mapObject-
-
removeMaps
public void removeMaps()remove the maps in this MapPanel -
removeMap
remove the map from this MapPanel- Parameters:
map- the Map to remove
-
removeMap
remove the map identified by mapid from the MapPanel- Parameters:
mapId-- Returns:
- truen if the map was removed
-
getVisibleMaps
get a List of the Maps that are visible (isShown() == true)- Returns:
- a non-null List of
hec.map.MapObjects
-
getVerticalScrollBarWidth
public int getVerticalScrollBarWidth() -
getHorizontalScrollBarHeight
public int getHorizontalScrollBarHeight() -
getViewportPanel
-