|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
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
The Navigation Mouse Mode interprets mouse clicks and mouse drags to recenter and rescale the map. The map is centered on the location where a click occurs. If a box is drawn by clicking down and dragging the mouse, the map is centered on the dot in the center of the box, and the scale is adjusted so the screen fills the area designated by the box.
You MUST add this MouseMode as a ProjectionListener to the MapBean to get it to work. If you use a MouseDelegator with the bean, it will take care of that for you.
| Field Summary | |
protected boolean |
autoZoom
|
static java.lang.String |
modeID
Mouse Mode identifier, which is "Navigation". |
protected java.awt.Point |
point1
|
protected java.awt.Point |
point2
|
| Fields inherited from class com.bbn.openmap.event.CoordMouseMode |
infoDelegator |
| Fields inherited from class com.bbn.openmap.event.AbstractMouseMode |
cursor, df, guiIcon, ID, IDProperty, mouseSupport, prettyName, PrettyNameProperty, visible |
| 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 | |
NavMouseMode()
Construct a NavMouseMode. |
|
NavMouseMode(boolean shouldConsumeEvents)
Construct a NavMouseMode. |
|
| 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 |
listenerPaint(java.awt.Graphics g)
Called by the MapBean when it repaints, to let the MouseMode know when to update itself on the map. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Handle a mouseDragged MouseMotionListener event. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Handle a mouseEntered MouseListener event. |
void |
mouseExited(java.awt.event.MouseEvent e)
Handle a mouseExited MouseListener event. |
void |
mousePressed(java.awt.event.MouseEvent e)
Handle a mousePressed MouseListener event. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Handle a mouseReleased MouseListener event. |
protected void |
paintRectangle(java.awt.Graphics g,
java.awt.Point pt1,
java.awt.Point pt2)
Draws or erases boxes between two screen pixel points. |
protected void |
paintRectangle(MapBean map,
java.awt.Point pt1,
java.awt.Point pt2)
Draws or erases boxes between two screen pixel points. |
| 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, 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.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 |
| Field Detail |
public static final transient java.lang.String modeID
protected java.awt.Point point1
protected java.awt.Point point2
protected boolean autoZoom
| Constructor Detail |
public NavMouseMode()
public NavMouseMode(boolean shouldConsumeEvents)
shouldConsumeEvents - the mode setting.| Method Detail |
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenermousePressed in class AbstractMouseModee - MouseEvent to be handledpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class AbstractMouseModee - MouseEvent to be handledpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenermouseEntered in class AbstractMouseModee - MouseEvent to be handledpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenermouseExited in class AbstractMouseModee - MouseEvent to be handledpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenermouseDragged in class CoordMouseModee - MouseEvent to be handled
protected java.awt.Point getRatioPoint(MapBean map,
java.awt.Point pt1,
java.awt.Point pt2)
protected void paintRectangle(MapBean map,
java.awt.Point pt1,
java.awt.Point pt2)
pt1 - one corner of the box to drawn, in window pixel
coordinates.pt2 - the opposite corner of the box.
protected void paintRectangle(java.awt.Graphics g,
java.awt.Point pt1,
java.awt.Point pt2)
pt1 - one corner of the box to drawn, in window pixel
coordinates.pt2 - the opposite corner of the box.public void listenerPaint(java.awt.Graphics g)
listenerPaint in interface PaintListenerlistenerPaint in class AbstractMouseMode
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||