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 class
MouseWheelHandler is an inner class which implements the MouseWheelListener interface.Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List
list of background glyphsprotected boolean
Descriptionprotected List
list of all glyphsprotected MapToolPanel
Descriptionprotected MapToolPanel
Descriptionprotected WorldRect
the current extentsprotected List
list of map glyphsprotected RMAJScrollBar
Descriptionprotected boolean
flag indicating the viewport is being adjustedprotected List
list of manager glyphsprotected WorldRect
the maximum extentsprotected Map
Descriptionprotected Vector
the list of observersprotected int
Descriptionprotected int
Descriptionprotected List
list of the ordering of the glyphsprotected boolean
flag indicating whether painting should occurprotected Thread
the thread that handles paintingprotected MapScale
scale object that contains world to local coordinate transformation dataprotected UserInterface
the user interface to display messages toprotected RMAJScrollBar
Descriptionprotected MapCanvas
Descriptionstatic final String
set origin change type stringstatic final String
scrolled change type stringstatic final String
showall change type stringstatic final String
Zoom in by factor change type stringstatic final String
Zoom in change type stringprotected boolean
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
called when a user presses a toolbar button.boolean
add a background map to the MapPanelvoid
addBackgroundMaps
(List mapVec) add Background MapObjectInterfaces to the list of Background mapsvoid
no op methodprotected void
boolean
add a new ManagerMap to the MapPanelboolean
addManagerMap
(MapObjectInterface map, boolean fireEvent) Adds a feature to the ManagerMap attribute of the MapPanel objectboolean
addManagerMap
(MapObjectInterface map, MapGlyph mapGlyph, boolean fireEvent) protected void
addManagerMapGlyph
(MapGlyph mapGlyph) void
addManagerMaps
(List mapVec) add Manager MapObjectInterfaces to the list of Manager mapsboolean
addMap
(MapObjectInterface map) add a Map to the MapPanelboolean
addMap
(MapObjectInterface map, boolean fireEvent) Adds a feature to the Map attribute of the MapPanel objectboolean
addMap
(MapObjectInterface map, boolean fireEvent, boolean toBottom) void
add a MapGlyph Listener to the MapPanel.void
the the Maps in maps to the MapPanelvoid
addMapToolClassLoader
(MapToolClassLoader classLoader) protected void
void
add an Observer to the observerListvoid
void
called when a scrollbar is movedreturn the List of Background Glyphs.causes the combined glyph list to be rebuilt.protected boolean
return 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 panelvoid
remove 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 void
Method DescriptionGets the CurrentExtents attribute of the MapPanel objectGets a copy of the current Extents of the MapPanelint
getGlyphLevel
(MapGlyph glyph) Gets the Glyph Level for glyphboolean
return whether the MapPanel will grow to it extentsint
Gets the current MapMouseAdapterGets the Max Extents of the MapPanelGets the UserInterface used by the MapPanel objectint
Gets the Viewport Size of the MapCanvasget a List of the Maps that are visible (isShown() == true)return the list of Map Glyphs.void
growRegionExtents
(WorldRect rect) grow the map extents to include rectboolean
hasMap
(MapObjectInterface map) check to see if there is already a glyph for map already loaded in this MapPanel.protected void
init
(boolean buildControls) initialize the controls for the MapPanelboolean
Gets whether painting is enabled for the MapPanelreturn the List of Manager Glyphs.void
notifyObservers
(String chgMsg) notify the Observers of a changevoid
void
paints the cached image for the MapCanvasvoid
paintMap()
redraw the map.void
paintMap
(int x, int y, int width, int height) redraw the map.void
printStatus
(String msg) print a statuc message to the UserInterface object of this MapPanelvoid
remove all maps from the MapPanelvoid
removeManagerMap
(MapObjectInterface mapObject) boolean
removeMap
(MapIdentifier mapId) remove the map identified by mapid from the MapPanelboolean
remove the map from this MapPanelvoid
remove the MapGlyphListener l from the listener listvoid
remove the maps in this MapPanelvoid
void
resetBackgroundMaps
(List mapVec) set the Background MapObjectInterface listvoid
resetManagerMaps
(List mapVec) set the Manager MapObjectInterface listvoid
resetManagerOrder
(List positionList) set the order of the List of Manager MapObjectInterface objectsvoid
reset the horizontal and vertical scroll barsscale()
get the MapPanel's MapScalevoid
scroll the vertical scrollbar down one block incrementvoid
scroll the horizontal scrollbar to the left one block incrementvoid
scroll the horizontal scrollbar to the right one block incrementprotected void
scrollTowardMax
(JScrollBar scrollbar) protected void
scrollTowardMin
(JScrollBar scrollbar) void
scrollUp()
scroll the vertical scrollbar up one block incrementvoid
setBackgroundGlyphList
(List list) set the List of Background MapObjectInterface objects.void
void
setExtents
(WorldRect e, boolean resetWkspExtents) Sets the Extents of the MapPanelvoid
setGlassPane
(JPanel glassPane) void
setGlyphList
(List newGlyphList) add static Map MapObjectInterfaces to the list of Mapsvoid
setGlyphList
(List newGlyphList, boolean saveToWksp) add static Map MapObjectInterfaces to the list of Mapsvoid
setLegendRenderer
(LegendRenderer renderer) void
setManagerGlyphList
(List list) set the List of Manager MapObjectInterface objects.void
setManagerOrder
(List positionList) Sets the ManagerOrder attribute of the MapPanel object calls setManagerOrder(positionList, true)void
setManagerOrder
(List positionList, boolean saveToWksp) Sets the ManagerOrder attribute of the MapPanel objectvoid
setMapTools
(MapToolPanel tools) Sets the current MapTools of the MapPanel objectvoid
Sets the Max Extents of the MapPanelboolean
setMouseAdapter
(String className) void
boolean
setPaintEnabled
(boolean state) Sets whether painting is enabled for the mappanelvoid
Sets the UserInterface for the MapPanel objectvoid
showAll()
zoom the MapPanel to the max extentsprotected void
void
Update region extents based on current setting of the workspaceviewport()
get the MapPanel's MapCanvasvoid
causes the Thread that calls this method to wait until the MapCanvas has finished image creation and displayed it.void
zoomByFactor
(double factor) zoom in by factorvoid
zoom the viewport to rcMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods 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, update
Methods 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, validateTree
Methods 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:
paintComponent
in 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:
actionPerformed
in interfaceActionListener
- Parameters:
e
- Description
-
adjustmentValueChanged
called when a scrollbar is moved- Specified by:
adjustmentValueChanged
in 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.MapObject
s
-
getVerticalScrollBarWidth
public int getVerticalScrollBarWidth() -
getHorizontalScrollBarHeight
public int getHorizontalScrollBarHeight() -
getViewportPanel
-