Class TLcdMapGridRulerController
- All Implemented Interfaces:
ILcdStatusSource,ILcdGXYController,MouseListener,MouseMotionListener,Serializable,EventListener
ILcdGXYController interprets mouse events for displaying a
distance between points on the screen.
Another, more advanced, ruler controller is available as well. Please refer to
TLcdAdvancedMapRulerController.
Using this ILcdGXYController method makes sense only when the
ILcdGXYView it interacts with has a ILcdXYWorldReference
that is an instance of ILcdGridReference.
This is useful when the model reference is the same as the world reference. In that case no transformations are necessary and the expensive geodesic calculations can be avoided by using cartesian methods. It is useful only within a limited region.
If the property popupDialog is true, it pops up a Dialog in which the distance and angle of the last segment drawn, as well as the total distance of all segments are displayed.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Default constructor for aMapRulerController.TLcdMapGridRulerController(boolean aRegisterFlag) Deprecated.use the constructor without parameters.TLcdMapGridRulerController(ILcdModelReference aGridReference) Deprecated.TLcdMapGridRulerController(ILcdModelReference aGridReference, boolean aRegisterFlag) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected doublecalculateAngle(int aFromX, int aFromY, int aToX, int aToY) Deprecated.Calculates the azimuth between the model locations that are on screen at[aFromX,aFromY] and [aTox,aToY].protected doublecalculateDistance(int aFromX, int aFromY, int aToX, int aToY) Deprecated.Calculates the model distance in meters between the model locations that are on screen at[aFromX,aFromY] and [aTox,aToY].protected voiddisplayLastSegmentAngle(double aAngle, MouseEvent me) Deprecated.protected voiddisplayLastSegmentDistance(double aDistance, MouseEvent me) Deprecated.protected voiddisplayTotalDistance(double aDistance, MouseEvent me) Deprecated.protected StringformatAngle(double aAngle, MouseEvent me) Deprecated.Format the model azimuth aAngle in radians as a String.protected StringformatDistance(double aDistance, MouseEvent me) Deprecated.Format the model distance aDistance in meters as a String.Deprecated.Deprecated.ghostColor is the property that holds the color of the lines and circle that are drawn.intDeprecated.GhostLineWidth is the property that holds the width of the lines and circle that are drawn.doubleDeprecated.doubleDeprecated.doubleDeprecated.booleanDeprecated.The property drawEqualDistanceCurve determines whether to draw the circle.booleanDeprecated.The property drawGeodesicLine determines whether to draw the lines.booleanDeprecated.voidDeprecated.MouseEvent me is ignored.voidDeprecated.MouseEvent me is ignored.voidDeprecated.MouseEvent me is ignored.voidDeprecated.MouseEvent me is ignored.voidmouseMoved(MouseEvent me) Deprecated.The mouse movement causes the drawing of a line between the mouse click points on the screen and the drawing of the circle spanning the distance between the last mouse clicking point and the current position.voidDeprecated.MouseEvent me is ignored.voidDeprecated.A mouse release causes the last location to be added to the list of points that are going to be linked.voidsetActionListenerOnDoubleClick(ActionListener aActionListener) Deprecated.voidsetDrawEqualDistanceCurve(boolean aDrawEqualDistanceCurve) Deprecated.The property drawEqualDistanceCurve determines whether to draw the circle.voidsetDrawGeodesicLine(boolean newDrawGeodesicLine) Deprecated.The property drawGeodesicLine determines whether to draw the lines.voidsetGhostColor(Color aGhostColor) Deprecated.ghostColor is the property that holds the color of the lines and circle that are drawn.voidsetGhostLineWidth(int aGhostLineWidth) Deprecated.GhostLineWidth is the property that holds the width of the lines and circle that are drawn.voidsetPopupDialog(boolean aPopupDialog) Deprecated.voidstartInteraction(ILcdGXYView aGXYView) Deprecated.This method calls super.startInteraction( aGXYView ).voidterminateInteraction(ILcdGXYView aGXYView) Deprecated.Releases a few items.voidundo()Deprecated.Performs no action.Methods inherited from class com.luciad.view.gxy.controller.ALcdGXYController
addStatusListener, asGXYController, fireStatusEvent, getCursor, getGXYView, getIcon, getName, getShortDescription, isTraceOn, paint, registerInstance, removeStatusListener, retrieveGXYViewXYWorldTransformation, setClassTraceOn, setCursor, setGXYView, setIcon, setName, setShortDescription, setTraceOn, viewRepaintMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.view.gxy.ILcdGXYController
getLayered
-
Constructor Details
-
TLcdMapGridRulerController
public TLcdMapGridRulerController()Deprecated.Default constructor for aMapRulerController. -
TLcdMapGridRulerController
public TLcdMapGridRulerController(boolean aRegisterFlag) Deprecated.use the constructor without parameters. -
TLcdMapGridRulerController
Deprecated. -
TLcdMapGridRulerController
Deprecated.
-
-
Method Details
-
startInteraction
Deprecated.This method calls super.startInteraction( aGXYView ). Then, if the property popupDialog is true, it pops up a Dialog in which the distance and angle of the last segment drawn, as well as the total distance of all segments are displayed.Redefines formatDistance and formatAngle if you need to display these values with a specific unit of measure.
Redefine displayLastSegmentDistance, displayLastSegmentAngle and displayTotalDistance if you need to display all or some of these values differently.
- Specified by:
startInteractionin interfaceILcdGXYController- Overrides:
startInteractionin classALcdGXYController- Parameters:
aGXYView- theILcdGXYViewthisILcdGXYControllerwill interact with.- See Also:
-
terminateInteraction
Deprecated.Description copied from class:ALcdGXYControllerReleases a few items. Can be redefined but this 'super' method should be called too.- Specified by:
terminateInteractionin interfaceILcdGXYController- Overrides:
terminateInteractionin classALcdGXYController- Parameters:
aGXYView- theILcdGXYViewthisILcdGXYControllerinteracted with.- See Also:
-
mouseMoved
Deprecated.The mouse movement causes the drawing of a line between the mouse click points on the screen and the drawing of the circle spanning the distance between the last mouse clicking point and the current position.- Specified by:
mouseMovedin interfaceMouseMotionListener
-
displayLastSegmentDistance
Deprecated.- See Also:
-
displayLastSegmentAngle
Deprecated.- See Also:
-
displayTotalDistance
Deprecated.- See Also:
-
mouseReleased
Deprecated.A mouse release causes the last location to be added to the list of points that are going to be linked. A repetitive mouse release resets the list of points.- Specified by:
mouseReleasedin interfaceMouseListener
-
calculateDistance
protected double calculateDistance(int aFromX, int aFromY, int aToX, int aToY) Deprecated.Calculates the model distance in meters between the model locations that are on screen at[aFromX,aFromY] and [aTox,aToY].Using this method only makes sense when the
ILcdGXYViewthisILcdGXYControllerinteracts with has aILcdProjectionReferenceas aILcdXYWorldReference.- Returns:
- a distance in meters or -1.
-
calculateAngle
protected double calculateAngle(int aFromX, int aFromY, int aToX, int aToY) Deprecated.Calculates the azimuth between the model locations that are on screen at[aFromX,aFromY] and [aTox,aToY].Using this method makes sense only when the
ILcdGXYViewthisILcdGXYControllerinteracts with has aILcdProjectionReferenceas aILcdXYWorldReference. -
formatDistance
Deprecated.Format the model distance aDistance in meters as a String. Redefine this method to have the distances displayed with another unit of measure.- Returns:
"<aDistance>m"ifaDistance < 100000, in Km otherwise
-
formatAngle
Deprecated.Format the model azimuth aAngle in radians as a String. Redefine this method to have the distances displayed with another unit of measure.- Returns:
- aAngle expressed in degrees as a String
-
mouseDragged
Deprecated.MouseEvent me is ignored.- Specified by:
mouseDraggedin interfaceMouseMotionListener
-
mouseClicked
Deprecated.MouseEvent me is ignored.- Specified by:
mouseClickedin interfaceMouseListener
-
mouseEntered
Deprecated.MouseEvent me is ignored.- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
Deprecated.MouseEvent me is ignored.- Specified by:
mouseExitedin interfaceMouseListener
-
mousePressed
Deprecated.MouseEvent me is ignored.- Specified by:
mousePressedin interfaceMouseListener
-
getLastSegmentDistance
public double getLastSegmentDistance()Deprecated.- Returns:
- the distance of the last geodesic lines drawn. Calling that method can be useful when redefining the mouseMoved method for instance.
-
getLastSegmentAngle
public double getLastSegmentAngle()Deprecated.- Returns:
- the azimuth of the last geodesic lines drawn. Calling that method can be useful when redefining the mouseMoved method for instance.
-
getTotalDistance
public double getTotalDistance()Deprecated.- Returns:
- the current total distance of all geodesic lines drawn. Calling that method can be useful when redefining the mouseMoved method for instance.
-
undo
public void undo()Deprecated.Performs no action. -
setGhostColor
Deprecated.ghostColor is the property that holds the color of the lines and circle that are drawn. Sets the ghostColor to aGhostColor. -
getGhostColor
Deprecated.ghostColor is the property that holds the color of the lines and circle that are drawn. Returns the ghostColor. -
setGhostLineWidth
public void setGhostLineWidth(int aGhostLineWidth) Deprecated.GhostLineWidth is the property that holds the width of the lines and circle that are drawn. This property has an effect only for JVM versions upper that 1.2. For lower versions, the line width will be always 1.- Parameters:
aGhostLineWidth- the line width to set.
-
getGhostLineWidth
public int getGhostLineWidth()Deprecated.GhostLineWidth is the property that holds the width of the lines and circle that are drawn. This property has an effect only for JVM versions upper that 1.2 For lower versions, the line width will be always 1.- Returns:
- the current line width.
-
isDrawEqualDistanceCurve
public boolean isDrawEqualDistanceCurve()Deprecated.The property drawEqualDistanceCurve determines whether to draw the circle.- Returns:
trueif drawEqualDistanceCurve istrue, elsefalseis returned.
-
setDrawEqualDistanceCurve
public void setDrawEqualDistanceCurve(boolean aDrawEqualDistanceCurve) Deprecated.The property drawEqualDistanceCurve determines whether to draw the circle. Sets drawEqualDistanceCurve to aDrawEqualDistanceCurve. -
isPopupDialog
public boolean isPopupDialog()Deprecated.- See Also:
-
setPopupDialog
public void setPopupDialog(boolean aPopupDialog) Deprecated.- See Also:
-
setDrawGeodesicLine
public void setDrawGeodesicLine(boolean newDrawGeodesicLine) Deprecated.The property drawGeodesicLine determines whether to draw the lines. Sets drawGeodesicLine to newDrawGeodesicLine. -
isDrawGeodesicLine
public boolean isDrawGeodesicLine()Deprecated.The property drawGeodesicLine determines whether to draw the lines.- Returns:
trueif drawGeodesicLine istrue, elsefalseis returned.
-
setActionListenerOnDoubleClick
Deprecated. -
getActionListenerOnDoubleClick
Deprecated.
-
TLcdAdvancedMapRulerController