## com.bbn.openmap.layer.location
Class LocationLayer

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  com.bbn.openmap.Layer
                      com.bbn.openmap.layer.location.LocationLayer

All Implemented Interfaces:
  java.awt.event.ActionListener, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener, java.awt.image.ImageObserver, MapMouseListener, java.awt.MenuContainer, ProjectionListener, ProjectionPainter, PropertyConsumer, java.io.Serializable

Direct Known Subclasses:
  TimerLocationLayer

public class LocationLayer
extends Layer
implements MapMouseListener

The LocationLayer is a layer that displays graphics supplied by LocationHandlers. When the layer receives a new projection, it goes to each LocationHandler and asks it for additions to the layer's graphic list. The LocationHandlers maintain the graphics, and the layer maintains the overall list. The whole idea behind locations is that there are geographic places that are to be marked with a graphic, and/or a text label. The location handler handles the interface with the source and type of location to be displayed, and the LocationLayer deals with all the locations in a generic way. The LocationLayer is capable of using more than one LocationHandler.

As a side note, a Link is nothing more than a connection between Locations, and is an extension of the Location Class. They have a graphic representing the link, an optional label, and an extra set of location coordinates.

The layer responds to gestures with pop-up menus. Which menu appears depends if the gesture affects a graphic.

The properties for this layer are:

       ####################################
       # Properties for LocationLayer
       # Use the DeclutterMatrix to declutter the labels.
       locationlayer.useDeclutter=false
       # Which declutter matrix class to use.
       locationlayer.declutterMatrix=com.bbn.openmap.layer.DeclutterMatrix
       # Let the DeclutterMatrix have labels that run off the edge of the map.
       locationlayer.allowPartials=true
       # The list of location handler prefixes - each prefix should then
       # be used to further define the location handler properties.
       locationlayer.locationHandlers=handler1 handler2
       # Then come the handler properties...
       # At the least, each handler should have a .class property
       handler1.class=<handler classname>
       # plus any other properties handler1 needs - check the handler1 documentation.
       ####################################

See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Nested classes inherited from class java.awt.Container
`java.awt.Container.AccessibleAWTContainer`

Nested classes inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

Field Summary
`protected boolean` `allowPartials` Flag to let objects appear partially off the edges of the map, when decluttering through the decluterr matrix.
`static java.lang.String` `AllowPartialsProperty`
`protected LocationPopupMenu` `backgroundMenu` What pops up if someone clicks on the background.
`protected javax.swing.Box` `box`
`static java.lang.String` `cancel`
`protected boolean` `cancelled` Set when the projection has changed while a swing worker is gathering graphics, and we want him to stop early.
`protected com.bbn.openmap.layer.location.LocationLayer.LocationWorker` `currentWorker` The swing worker that goes off in it's own thread to get graphics.
`protected java.lang.String[]` `dataHandlerNames` Pretty names for the handlers, for GUIs and such.
`protected LocationHandler[]` `dataHandlers` Handlers load the data, and manage it for the layer.
`protected DeclutterMatrix` `declutterMatrix` The declutter matrix to use, if desired.
`static java.lang.String` `DeclutterMatrixClassProperty`
`static java.lang.String` `LocationHandlerListProperty`
`protected LocationPopupMenu` `locMenu` What pops up if someone clicks on a location.
`protected MapBean` `map` Used for recentering commands off the pop-up menu.
`protected java.util.Vector` `omGraphics` The graphic list of objects to draw.
`static java.lang.String` `recenter`
`protected boolean` `useDeclutterMatrix` Flag to use declutter matrix or not.
`static java.lang.String` `UseDeclutterMatrixProperty`

Fields inherited from class com.bbn.openmap.Layer

`addAsBackground, AddAsBackgroundProperty, addToBeanContext, AddToBeanContextProperty, attributes, autoPalette, AutoPaletteProperty, beanContextChildSupport, DisplayPaletteCmd, DisplayPropertiesCmd, doHack, HidePaletteCmd, i18n, IDListeners, localHackList, lsListeners, maxScale, MaxScaleProperty, minScale, MinScaleProperty, palette, paletteListener, PrettyNameProperty, propertyPrefix, RedrawCmd, removable, RemovableProperty, SWING_PACKAGE, windowSupport`

Fields inherited from class javax.swing.JComponent
`accessibleContext, 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
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Fields inherited from interface com.bbn.openmap.PropertyConsumer
`EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`LocationLayer()` The default constructor for the Layer.

Method Summary
`protected WindowSupport` `createWindowSupport()` Overridden from Layer because we are placing our own scroll pane around the LocationHandler GUIs.
`void` `doPrepare()` A method that will launch a Worker to fetch the data.
`Location` `findClosestLocation(java.awt.event.MouseEvent evt)` Given a mouse event, find the closest location on the screen.
`DeclutterMatrix` `getDeclutterMatrix()`
`java.util.Vector` `getGraphicList()` Retrieves a vector of the current graphics list.
`java.awt.Component` `getGUI()` Provides the palette widgets to control the options of showing maps, or attribute text.
`java.lang.String[]` `getLocationHandlerNames()` Get the LocationHandlers for this layer.
`LocationHandler[]` `getLocationHandlers()` Get the LocationHandlers for this layer.
`MapMouseListener` `getMapMouseListener()` Returns the MapMouseListener object that handles the mouse events.
`java.lang.String[]` `getMouseModeServiceList()` Return a list of the modes that are interesting to the MapMouseListener.
`java.util.Properties` `getProperties(java.util.Properties props)` PropertyConsumer method, to fill in a Properties object, reflecting the current values of the layer.
`java.util.Properties` `getPropertyInfo(java.util.Properties list)` Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer.
`boolean` `getUseDeclutterMatrix()`
`boolean` `isCancelled()` Check to see if the cancelled flag has been set.
`boolean` `mouseClicked(java.awt.event.MouseEvent evt)` Invoked when the mouse has been clicked on a component.
`boolean` `mouseDragged(java.awt.event.MouseEvent e)` Invoked when a mouse button is pressed on a component and then dragged.
`void` `mouseEntered(java.awt.event.MouseEvent e)` Invoked when the mouse enters a component.
`void` `mouseExited(java.awt.event.MouseEvent e)` Invoked when the mouse exits a component.
`void` `mouseMoved()` Handle a mouse cursor moving without the button being pressed.
`boolean` `mouseMoved(java.awt.event.MouseEvent evt)` Invoked when the mouse button has been moved on a component (with no buttons down).
`boolean` `mousePressed(java.awt.event.MouseEvent evt)` Invoked when a mouse button has been pressed on a component.
`boolean` `mouseReleased(java.awt.event.MouseEvent e)` Invoked when a mouse button has been released on a component.
`void` `paint(java.awt.Graphics g)` Paints the layer.
`java.util.Vector` `prepare()` Prepares the graphics for the layer.
`void` `projectionChanged(ProjectionEvent e)` The projectionListener interface method that lets the Layer know when the projection has changes, and therefore new graphics have to created /supplied for the screen.
`void` `reloadData()` Tell the location handlers to reload their data from their sources.
`void` `removed(java.awt.Container cont)` Let the LocationHandlers know that the layer has been removed.
`void` `renderDataForProjection(Projection proj, java.awt.Graphics g)` Implementing the ProjectionPainter interface.
`protected void` `resetPalette()` Called when the LocationHandlers are reset, or their names are reset, to refresh the palette with the new information.
`void` `setCancelled(boolean set)` Used to set the cancelled flag in the layer.
`void` `setDeclutterMatrix(DeclutterMatrix dm)`
`void` `setGraphicList(java.util.Vector aList)` Sets the current graphics list to the given list.
`void` `setLocationHandlerNames(java.lang.String[] handlerNames)` Set the LocationHandler names suitable for a GUI.
`void` `setLocationHandlers(LocationHandler[] handlers)` Set the LocationHandlers for the layer.
`protected void` `setLocationHandlers(java.lang.String prefix, java.util.Properties p)` Parse the properties and set up the location handlers.
`void` `setProperties(java.lang.String prefix, java.util.Properties properties)` The properties and prefix are managed and decoded here, for the standard uses of the LocationLayer.
`void` `setUseDeclutterMatrix(boolean set)`
`protected void` `showLocationPopup(java.awt.event.MouseEvent evt, Location loc, MapBean map)`
`protected void` `showMapPopup(java.awt.event.MouseEvent evt, MapBean map)`
`protected void` `workerComplete(com.bbn.openmap.layer.location.LocationLayer.LocationWorker worker)` The LocationWorker calls this method on the layer when it is done working.

Methods inherited from class com.bbn.openmap.Layer

`actionPerformed, addComponentListener, added, addInfoDisplayListener, addLayerStatusListener, addMouseListener, addVetoableChangeListener, childrenAdded, childrenRemoved, clearListeners, connectToBeanContext, finalize, findAndInit, findAndInit, findAndUndo, fireHideToolTip, firePaletteEvent, fireRequestBrowserContent, fireRequestBrowserContent, fireRequestCursor, fireRequestInfoLine, fireRequestInfoLine, fireRequestInfoLine, fireRequestMessage, fireRequestMessage, fireRequestToolTip, fireRequestToolTip, fireRequestURL, fireRequestURL, fireStatusUpdate, fireStatusUpdate, fireVetoableChange, getAddAsBackground, getAddToBeanContext, getAttribute, getBeanContext, getIcon, getMaxScale, getMinScale, getPackage, getPalette, getProjection, getPropertyPrefix, getWindowSupport, hasGUI, hidePalette, isAutoPalette, isProjectionOK, isRemovable, notifyHideHack, putAttribute, removeComponentListener, removeConfirmed, removeInfoDisplayListener, removeLayerStatusListener, removeVetoableChangeListener, repaint, setAddAsBackground, setAddToBeanContext, setAutoPalette, setBeanContext, setIcon, setMaxScale, setMinScale, setName, setPaletteVisible, setProjection, setProjection, setProperties, setPropertyPrefix, setRemovable, setVisible, setWindowSupport, showPalette`

Methods inherited from class javax.swing.JComponent

`addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update, updateUI`

Methods inherited from class java.awt.Container

`add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree`

Methods inherited from class java.awt.Component

`action, add, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.beans.beancontext.BeanContextChild
`addPropertyChangeListener, removePropertyChangeListener`

Field Detail

### declutterMatrix

    protected DeclutterMatrix declutterMatrix

  The declutter matrix to use, if desired.

### useDeclutterMatrix

    protected boolean useDeclutterMatrix

  Flag to use declutter matrix or not.

### allowPartials

    protected boolean allowPartials

  Flag to let objects appear partially off the edges of the map, when decluttering through the decluterr matrix.

### omGraphics

    protected java.util.Vector omGraphics

  The graphic list of objects to draw.

### dataHandlers

    protected LocationHandler[] dataHandlers

  Handlers load the data, and manage it for the layer.

### dataHandlerNames

    protected java.lang.String[] dataHandlerNames

  Pretty names for the handlers, for GUIs and such.

### map

    protected MapBean map

  Used for recentering commands off the pop-up menu.

### backgroundMenu

    protected LocationPopupMenu backgroundMenu

  What pops up if someone clicks on the background. The handler is responsible for suppling the pop-up menu when one of its objects is selected.

### locMenu

    protected LocationPopupMenu locMenu

  What pops up if someone clicks on a location.

### recenter

    public static final java.lang.String recenter

See Also:
  Constant Field Values

### cancel

    public static final java.lang.String cancel

See Also:
  Constant Field Values

### UseDeclutterMatrixProperty

    public static final java.lang.String UseDeclutterMatrixProperty

See Also:
  Constant Field Values

### DeclutterMatrixClassProperty

    public static final java.lang.String DeclutterMatrixClassProperty

See Also:
  Constant Field Values

### AllowPartialsProperty

    public static final java.lang.String AllowPartialsProperty

See Also:
  Constant Field Values

### LocationHandlerListProperty

    public static final java.lang.String LocationHandlerListProperty

See Also:
  Constant Field Values

### currentWorker

    protected com.bbn.openmap.layer.location.LocationLayer.LocationWorker currentWorker

  The swing worker that goes off in it's own thread to get graphics.

### cancelled

    protected boolean cancelled

  Set when the projection has changed while a swing worker is gathering graphics, and we want him to stop early.

### box

    protected javax.swing.Box box

Constructor Detail

### LocationLayer

    public LocationLayer()

  The default constructor for the Layer. All of the attributes are set to their default values.

Method Detail

### setProperties

    public void setProperties(java.lang.String prefix,
                              java.util.Properties properties)

  The properties and prefix are managed and decoded here, for the standard uses of the LocationLayer.

  Specified by:
    `setProperties` in interface `PropertyConsumer`
  Overrides:
    `setProperties` in class `Layer`
  Parameters:
    `prefix` - string prefix used in the properties file for this layer.
    `properties` - the properties set in the properties file.

### setGraphicList

    public void setGraphicList(java.util.Vector aList)

  Sets the current graphics list to the given list.

  Parameters:
    `aList` - a vector of OMGraphics

### getGraphicList

    public java.util.Vector getGraphicList()

  Retrieves a vector of the current graphics list.

  Returns:
    vector of OMGraphics.

### setDeclutterMatrix

    public void setDeclutterMatrix(DeclutterMatrix dm)

### getDeclutterMatrix

    public DeclutterMatrix getDeclutterMatrix()

### setUseDeclutterMatrix

    public void setUseDeclutterMatrix(boolean set)

### getUseDeclutterMatrix

    public boolean getUseDeclutterMatrix()

### setCancelled

    public void setCancelled(boolean set)

  Used to set the cancelled flag in the layer. The swing worker checks this once in a while to see if the projection has changed since it started working. If this is set to true, the swing worker quits when it is safe.

### isCancelled

    public boolean isCancelled()

  Check to see if the cancelled flag has been set.

### getMapMouseListener

    public MapMouseListener getMapMouseListener()

  Description copied from class: `Layer`
  Returns the MapMouseListener object that handles the mouse events. This method is IGNORED in this class: it returns null. Derived Layers should return the appropriate object if they desire to receive MouseEvents. The easiest thing for a Layer to do in order to receive MouseEvents is to implement the MapMouseListener interface and return itself. A code snippet: `

       public MapMouseListener getMapMouseListener() {
           return this;
       }

       public String[] getMouseModeServiceList() {
           return new String[] { SelectMouseMode.modeID };
       }

  `

  Overrides:
    `getMapMouseListener` in class `Layer`
  Returns:
    null

### reloadData

    public void reloadData()

  Tell the location handlers to reload their data from their sources. If you want these changes to appear on the map, you should call doPrepare() after this call.

### renderDataForProjection

    public void renderDataForProjection(Projection proj,
                                        java.awt.Graphics g)

  Implementing the ProjectionPainter interface.

  Specified by:
    `renderDataForProjection` in interface `ProjectionPainter`
  Overrides:
    `renderDataForProjection` in class `Layer`
  Parameters:
    `proj` - Projection of the map.
    `g` - java.awt.Graphics to draw into.

### projectionChanged

    public void projectionChanged(ProjectionEvent e)

  The projectionListener interface method that lets the Layer know when the projection has changes, and therefore new graphics have to created /supplied for the screen.

  Specified by:
    `projectionChanged` in interface `ProjectionListener`
  Parameters:
    `e` - The projection event, most likely fired from a map bean.

### workerComplete

    protected void workerComplete(com.bbn.openmap.layer.location.LocationLayer.LocationWorker worker)

  The LocationWorker calls this method on the layer when it is done working. If the calling worker is not the same as the "current" worker, then a new worker is created.

  Parameters:
    `worker` - the worker that has the graphics.

### doPrepare

    public void doPrepare()

  A method that will launch a Worker to fetch the data. This is the method to call if you want the layer to refresh it's graphics from the location handlers. The layer will repaint itself automatically.

### prepare

    public java.util.Vector prepare()

  Prepares the graphics for the layer. This is where the getRectangle() method call is made on the location.

  Occasionally it is necessary to abort a prepare call. When this happens, the map will set the cancel bit in the LayerThread, (the thread that is running the prepare). If this Layer needs to do any cleanups during the abort, it should do so, but return out of the prepare asap.

### paint

    public void paint(java.awt.Graphics g)

  Paints the layer.

  Parameters:
    `g` - the Graphics context for painting

### setLocationHandlers

    protected void setLocationHandlers(java.lang.String prefix,
                                       java.util.Properties p)

  Parse the properties and set up the location handlers. The prefix will should be null, or a prefix string with a period at the end, for scoping purposes.

### removed

    public void removed(java.awt.Container cont)

  Let the LocationHandlers know that the layer has been removed.

  Overrides:
    `removed` in class `Layer`
  Parameters:
    `cont` - Container

### setLocationHandlers

    public void setLocationHandlers(LocationHandler[] handlers)

  Set the LocationHandlers for the layer. Make sure you update the LocationHandler names, too, so the names coorespond to these.

  Parameters:
    `handlers` - an array of LocationHandlers.

### getLocationHandlers

    public LocationHandler[] getLocationHandlers()

  Get the LocationHandlers for this layer.

### setLocationHandlerNames

    public void setLocationHandlerNames(java.lang.String[] handlerNames)

  Set the LocationHandler names suitable for a GUI. Make sure these end up cooresponding to the LocationHandlers.

  Parameters:
    `handlerNames` - an array of Strings.

### getLocationHandlerNames

    public java.lang.String[] getLocationHandlerNames()

  Get the LocationHandlers for this layer.

### resetPalette

    protected void resetPalette()

  Called when the LocationHandlers are reset, or their names are reset, to refresh the palette with the new information.

  Overrides:
    `resetPalette` in class `Layer`

### createWindowSupport

    protected WindowSupport createWindowSupport()

  Overridden from Layer because we are placing our own scroll pane around the LocationHandler GUIs.

  Overrides:
    `createWindowSupport` in class `Layer`
  Returns:

### getGUI

    public java.awt.Component getGUI()

  Provides the palette widgets to control the options of showing maps, or attribute text.

  Overrides:
    `getGUI` in class `Layer`
  Returns:
    Component object representing the palette widgets.

### findClosestLocation

    public Location findClosestLocation(java.awt.event.MouseEvent evt)

  Given a mouse event, find the closest location on the screen.

### getMouseModeServiceList

    public java.lang.String[] getMouseModeServiceList()

  Description copied from interface: `MapMouseListener`
  Return a list of the modes that are interesting to the MapMouseListener. The source MouseEvents will only get sent to the MapMouseListener if the mode is set to one that the listener is interested in. Layers interested in receiving events should register for receiving events in "select" mode: `

       return new String[] { SelectMouseMode.modeID };

  `

  ``
  Specified by:
    `getMouseModeServiceList` in interface `MapMouseListener`
  Returns:
    String[] of modeID's
  See Also:
    `NavMouseMode.modeID`, `SelectMouseMode.modeID`, `NullMouseMode.modeID`

### showMapPopup

    protected void showMapPopup(java.awt.event.MouseEvent evt,
                                MapBean map)

### showLocationPopup

    protected void showLocationPopup(java.awt.event.MouseEvent evt,
                                     Location loc,
                                     MapBean map)

### mousePressed

    public boolean mousePressed(java.awt.event.MouseEvent evt)

  Description copied from interface: `MapMouseListener`
  Invoked when a mouse button has been pressed on a component.

  Specified by:
    `mousePressed` in interface `MapMouseListener`
  Parameters:
    `evt` - MouseEvent
  Returns:
    true if the listener was able to process the event.

### mouseReleased

    public boolean mouseReleased(java.awt.event.MouseEvent e)

  Description copied from interface: `MapMouseListener`
  Invoked when a mouse button has been released on a component.

  Specified by:
    `mouseReleased` in interface `MapMouseListener`
  Parameters:
    `e` - MouseEvent
  Returns:
    true if the listener was able to process the event.

### mouseClicked

    public boolean mouseClicked(java.awt.event.MouseEvent evt)

  Description copied from interface: `MapMouseListener`
  Invoked when the mouse has been clicked on a component. The listener will receive this event if it successfully processed `mousePressed()`, or if no other listener processes the event. If the listener successfully processes `mouseClicked()`, then it will receive the next `mouseClicked()` notifications that have a click count greater than one.

  NOTE: We have noticed that this method can sometimes be erroneously invoked. It seems to occur when a light-weight AWT component (like an internal window or menu) closes (removes itself from the window hierarchy). A specific OpenMap example is when you make a menu selection when the MenuItem you select is above the MapBean canvas. After making the selection, the mouseClicked() gets invoked on the MouseDelegator, which passes it to the appropriate listeners depending on the MouseMode. The best way to avoid this problem is to not implement anything crucial in this method. Use a combination of `mousePressed()` and `mouseReleased()` instead.

  Specified by:
    `mouseClicked` in interface `MapMouseListener`
  Parameters:
    `evt` - MouseEvent
  Returns:
    true if the listener was able to process the event.

### mouseEntered

    public void mouseEntered(java.awt.event.MouseEvent e)

  Description copied from interface: `MapMouseListener`
  Invoked when the mouse enters a component.

  Specified by:
    `mouseEntered` in interface `MapMouseListener`
  Parameters:
    `e` - MouseEvent

### mouseExited

    public void mouseExited(java.awt.event.MouseEvent e)

  Description copied from interface: `MapMouseListener`
  Invoked when the mouse exits a component.

  Specified by:
    `mouseExited` in interface `MapMouseListener`
  Parameters:
    `e` - MouseEvent

### mouseDragged

    public boolean mouseDragged(java.awt.event.MouseEvent e)

  Description copied from interface: `MapMouseListener`
  Invoked when a mouse button is pressed on a component and then dragged. The listener will receive these events if it successfully processes mousePressed(), or if no other listener processes the event.

  Specified by:
    `mouseDragged` in interface `MapMouseListener`
  Parameters:
    `e` - MouseEvent
  Returns:
    true if the listener was able to process the event.

### mouseMoved

    public boolean mouseMoved(java.awt.event.MouseEvent evt)

  Description copied from interface: `MapMouseListener`
  Invoked when the mouse button has been moved on a component (with no buttons down).

  Specified by:
    `mouseMoved` in interface `MapMouseListener`
  Parameters:
    `evt` - MouseEvent
  Returns:
    true if the listener was able to process the event.

### mouseMoved

    public void mouseMoved()

  Description copied from interface: `MapMouseListener`
  Handle a mouse cursor moving without the button being pressed. This event is intended to tell the listener that there was a mouse movement, but that the event was consumed by another layer. This will allow a mouse listener to clean up actions that might have happened because of another motion event response.

  Specified by:
    `mouseMoved` in interface `MapMouseListener`

### getProperties

    public java.util.Properties getProperties(java.util.Properties props)

  PropertyConsumer method, to fill in a Properties object, reflecting the current values of the layer. If the layer has a propertyPrefix set, the property keys should have that prefix plus a separating '.' prepended to each propery key it uses for configuration.

  Specified by:
    `getProperties` in interface `PropertyConsumer`
  Overrides:
    `getProperties` in class `Layer`
  Parameters:
    `props` - a Properties object to load the PropertyConsumer properties into. If props equals null, then a new Properties object should be created.
  Returns:
    Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

### getPropertyInfo

    public java.util.Properties getPropertyInfo(java.util.Properties list)

  Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. The key for each property should be the raw property name (without a prefix) with a value that is a String that describes what the property key represents, along with any other information about the property that would be helpful (range, default value, etc.). For Layer, this method should at least return the 'prettyName' property.

  Specified by:
    `getPropertyInfo` in interface `PropertyConsumer`
  Overrides:
    `getPropertyInfo` in class `Layer`
  Parameters:
    `list` - a Properties object to load the PropertyConsumer properties into. If getList equals null, then a new Properties object should be created.
  Returns:
    Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details