## com.bbn.openmap.layer.shape.areas
Class AreaShapeLayer

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  com.bbn.openmap.Layer
                      com.bbn.openmap.layer.OMGraphicHandlerLayer
                          com.bbn.openmap.layer.shape.ShapeLayer
                              com.bbn.openmap.layer.shape.areas.AreaShapeLayer

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

public class AreaShapeLayer
extends ShapeLayer
implements MapMouseListener

A Layer to use an AreaHandler to display geographic regions on OpenMap. See the AreaHandler for more information on how to set this layer up.

See Also:
  `AreaHandler`, 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 AreaHandler` `areas`

Fields inherited from class com.bbn.openmap.layer.shape.ShapeLayer
`box, coordTransform, drawingAttributes, pointImageURLProperty, shadowX, shadowXProperty, shadowY, shadowYProperty, shapeFileProperty, spatialIndex, spatialIndexProperty, TransformProperty`

Fields inherited from class com.bbn.openmap.layer.OMGraphicHandlerLayer
`consumeEvents, ConsumeEventsProperty, filter, interruptable, InterruptableProperty, layerWorker, LAYERWORKER_LOCK, mouseEventInterpreter, mouseModeIDs, MouseModesProperty, projectionChangePolicy, ProjectionChangePolicyProperty, renderPolicy, RenderPolicyProperty, selectedList, TransparencyProperty`

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
`AreaShapeLayer()`

Method Summary
`PoliticalArea` `findPoliticalArea(java.lang.String area_abbrev)` Find a PoliticalArea named by the abbreviation
`AreaHandler` `getAreas()` Get the AreaHandler.
`DrawingAttributes` `getDrawingAttributes()`
`MapMouseListener` `getMapMouseListener()` Query asked from the MouseDelegator for interest in receiving MapMouseEvents.
`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.
`java.util.Properties` `getPropertyInfo(java.util.Properties props)` Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer.
`boolean` `mouseClicked(java.awt.event.MouseEvent e)` 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 e)` Invoked when the mouse button has been moved on a component (with no buttons down).
`boolean` `mousePressed(java.awt.event.MouseEvent e)` 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.
`OMGraphicList` `prepare()` Gets the layer graphics.
`void` `setAreas(AreaHandler a)` Set the AreaHandler.
`void` `setDrawingAttributes(DrawingAttributes da)`
`void` `setProperties(java.lang.String prefix, java.util.Properties props)` Initializes this layer from the given properties.

Methods inherited from class com.bbn.openmap.layer.shape.ShapeLayer
`actionPerformed, computeGraphics, getCoordTransform, getDataBounds, getGUI, getInfoText, getSpatialIndex, getToolTipTextFor, paint, removed, setCoordTransform, setFileProperties, setSpatialIndex`

Methods inherited from class com.bbn.openmap.layer.OMGraphicHandlerLayer

`canSetList, copy, createLayerWorker, cut, deselect, doAction, doPrepare, filter, filter, filter, getConsumeEvents, getFilter, getItemsForMapMenu, getItemsForOMGraphicMenu, getLayerWorker, getList, getMouseEventInterpreter, getMouseModeIDsForEvents, getProjectionChangePolicy, getRenderPolicy, getSelected, getTransparency, getTransparencyAdjustmentPanel, highlight, interrupt, isCancelled, isHighlightable, isInterruptable, isSelectable, isWorking, leftClick, mouseOver, paste, projectionChanged, receivesMapEvents, renderDataForProjection, resetFiltering, select, setCancelled, setConsumeEvents, setFilter, setInterruptable, setLayerWorker, setList, setMouseEventInterpreter, setMouseModeIDsForEvents, setProjectionChangePolicy, setRenderPolicy, setTransparency, supportsSQL, unhighlight, workerComplete`

Methods inherited from class com.bbn.openmap.Layer

`addComponentListener, added, addInfoDisplayListener, addLayerStatusListener, addMouseListener, addVetoableChangeListener, childrenAdded, childrenRemoved, clearListeners, connectToBeanContext, createWindowSupport, 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, resetPalette, 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 com.bbn.openmap.util.DataBoundsProvider
`getName`

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

Field Detail

### areas

    protected AreaHandler areas

Constructor Detail

### AreaShapeLayer

    public AreaShapeLayer()

Method Detail

### setProperties

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

  Initializes this layer from the given properties.

  Specified by:
    `setProperties` in interface `PropertyConsumer`
  Overrides:
    `setProperties` in class `ShapeLayer`
  Parameters:
    `props` - the `Properties` holding settings for this layer

### getProperties

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

  Description copied from class: `ShapeLayer`
  PropertyConsumer method.

  Specified by:
    `getProperties` in interface `PropertyConsumer`
  Overrides:
    `getProperties` in class `ShapeLayer`

### getPropertyInfo

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

  Description copied from class: `ShapeLayer`
  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.).

  Specified by:
    `getPropertyInfo` in interface `PropertyConsumer`
  Overrides:
    `getPropertyInfo` in class `ShapeLayer`
  Parameters:
    `props` - 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.

### setAreas

    public void setAreas(AreaHandler a)

  Set the AreaHandler.

### getAreas

    public AreaHandler getAreas()

  Get the AreaHandler.

### prepare

    public OMGraphicList prepare()

  Gets the layer graphics.

  Overrides:
    `prepare` in class `ShapeLayer`
  Returns:
    OMGraphicList

### setDrawingAttributes

    public void setDrawingAttributes(DrawingAttributes da)

  Overrides:
    `setDrawingAttributes` in class `ShapeLayer`

### getDrawingAttributes

    public DrawingAttributes getDrawingAttributes()

  Overrides:
    `getDrawingAttributes` in class `ShapeLayer`

### findPoliticalArea

    public PoliticalArea findPoliticalArea(java.lang.String area_abbrev)

  Find a PoliticalArea named by the abbreviation

### mouseMoved

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

  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:
    `e` - MouseEvent
  Returns:
    true if the listener was able to process the event.

### getMapMouseListener

    public MapMouseListener getMapMouseListener()

  Description copied from class: `OMGraphicHandlerLayer`
  Query asked from the MouseDelegator for interest in receiving MapMouseEvents. This returns a MapMouseInterpreter that has been told to listen for events from the MapMouseModes in setMouseModeIDsForEvents().

  Overrides:
    `getMapMouseListener` in class `OMGraphicHandlerLayer`

### getMouseModeServiceList

    public java.lang.String[] getMouseModeServiceList()

  Return a list of the modes that are interesting to the MapMouseListener. You MUST override this with the modes you're interested in.

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

### mousePressed

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

  Invoked when a mouse button has been pressed on a component.

  Specified by:
    `mousePressed` in interface `MapMouseListener`
  Parameters:
    `e` - MouseEvent
  Returns:
    false

### mouseReleased

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

  Invoked when a mouse button has been released on a component.

  Specified by:
    `mouseReleased` in interface `MapMouseListener`
  Parameters:
    `e` - MouseEvent
  Returns:
    false

### mouseClicked

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

  Invoked when the mouse has been clicked on a component.

  Specified by:
    `mouseClicked` in interface `MapMouseListener`
  Parameters:
    `e` - MouseEvent
  Returns:
    false

### mouseEntered

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

  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)

  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)

  Invoked when a mouse button is pressed on a component and then dragged. The listener will receive these events if it

  Specified by:
    `mouseDragged` in interface `MapMouseListener`
  Parameters:
    `e` - MouseEvent
  Returns:
    false

### mouseMoved

    public void mouseMoved()

  Handle a mouse cursor moving without the button being pressed. Another layer has consumed the event.

  Specified by:
    `mouseMoved` in interface `MapMouseListener`

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