Class ALcdVVModel

java.lang.Object
com.luciad.view.vertical.ALcdVVModel
All Implemented Interfaces:
ILcdVVModel
Direct Known Subclasses:
TLcdVVTerrainModel, TLcdVVTerrainProfileModel

public abstract class ALcdVVModel extends Object implements ILcdVVModel
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 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 use geodetic, rhumb, or cartesian distances.

      Specified by:
      getDistance in interface ILcdVVModel
      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

      public void addChangeListener(ChangeListener l)
      Description copied from interface: ILcdVVModel
      The changeEvent will be thrown when the models internal state has changed and recalculation is required.
      Specified by:
      addChangeListener in interface ILcdVVModel
    • removeChangeListener

      public void removeChangeListener(ChangeListener l)
      Specified by:
      removeChangeListener in interface ILcdVVModel
      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 the TLcdVVJPanel needs to be reconstructed.