|
||||||||||
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.gui.DistQuickTool.MouseMode
public class DistQuickTool.MouseMode
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.bbn.openmap.event.AbstractMouseMode |
---|
AbstractMouseMode.MouseWheelTimerListener |
Field Summary | |
---|---|
static java.lang.String |
AllUnitsPropertyValue
Special units value for displaying all units ... |
protected java.lang.String |
coordString
|
java.text.DecimalFormat |
df
|
double |
distance
Distance of the current segment |
protected OMGraphicList |
distanceList
|
static java.lang.String |
modeID
|
boolean |
mousePressed
Flag, true if the mouse has already been pressed |
protected MapMouseMode |
proxyParent
|
java.awt.geom.Point2D |
rPoint1
rPoint1 is the anchor point of a line segment |
java.awt.geom.Point2D |
rPoint2
rPoint2 is the new (current) point of a line segment |
java.util.Vector<java.awt.geom.Point2D> |
segments
Vector to store all distance segments, first point and last point pairs |
static java.lang.String |
ShowAngleProperty
|
static java.lang.String |
ShowCircleProperty
|
protected BufferedMapBean |
theMap
|
double |
totalDistance
The cumulative distance from the first mouse click |
static java.lang.String |
UnitProperty
|
Fields inherited from class com.bbn.openmap.event.CoordMouseMode |
---|
coordFormatter, coordFormatterHandler, CoordFormatterProperty, infoDelegator |
Fields inherited from class com.bbn.openmap.OMComponent |
---|
i18n, propertyPrefix |
Fields inherited from class com.bbn.openmap.MapHandlerChild |
---|
beanContextChildSupport, isolated |
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Constructor Summary | |
---|---|
DistQuickTool.MouseMode()
|
Method Summary | |
---|---|
void |
cleanUp()
Reset the segments and distances |
protected java.lang.String |
createDistanceInformationLine(java.awt.geom.Point2D llp,
double distance,
double azimuth)
|
protected BufferedMapBean |
getBufferedMapBean(java.awt.event.MouseEvent evt)
Checks the MouseEvent to see if a BufferedMapBean can be found. |
java.util.Properties |
getProperties(java.util.Properties props)
PropertyConsumer method, to fill in a Properties object, reflecting the current values of the OMComponent. |
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. |
double |
getSphericalAzimuth(double phi1,
double lambda0,
double phi,
double lambda)
Return the azimuth angle in decimal degrees from north. |
Length |
getUnit()
Return the unit of distance being displayed: Length.NM, Length.KM or Length.MILE. |
void |
go(MapMouseMode proxyParent)
|
boolean |
isDisplayCircle()
|
boolean |
isShowAngle()
|
void |
listenerPaint(java.lang.Object source,
java.awt.Graphics g)
PaintListener interface, notifying the MouseMode that the MapBean has repainted itself. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Invoked when the mouse has been clicked on a component. |
void |
mouseDragged(java.awt.event.MouseEvent arg0)
Fires a mouse location to the InformationDelegator, and then calls the super class method which calls the MouseSupport method. |
void |
mousePressed(java.awt.event.MouseEvent e)
Process a mouse pressed event. |
void |
mouseReleased(java.awt.event.MouseEvent arg0)
Invoked when a mouse button has been released on a component. |
void |
paintCircle(java.awt.geom.Point2D pt1,
java.awt.geom.Point2D pt2)
Draw a rubberband circle between two points |
void |
paintLine(java.awt.geom.Point2D pt1,
java.awt.geom.Point2D pt2)
Draw a rubberband line between two points |
void |
paintRubberband(java.awt.geom.Point2D pt1,
java.awt.geom.Point2D pt2,
java.lang.String coordString)
Draw a rubberband line and circle between two points |
void |
paintText(java.awt.geom.Point2D base,
java.awt.geom.Point2D pt1,
java.lang.String coordString)
|
void |
projectionChanged(ProjectionEvent e)
Invoked when there has been a fundamental change to the Map. |
protected void |
reset()
|
void |
setDisplayCircle(boolean displayCircle)
|
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Sets the properties for the OMComponent. |
void |
setShowAngle(boolean showAngle)
|
void |
setUnit(Length units)
Set the unit of distance to be displayed: Length.NM, Length.KM or Length.MILE. |
Methods inherited from class com.bbn.openmap.event.CoordMouseMode |
---|
findAndInit, findAndUndo, fireMouseLocation, getCoordFormatter, getCoordFormatterHandler, getInfoDelegator, mouseMoved, propertyChange, setActive, setCoordFormatter, setCoordFormatterHandler, setInfoDelegator |
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, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String UnitProperty
public static final java.lang.String ShowCircleProperty
public static final java.lang.String ShowAngleProperty
public static final transient java.lang.String modeID
public transient java.text.DecimalFormat df
public java.awt.geom.Point2D rPoint1
public java.awt.geom.Point2D rPoint2
public boolean mousePressed
public java.util.Vector<java.awt.geom.Point2D> segments
public double distance
public double totalDistance
public static final java.lang.String AllUnitsPropertyValue
protected BufferedMapBean theMap
protected java.lang.String coordString
protected OMGraphicList distanceList
protected MapMouseMode proxyParent
Constructor Detail |
---|
public DistQuickTool.MouseMode()
Method Detail |
---|
public void setProperties(java.lang.String prefix, java.util.Properties props)
OMComponent
setProperties
in interface PropertyConsumer
setProperties
in class CoordMouseMode
prefix
- the token to prefix the property namesprops
- the Properties
objectpublic java.util.Properties getProperties(java.util.Properties props)
OMComponent
getProperties
in interface PropertyConsumer
getProperties
in class CoordMouseMode
props
- a Properties object to load the PropertyConsumer properties
into. If props equals null, then a new Properties object should be
created.
public java.util.Properties getPropertyInfo(java.util.Properties props)
OMComponent
getPropertyInfo
in interface PropertyConsumer
getPropertyInfo
in class CoordMouseMode
props
- a Properties object to load the PropertyConsumer properties
into. If getList equals null, then a new Properties object should
be created.
protected BufferedMapBean getBufferedMapBean(java.awt.event.MouseEvent evt)
evt
- MouseEvent, or a MapMouseEvent
public void mouseDragged(java.awt.event.MouseEvent arg0)
CoordMouseMode
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class CoordMouseMode
arg0
- mouse event.The first click for drag, the image is generated. This image is
redrawing when the mouse is move, but, I need to repain the
original image.
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class AbstractMouseMode
e
- mouse event.public void mouseClicked(java.awt.event.MouseEvent e)
AbstractMouseMode
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class AbstractMouseMode
e
- MouseEventpublic void mouseReleased(java.awt.event.MouseEvent arg0)
AbstractMouseMode
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class AbstractMouseMode
arg0
- MouseEventMake Pan event for the map.
public void go(MapMouseMode proxyParent)
protected void reset()
public void listenerPaint(java.lang.Object source, java.awt.Graphics g)
listenerPaint
in interface PaintListener
listenerPaint
in class AbstractMouseMode
source
- the source object, may be null, you need to check.g
- the graphics to paint into.public void projectionChanged(ProjectionEvent e)
ProjectionListener
Layers are expected to recompute their graphics (if this makes
sense), and then repaint()
themselves.
projectionChanged
in interface ProjectionListener
e
- ProjectionEventpublic void paintRubberband(java.awt.geom.Point2D pt1, java.awt.geom.Point2D pt2, java.lang.String coordString)
pt1
- the anchor point.pt2
- the current (mouse) position.public void paintLine(java.awt.geom.Point2D pt1, java.awt.geom.Point2D pt2)
pt1
- the anchor point.pt2
- the current (mouse) position.public void paintText(java.awt.geom.Point2D base, java.awt.geom.Point2D pt1, java.lang.String coordString)
public void paintCircle(java.awt.geom.Point2D pt1, java.awt.geom.Point2D pt2)
pt1
- the anchor point.pt2
- the current (mouse) position.public void cleanUp()
public double getSphericalAzimuth(double phi1, double lambda0, double phi, double lambda)
phi1
- latitude in decimal degrees of start pointlambda0
- longitude in decimal degrees of start pointphi
- latitude in decimal degrees of end pointlambda
- longitude in decimal degrees of end point
protected java.lang.String createDistanceInformationLine(java.awt.geom.Point2D llp, double distance, double azimuth)
public void setUnit(Length units)
public boolean isShowAngle()
public void setShowAngle(boolean showAngle)
public boolean isDisplayCircle()
public void setDisplayCircle(boolean displayCircle)
public Length getUnit()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |