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, 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
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.AbstractMouseMode |
actAsProxyFor, actAsProxyFor, addMapMouseListener, getGUIIcon, getID, getModeCursor, getMouseSupport, getPrettyName, getProperties, getPropertyInfo, getProxyDistributionMask, isConsumeEvents, isProxyFor, isVisible, mouseClicked, releaseProxy, removeAllMapMouseListeners, removeMapMouseListener, setConsumeEvents, setGUIIcon, setID, setModeCursor, setMouseSupport, setPrettyName, setProperties, setProxyDistributionMask, setVisible |
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 |
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.
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