Class TLcdAzimuthRangeController
- All Implemented Interfaces:
ILcdUndoableSource,ILcdStatusSource,ILcdGXYController,KeyListener,MouseListener,MouseMotionListener,Serializable,EventListener
ILcdGXYController interprets mouse events for displaying an
azimuth direction and an azimuth range. The azimuth direction is based on the initial azimuth of the geodesic line segment between two points on the screen. The length of the line segment determines the wideness of the azimuth range. The longer the line segment the smaller the azimuth range. Below a certain threshold (in pixels) the range is 360 degrees. Above a certain threshold (in pixels) the range is 0 degrees.
On each mouse release a PropertyChangeEvent occurs. This event
object contains null values. One should call the methods getStartAzimuth()
and getAzimuthRange() of the controller in order to get the
azimuth interval.
An event is thrown on each mouse drag if isEventOnMouseDrag
returns true.
Using this ILcdGXYController method makes sense only when the
ILcdGXYView it interacts with has a ILcdXYWorldReference
that is an instance of ILcdGridReference.
- Since:
- V2.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyChangeListener(PropertyChangeListener aPropertyChangeListener) Adds a feature to the PropertyChangeListener attribute of the TLcdAzimuthRangeController object.Gets the ArcLineStyle attribute of the TLcdAzimuthRangeController object.doubleGets the AzimuthRange attribute of the TLcdAzimuthRangeController object.Gets the CenterAzimuthLineStyle attribute of the TLcdAzimuthRangeController object.Gets the FillStyle attribute of the TLcdAzimuthRangeController object.Gets the LabelBackgroundColor attribute of the TLcdAzimuthRangeController object.Gets the LabelColor attribute of the TLcdAzimuthRangeController object.Gets the LabelFont attribute of the TLcdAzimuthRangeController object.Gets the OuterAzimuthLineStyle attribute of the TLcdAzimuthRangeController object.intGets the PixelLengthForArcRadius attribute of the TLcdAzimuthRangeController object.intGets the PixelLengthForCompleteCircle attribute of the TLcdAzimuthRangeController object.intGets the PixelLengthForZeroAngle attribute of the TLcdAzimuthRangeController object.doubleGets the StartAzimuth attribute of the TLcdAzimuthRangeController object.booleanGets the EventOnMouseDrag attribute of the TLcdAzimuthRangeController object.booleanisFilled()Gets the Filled attribute of the TLcdAzimuthRangeController object.booleanReturns whether the current start azimuth and the range should be displayed as a label.booleanGets the LabelFilled attribute of the TLcdAzimuthRangeController object.booleanGets the LabelFrame attribute of the TLcdAzimuthRangeController object.booleanGets the StartFromCenter attribute of the TLcdAzimuthRangeController object.booleanDeprecated.This method has been deprecated.voidvoidvoidvoidWill perform a pan depending on the values of isDragging, isPanOnMouseDragExit and isPanOnMouseMoveExit propertiesvoidvoidvoidvoidEnables the controller to give visual feedback on the current user interactions.voidremovePropertyChangeListener(PropertyChangeListener aPropertyChangeListener) Removes the given PropertyChangeListener aPropertyChangeListener as listener.voidsetArcLineStyle(ILcdGraphicsSetup aArcLineStyle) Sets the ArcLineStyle attribute of the TLcdAzimuthRangeController object.voidsetCenterAzimuthLineStyle(ILcdGraphicsSetup aCenterAzimuthLineStyle) Sets the CenterAzimuthLineStyle attribute of the TLcdAzimuthRangeController object.voidsetEventOnMouseDrag(boolean aEventOnMouseDrag) Sets the EventOnMouseDrag attribute of the TLcdAzimuthRangeController object.voidsetFilled(boolean aFilled) Sets the Filled attribute of the TLcdAzimuthRangeController object.voidsetFillStyle(ILcdGraphicsSetup aFillStyle) Sets the FillStyle attribute of the TLcdAzimuthRangeController object.voidsetLabelBackgroundColor(Color aLabelBackgroundColor) Sets the LabelBackgroundColor attribute of the TLcdAzimuthRangeController object.voidsetLabelColor(Color aLabelColor) Sets the LabelColor attribute of the TLcdAzimuthRangeController object.voidsetLabeled(boolean aLabeled) Sets the Labeled attribute of the TLcdAzimuthRangeController object.voidsetLabelFilled(boolean aLabelFilled) Sets the LabelFilled attribute of the TLcdAzimuthRangeController object.voidsetLabelFont(Font aLabelFont) Sets the LabelFont attribute of the TLcdAzimuthRangeController object.voidsetLabelFrame(boolean aLabelFrame) Sets the LabelFrame attribute of the TLcdAzimuthRangeController object.voidsetOuterAzimuthLineStyle(ILcdGraphicsSetup aOuterAzimuthLineStyle) Sets the OuterAzimuthLineStyle attribute of the TLcdAzimuthRangeController object.voidsetPixelLengthForArcRadius(int aPixelLengthForArcRadius) Sets the PixelLengthForArcRadius attribute of the TLcdAzimuthRangeController object.voidsetPixelLengthForCompleteCircle(int aPixelLengthCompleteCircle) Sets the PixelLengthForCompleteCircle attribute of the TLcdAzimuthRangeController object.voidsetPixelLengthForZeroAngle(int aPixelLengthForZeroAngle) Sets the PixelLengthForZeroAngle attribute of the TLcdAzimuthRangeController object.voidsetStartFromCenter(boolean aStartFromCenter) Sets the StartFromCenter attribute of the TLcdAzimuthRangeController object.voidsetTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.protected voidsetupGraphicsForArcLineStyle(Graphics aGraphics) Sets the line style to use for drawing the arc.protected voidsetupGraphicsForCenterAzimuthLineStyle(Graphics aGraphics) Sets the line style to use for drawing the center azimuth lines.protected voidsetupGraphicsForFillStyle(Graphics aGraphics) Sets the fill style to use for filling the arc segment.protected voidsetupGraphicsForOuterAzimuthLineStyle(Graphics aGraphics) Sets the line style to use for drawing the outer azimuth lines.voidstartInteraction(ILcdGXYView aGXYView) Sets up the controller to receive input through the view passed.voidterminateInteraction(ILcdGXYView aGXYView) Releases a few items.Methods inherited from class com.luciad.view.gxy.controller.ALcdGXYSmartController
addUndoableListener, doPanGXYView, doZoomGXYView, fireUndoableEvent, getDownPanChars, getDownPanCodes, getLeftPanChars, getLeftPanCodes, getPanAbsDelta, getPanAbsDelta, getRightPanChars, getRightPanCodes, getUndoableListenerCount, getUpPanChars, getUpPanCodes, getZoomInChars, getZoomInCodes, getZoomOutChars, getZoomOutCodes, isDragging, isPanOnMouseDragExit, isPanOnMouseMoveExit, isPanUndoable, isRequestFocusOnMouseEntered, isRequestFocusOnMousePressed, isZoomUndoable, keyPressed, keyReleased, keyTyped, removeUndoableListener, setDownPanChars, setDownPanCodes, setIsDragging, setLeftPanChars, setLeftPanCodes, setPanAbsDelta, setPanOnMouseDragExit, setPanOnMouseMoveExit, setPanUndoable, setRequestFocusOnMouseEntered, setRequestFocusOnMousePressed, setRightPanChars, setRightPanCodes, setUpPanChars, setUpPanCodes, setZoomInChars, setZoomInCodes, setZoomOutChars, setZoomOutCodes, setZoomUndoable, updateViewLocationAfterZoomSFCTMethods inherited from class com.luciad.view.gxy.controller.ALcdGXYController
addStatusListener, asGXYController, fireStatusEvent, getCursor, getGXYView, getIcon, getName, getShortDescription, registerInstance, removeStatusListener, retrieveGXYViewXYWorldTransformation, setClassTraceOn, setCursor, setGXYView, setIcon, setName, setShortDescription, 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
-
TLcdAzimuthRangeController
public TLcdAzimuthRangeController()Creates a new TLcdAzimuthRangeController.
-
-
Method Details
-
setTraceOn
public void setTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrueorfalseas argument automatically turns off tracing for all other class instances for whichsetTraceOnhas not been called. If the argument isfalsethen only the informative, warning and error log messages are recorded.- Overrides:
setTraceOnin classALcdGXYSmartController- Parameters:
aTraceOn- if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
-
isTraceOn
public boolean isTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrueif tracing is enabled for this class.- Overrides:
isTraceOnin classALcdGXYSmartController- Returns:
- true if tracing is enabled for this class, false otherwise.
-
setStartFromCenter
public void setStartFromCenter(boolean aStartFromCenter) Sets the StartFromCenter attribute of the TLcdAzimuthRangeController object.- Parameters:
aStartFromCenter- the new StartFromCenter value.- See Also:
-
setEventOnMouseDrag
public void setEventOnMouseDrag(boolean aEventOnMouseDrag) Sets the EventOnMouseDrag attribute of the TLcdAzimuthRangeController object.- Parameters:
aEventOnMouseDrag- the new EventOnMouseDrag value.- See Also:
-
setPixelLengthForZeroAngle
public void setPixelLengthForZeroAngle(int aPixelLengthForZeroAngle) Sets the PixelLengthForZeroAngle attribute of the TLcdAzimuthRangeController object.- Parameters:
aPixelLengthForZeroAngle- the new PixelLengthForZeroAngle value.- See Also:
-
setPixelLengthForCompleteCircle
public void setPixelLengthForCompleteCircle(int aPixelLengthCompleteCircle) Sets the PixelLengthForCompleteCircle attribute of the TLcdAzimuthRangeController object.- Parameters:
aPixelLengthCompleteCircle- the new PixelLengthForCompleteCircle value.- See Also:
-
setPixelLengthForArcRadius
public void setPixelLengthForArcRadius(int aPixelLengthForArcRadius) Sets the PixelLengthForArcRadius attribute of the TLcdAzimuthRangeController object.- Parameters:
aPixelLengthForArcRadius- the new PixelLengthForArcRadius value.- See Also:
-
setCenterAzimuthLineStyle
Sets the CenterAzimuthLineStyle attribute of the TLcdAzimuthRangeController object.- Parameters:
aCenterAzimuthLineStyle- the new CenterAzimuthLineStyle value.- See Also:
-
setOuterAzimuthLineStyle
Sets the OuterAzimuthLineStyle attribute of the TLcdAzimuthRangeController object.- Parameters:
aOuterAzimuthLineStyle- the new OuterAzimuthLineStyle value.- See Also:
-
setArcLineStyle
Sets the ArcLineStyle attribute of the TLcdAzimuthRangeController object.- Parameters:
aArcLineStyle- the new ArcLineStyle value.- See Also:
-
setFillStyle
Sets the FillStyle attribute of the TLcdAzimuthRangeController object.- Parameters:
aFillStyle- the new FillStyle value.- See Also:
-
setFilled
public void setFilled(boolean aFilled) Sets the Filled attribute of the TLcdAzimuthRangeController object.- Parameters:
aFilled- the new Filled value.- See Also:
-
setLabeled
public void setLabeled(boolean aLabeled) Sets the Labeled attribute of the TLcdAzimuthRangeController object.- Parameters:
aLabeled- the new Labeled value.- See Also:
-
setLabelFont
Sets the LabelFont attribute of the TLcdAzimuthRangeController object.- Parameters:
aLabelFont- the new LabelFont value.- See Also:
-
setLabelColor
Sets the LabelColor attribute of the TLcdAzimuthRangeController object.- Parameters:
aLabelColor- the new LabelColor value.- See Also:
-
setLabelBackgroundColor
Sets the LabelBackgroundColor attribute of the TLcdAzimuthRangeController object.- Parameters:
aLabelBackgroundColor- the new LabelBackgroundColor value.- See Also:
-
setLabelFrame
public void setLabelFrame(boolean aLabelFrame) Sets the LabelFrame attribute of the TLcdAzimuthRangeController object.- Parameters:
aLabelFrame- the new LabelFrame value.- See Also:
-
setLabelFilled
public void setLabelFilled(boolean aLabelFilled) Sets the LabelFilled attribute of the TLcdAzimuthRangeController object.- Parameters:
aLabelFilled- the new LabelFilled value.- See Also:
-
getStartAzimuth
public double getStartAzimuth()Gets the StartAzimuth attribute of the TLcdAzimuthRangeController object.- Returns:
- the StartAzimuth value.
-
getAzimuthRange
public double getAzimuthRange()Gets the AzimuthRange attribute of the TLcdAzimuthRangeController object.- Returns:
- the AzimuthRange value.
-
isStartFromCenter
public boolean isStartFromCenter()Gets the StartFromCenter attribute of the TLcdAzimuthRangeController object. A single mouse click suffices. The first point is considered to be the center point of theILcdGXYView.- Returns:
- the StartFromCenter value.
- See Also:
-
isEventOnMouseDrag
public boolean isEventOnMouseDrag()Gets the EventOnMouseDrag attribute of the TLcdAzimuthRangeController object. If this method returns true a property change event occurs on every mouse drag. If this method returns false a property change event occurs on a mouse release only.- Returns:
- the EventOnMouseDrag value.
- See Also:
-
getPixelLengthForZeroAngle
public int getPixelLengthForZeroAngle()Gets the PixelLengthForZeroAngle attribute of the TLcdAzimuthRangeController object. If the two view points are more thanaPixelLengthForZeroAnglepixels from each other, the azimuth range will be 0 .- Returns:
- the PixelLengthForZeroAngle value.
- See Also:
-
getPixelLengthForCompleteCircle
public int getPixelLengthForCompleteCircle()Gets the PixelLengthForCompleteCircle attribute of the TLcdAzimuthRangeController object. If the two view points are less thanaPixelLengthForCompleteCirclepixels from each other, the azimuth range will be 360 degrees.- Returns:
- the PixelLengthForCompleteCircle value.
- See Also:
-
getPixelLengthForArcRadius
public int getPixelLengthForArcRadius()Gets the PixelLengthForArcRadius attribute of the TLcdAzimuthRangeController object. The arc segment representing the azimuth range will be drawn with a radius of aboutaPixelLengthForArcRadiuspixels.- Returns:
- the PixelLengthForArcRadius value.
- See Also:
-
getCenterAzimuthLineStyle
Gets the CenterAzimuthLineStyle attribute of the TLcdAzimuthRangeController object.- Returns:
- the CenterAzimuthLineStyle value.
- See Also:
-
getOuterAzimuthLineStyle
Gets the OuterAzimuthLineStyle attribute of the TLcdAzimuthRangeController object.- Returns:
- the OuterAzimuthLineStyle value.
- See Also:
-
getArcLineStyle
Gets the ArcLineStyle attribute of the TLcdAzimuthRangeController object.- Returns:
- the ArcLineStyle value.
- See Also:
-
getFillStyle
Gets the FillStyle attribute of the TLcdAzimuthRangeController object.- Returns:
- the FillStyle value.
- See Also:
-
isFilled
public boolean isFilled()Gets the Filled attribute of the TLcdAzimuthRangeController object. If true the area occupied by the azimuth range will be filled from the center point to the arc segment representing the azimuth range.- Returns:
- the Filled value.
- See Also:
-
isLabeled
public boolean isLabeled()Returns whether the current start azimuth and the range should be displayed as a label.- Returns:
- the Labeled value.
- See Also:
-
getLabelFont
Gets the LabelFont attribute of the TLcdAzimuthRangeController object.- Returns:
- the LabelFont value.
- See Also:
-
getLabelColor
Gets the LabelColor attribute of the TLcdAzimuthRangeController object.- Returns:
- the LabelColor value.
- See Also:
-
getLabelBackgroundColor
Gets the LabelBackgroundColor attribute of the TLcdAzimuthRangeController object.- Returns:
- the LabelBackgroundColor value.
- See Also:
-
isLabelFrame
public boolean isLabelFrame()Gets the LabelFrame attribute of the TLcdAzimuthRangeController object.- Returns:
- the LabelFrame value.
- See Also:
-
isLabelFilled
public boolean isLabelFilled()Gets the LabelFilled attribute of the TLcdAzimuthRangeController object.- Returns:
- the LabelFilled value.
- See Also:
-
addPropertyChangeListener
Adds a feature to the PropertyChangeListener attribute of the TLcdAzimuthRangeController object.- Parameters:
aPropertyChangeListener- The feature to be added to the PropertyChangeListener attribute.- See Also:
-
removePropertyChangeListener
Removes the given PropertyChangeListener aPropertyChangeListener as listener.- Parameters:
aPropertyChangeListener- the PropertyChangeListener to be removed as listener.- See Also:
-
startInteraction
Description copied from class:ALcdGXYControllerSets up the controller to receive input through the view passed.All
ILcdGXYViewimplementations that support interaction call this method when the controller has been made active withsetGXYControlleron the view, so this method shouldn't normally be called directly. Note that most view implementations add the controller as listener if appropriate before calling this method.Sets the cursor on the view and sets the view for which this controller is now active. Sends out a status event based on the
short description.- Specified by:
startInteractionin interfaceILcdGXYController- Overrides:
startInteractionin classALcdGXYSmartController- Parameters:
aGXYView- theILcdGXYViewthisILcdGXYControllerwill interact with.- See Also:
-
terminateInteraction
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 classALcdGXYSmartController- Parameters:
aGXYView- theILcdGXYViewthisILcdGXYControllerinteracted with.- See Also:
-
paint
Description copied from class:ALcdGXYControllerEnables the controller to give visual feedback on the current user interactions. Note that the controller is responsible for repainting the view.Empty implementation. Redefine this method to render on the Graphics on which the view is rendered.
- Specified by:
paintin interfaceILcdGXYController- Overrides:
paintin classALcdGXYController- Parameters:
aGraphics- the Graphics on which the view was rendered.
-
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener- Overrides:
mouseClickedin classALcdGXYSmartController
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classALcdGXYSmartController
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classALcdGXYSmartController
-
mouseEntered
- Specified by:
mouseEnteredin interfaceMouseListener- Overrides:
mouseEnteredin classALcdGXYSmartController
-
mouseExited
Description copied from class:ALcdGXYSmartControllerWill perform a pan depending on the values of isDragging, isPanOnMouseDragExit and isPanOnMouseMoveExit properties- Specified by:
mouseExitedin interfaceMouseListener- Overrides:
mouseExitedin classALcdGXYSmartController
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classALcdGXYSmartController
-
mouseMoved
- Specified by:
mouseMovedin interfaceMouseMotionListener- Overrides:
mouseMovedin classALcdGXYSmartController
-
setupGraphicsForFillStyle
Sets the fill style to use for filling the arc segment.- Parameters:
aGraphics- the graphics on which to apply the style.
-
setupGraphicsForCenterAzimuthLineStyle
Sets the line style to use for drawing the center azimuth lines.- Parameters:
aGraphics- the graphics on which to apply the style.
-
setupGraphicsForOuterAzimuthLineStyle
Sets the line style to use for drawing the outer azimuth lines.- Parameters:
aGraphics- the graphics on which to apply the style.
-
setupGraphicsForArcLineStyle
Sets the line style to use for drawing the arc.- Parameters:
aGraphics- the graphics on which to apply the style.
-