## com.bbn.openmap.event
Class DefaultOverviewMouseMode

    java.lang.Object
      com.bbn.openmap.MapHandlerChild
          com.bbn.openmap.OMComponent
              com.bbn.openmap.event.AbstractMouseMode
                  com.bbn.openmap.event.CoordMouseMode
                      com.bbn.openmap.event.NavMouseMode
                          com.bbn.openmap.event.NavMouseMode2
                              com.bbn.openmap.event.DefaultOverviewMouseMode

All Implemented Interfaces:
  java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener, LightMapHandlerChild, MapMouseMode, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, PaintListener, PropertyConsumer, java.io.Serializable

public class DefaultOverviewMouseMode
extends NavMouseMode2

A MouseMode that handles drawing a box, or clicking on a point, but directs the updates to the ControlledMapSupport of the overview map handler, instead of the overview MapBean, which would have been the normal behavior.

See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class com.bbn.openmap.event.AbstractMouseMode
`AbstractMouseMode.MouseWheelZoomEditor`

Field Summary

Fields inherited from class com.bbn.openmap.event.NavMouseMode
`autoZoom, modeID, point1, point2`

Fields inherited from class com.bbn.openmap.event.CoordMouseMode
`infoDelegator`

Fields inherited from class com.bbn.openmap.event.AbstractMouseMode
`cursor, CursorIDProperty, df, guiIcon, iconName, IconProperty, ID, IDProperty, mouseSupport, MouseWheelZoomProperty, prettyName, PrettyNameProperty, visible, ZOOM_IN, ZOOM_OUT, zoomWhenMouseWheelUp`

Fields inherited from class com.bbn.openmap.OMComponent
`i18n, propertyPrefix`

Fields inherited from class com.bbn.openmap.MapHandlerChild
`beanContextChildSupport`

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

Constructor Summary
`DefaultOverviewMouseMode(OverviewMapHandler omh)` Construct a OverviewMouseMode.

Method Summary
`protected java.awt.Point` `getRatioPoint(MapBean map, java.awt.Point pt1, java.awt.Point pt2)` Given a MapBean, which provides the projection, and the starting point of a box (pt1), look at pt2 to see if it represents the ratio of the projection map size.
`void` `mouseReleased(java.awt.event.MouseEvent e)` Handle a mouseReleased MouseListener event.

Methods inherited from class com.bbn.openmap.event.NavMouseMode2
`paintRectangle`

Methods inherited from class com.bbn.openmap.event.NavMouseMode
`listenerPaint, mouseClicked, mouseDragged, mouseEntered, mouseExited, mousePressed, paintRectangle`

Methods inherited from class com.bbn.openmap.event.CoordMouseMode
`createCoordinateInformationLine, findAndInit, findAndUndo, fireMouseLocation, getInfoDelegator, mouseMoved, setActive, setInfoDelegator`

Methods inherited from class com.bbn.openmap.event.AbstractMouseMode

`actAsProxyFor, actAsProxyFor, addMapMouseListener, getClassToUseForIconRetrieval, getGUIIcon, getIconName, getID, getModeCursor, getMouseSupport, getPrettyName, getProperties, getPropertyInfo, getProxyDistributionMask, isConsumeEvents, isProxyFor, isVisible, isZoomWhenMouseWheelUp, mouseWheelMoved, releaseProxy, removeAllMapMouseListeners, removeMapMouseListener, setConsumeEvents, setGUIIcon, setIconName, setID, setModeCursor, setModeCursor, setMouseSupport, setPrettyName, setProperties, setProxyDistributionMask, setVisible, setZoomWhenMouseWheelUp`

Methods inherited from class com.bbn.openmap.OMComponent
`getPropertyPrefix, setProperties, setPropertyPrefix`

Methods inherited from class com.bbn.openmap.MapHandlerChild
`addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, firePropertyChange, fireVetoableChange, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext`

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

Constructor Detail

### DefaultOverviewMouseMode

    public DefaultOverviewMouseMode(OverviewMapHandler omh)

  Construct a OverviewMouseMode. Sets the ID of the mode to the modeID, the consume mode to true, and the cursor to the crosshair.

Method Detail

### mouseReleased

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

  Handle a mouseReleased MouseListener event. If there was no drag events, or if there was only a small amount of dragging between the occurence of the mousePressed and this event, then recenter the source map. Otherwise we get the second corner of the navigation rectangle and try to figure out the best scale and location to zoom in to based on that rectangle.

  Specified by:
    `mouseReleased` in interface `java.awt.event.MouseListener`
  Overrides:
    `mouseReleased` in class `NavMouseMode2`
  Parameters:
    `e` - MouseEvent to be handled

### getRatioPoint

    protected java.awt.Point getRatioPoint(MapBean map,
                                           java.awt.Point pt1,
                                           java.awt.Point pt2)

  Given a MapBean, which provides the projection, and the starting point of a box (pt1), look at pt2 to see if it represents the ratio of the projection map size. If it doesn't, provide a point that does.

  Overrides:
    `getRatioPoint` in class `NavMouseMode`

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