Class DistanceMonitor

  • All Implemented Interfaces:

    public class DistanceMonitor
    extends MeasurementMonitor
    Monitor for measuring distance between 2 components. Component can be any GraphicComponent with a proper getCoordinates() function returning a vector.
    Marvin 4.0.2
    • Constructor Detail

      • DistanceMonitor

        public DistanceMonitor()
        Creates a new instance of DistanceMonitor
    • Method Detail

      • maximumItemCount

        public int maximumItemCount()
        Returns 2 as distance can be measured between 2 elements.
        Specified by:
        maximumItemCount in class Monitor
      • measurement

        public double measurement()
        Measures the distance.
        Specified by:
        measurement in class MeasurementMonitor
        the distance in angstroms
      • draw

        public void draw()
        Draws solid line between the measured elements.
        draw in class GraphicComponent