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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPropertyChangeListener
(PropertyChangeListener aPropertyChangeListener) Adds a feature to the PropertyChangeListener attribute of the TLcdAzimuthRangeController object.Gets the ArcLineStyle attribute of the TLcdAzimuthRangeController object.double
Gets 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.int
Gets the PixelLengthForArcRadius attribute of the TLcdAzimuthRangeController object.int
Gets the PixelLengthForCompleteCircle attribute of the TLcdAzimuthRangeController object.int
Gets the PixelLengthForZeroAngle attribute of the TLcdAzimuthRangeController object.double
Gets the StartAzimuth attribute of the TLcdAzimuthRangeController object.boolean
Gets the EventOnMouseDrag attribute of the TLcdAzimuthRangeController object.boolean
isFilled()
Gets the Filled attribute of the TLcdAzimuthRangeController object.boolean
Returns whether the current start azimuth and the range should be displayed as a label.boolean
Gets the LabelFilled attribute of the TLcdAzimuthRangeController object.boolean
Gets the LabelFrame attribute of the TLcdAzimuthRangeController object.boolean
Gets the StartFromCenter attribute of the TLcdAzimuthRangeController object.boolean
Deprecated.This method has been deprecated.void
void
void
void
Will perform a pan depending on the values of isDragging, isPanOnMouseDragExit and isPanOnMouseMoveExit propertiesvoid
void
void
void
Enables the controller to give visual feedback on the current user interactions.void
removePropertyChangeListener
(PropertyChangeListener aPropertyChangeListener) Removes the given PropertyChangeListener aPropertyChangeListener as listener.void
setArcLineStyle
(ILcdGraphicsSetup aArcLineStyle) Sets the ArcLineStyle attribute of the TLcdAzimuthRangeController object.void
setCenterAzimuthLineStyle
(ILcdGraphicsSetup aCenterAzimuthLineStyle) Sets the CenterAzimuthLineStyle attribute of the TLcdAzimuthRangeController object.void
setEventOnMouseDrag
(boolean aEventOnMouseDrag) Sets the EventOnMouseDrag attribute of the TLcdAzimuthRangeController object.void
setFilled
(boolean aFilled) Sets the Filled attribute of the TLcdAzimuthRangeController object.void
setFillStyle
(ILcdGraphicsSetup aFillStyle) Sets the FillStyle attribute of the TLcdAzimuthRangeController object.void
setLabelBackgroundColor
(Color aLabelBackgroundColor) Sets the LabelBackgroundColor attribute of the TLcdAzimuthRangeController object.void
setLabelColor
(Color aLabelColor) Sets the LabelColor attribute of the TLcdAzimuthRangeController object.void
setLabeled
(boolean aLabeled) Sets the Labeled attribute of the TLcdAzimuthRangeController object.void
setLabelFilled
(boolean aLabelFilled) Sets the LabelFilled attribute of the TLcdAzimuthRangeController object.void
setLabelFont
(Font aLabelFont) Sets the LabelFont attribute of the TLcdAzimuthRangeController object.void
setLabelFrame
(boolean aLabelFrame) Sets the LabelFrame attribute of the TLcdAzimuthRangeController object.void
setOuterAzimuthLineStyle
(ILcdGraphicsSetup aOuterAzimuthLineStyle) Sets the OuterAzimuthLineStyle attribute of the TLcdAzimuthRangeController object.void
setPixelLengthForArcRadius
(int aPixelLengthForArcRadius) Sets the PixelLengthForArcRadius attribute of the TLcdAzimuthRangeController object.void
setPixelLengthForCompleteCircle
(int aPixelLengthCompleteCircle) Sets the PixelLengthForCompleteCircle attribute of the TLcdAzimuthRangeController object.void
setPixelLengthForZeroAngle
(int aPixelLengthForZeroAngle) Sets the PixelLengthForZeroAngle attribute of the TLcdAzimuthRangeController object.void
setStartFromCenter
(boolean aStartFromCenter) Sets the StartFromCenter attribute of the TLcdAzimuthRangeController object.void
setTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.protected void
setupGraphicsForArcLineStyle
(Graphics aGraphics) Sets the line style to use for drawing the arc.protected void
setupGraphicsForCenterAzimuthLineStyle
(Graphics aGraphics) Sets the line style to use for drawing the center azimuth lines.protected void
setupGraphicsForFillStyle
(Graphics aGraphics) Sets the fill style to use for filling the arc segment.protected void
setupGraphicsForOuterAzimuthLineStyle
(Graphics aGraphics) Sets the line style to use for drawing the outer azimuth lines.void
startInteraction
(ILcdGXYView aGXYView) Sets up the controller to receive input through the view passed.void
terminateInteraction
(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, updateViewLocationAfterZoomSFCT
Methods 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, viewRepaint
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn
has not been called. If the argument isfalse
then only the informative, warning and error log messages are recorded.- Overrides:
setTraceOn
in 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.Returnstrue
if tracing is enabled for this class.- Overrides:
isTraceOn
in 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 thanaPixelLengthForZeroAngle
pixels 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 thanaPixelLengthForCompleteCircle
pixels 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 aboutaPixelLengthForArcRadius
pixels.- 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:ALcdGXYController
Sets up the controller to receive input through the view passed.All
ILcdGXYView
implementations that support interaction call this method when the controller has been made active withsetGXYController
on 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:
startInteraction
in interfaceILcdGXYController
- Overrides:
startInteraction
in classALcdGXYSmartController
- Parameters:
aGXYView
- theILcdGXYView
thisILcdGXYController
will interact with.- See Also:
-
terminateInteraction
Description copied from class:ALcdGXYController
Releases a few items. Can be redefined but this 'super' method should be called too.- Specified by:
terminateInteraction
in interfaceILcdGXYController
- Overrides:
terminateInteraction
in classALcdGXYSmartController
- Parameters:
aGXYView
- theILcdGXYView
thisILcdGXYController
interacted with.- See Also:
-
paint
Description copied from class:ALcdGXYController
Enables 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:
paint
in interfaceILcdGXYController
- Overrides:
paint
in classALcdGXYController
- Parameters:
aGraphics
- the Graphics on which the view was rendered.
-
mouseClicked
- Specified by:
mouseClicked
in interfaceMouseListener
- Overrides:
mouseClicked
in classALcdGXYSmartController
-
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classALcdGXYSmartController
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in classALcdGXYSmartController
-
mouseEntered
- Specified by:
mouseEntered
in interfaceMouseListener
- Overrides:
mouseEntered
in classALcdGXYSmartController
-
mouseExited
Description copied from class:ALcdGXYSmartController
Will perform a pan depending on the values of isDragging, isPanOnMouseDragExit and isPanOnMouseMoveExit properties- Specified by:
mouseExited
in interfaceMouseListener
- Overrides:
mouseExited
in classALcdGXYSmartController
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classALcdGXYSmartController
-
mouseMoved
- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Overrides:
mouseMoved
in 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.
-