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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThechangeEventwill be thrown when the models internal state has changed and recalculation is required.protected voidNotifies all listeners that have registered interest for notification on the ChangeEvent.doublegetDistance(int aPointIndexA, int aPointIndexB) Returns the distance between the given two points.voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, orcartesiandistances.- Specified by:
getDistancein 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:ILcdVVModelThechangeEventwill be thrown when the models internal state has changed and recalculation is required.- Specified by:
addChangeListenerin interfaceILcdVVModel
-
removeChangeListener
- Specified by:
removeChangeListenerin 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 theTLcdVVJPanelneeds to be reconstructed.
-