Package com.luciad.view.vertical
Class ALcdVVModel
java.lang.Object
com.luciad.view.vertical.ALcdVVModel
- All Implemented Interfaces:
ILcdVVModel
- Direct Known Subclasses:
TLcdVVTerrainModel
,TLcdVVTerrainProfileModel
This class provides the default implementation of
a
ILcdVVModel
. It shall be used as support
class to extend, when implementing the ILcdVVModel
interface.
Whenever the ILcdVVModel
's internal state changes,
for example by editing a polyline on a map, the fireChangeEvent
has to be called in order to update the VV's internal data-fields and to start
repainting the Vertical View.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
ThechangeEvent
will be thrown when the models internal state has changed and recalculation is required.protected void
Notifies all listeners that have registered interest for notification on the ChangeEvent.double
getDistance
(int aPointIndexA, int aPointIndexB) Returns the distance between the given two points.void
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.vertical.ILcdVVModel
getPoint, getPointCount, getSubProfileCount, isEditable, maxZ, minZ, setPointZ, stepLenghtRatio, subProfilePointCount
-
Constructor Details
-
ALcdVVModel
public ALcdVVModel()
-
-
Method Details
-
getDistance
public double getDistance(int aPointIndexA, int aPointIndexB) Returns the distance between the given two points. This distance typically determines the X-axis of a VV panel. The distance unit can be meters, degrees, seconds, ... This implementation computes a distance in degrees along a great circle on the globe. Override this method if the distance is not expressed as a length (for example, you're using time) or if you like to usegeodetic
,rhumb
, orcartesian
distances.- Specified by:
getDistance
in interfaceILcdVVModel
- Parameters:
aPointIndexA
- the index of the first point on the main profile.aPointIndexB
- the index of the second point on the main profile- Returns:
- the distance between the 2 points along a great circle on the globe.
-
addChangeListener
Description copied from interface:ILcdVVModel
ThechangeEvent
will be thrown when the models internal state has changed and recalculation is required.- Specified by:
addChangeListener
in interfaceILcdVVModel
-
removeChangeListener
- Specified by:
removeChangeListener
in interfaceILcdVVModel
- See Also:
-
fireChangeModel
protected void fireChangeModel()Notifies all listeners that have registered interest for notification on the ChangeEvent. Should be invoked when the model has changed and theTLcdVVJPanel
needs to be reconstructed.
-