Class AngleMonitor

  • All Implemented Interfaces:
    chemaxon.marvin.space.UsableObject

    @PublicAPI
    public class AngleMonitor
    extends MeasurementMonitor
    Monitor for measuring angle between 3 components, the first 2 determines a line, the second 2 another. The angle will be determined by the 2 lines. Component can be any GraphicComponent with a proper getCoordinates() function returning a vector.
    Since:
    Marvin 4.0.2
    • Constructor Detail

      • AngleMonitor

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

      • measurement

        public double measurement()
        Does the angle measurement.
        Specified by:
        measurement in class MeasurementMonitor
        Returns:
        the angle in degrees
      • maximumItemCount

        public int maximumItemCount()
        Returns 3 as the angle is measured between 3 elements.
        Specified by:
        maximumItemCount in class Monitor
      • getCoordinates

        public void getCoordinates​(float[] c)
        Returns the centroid of the selected elements.
        Overrides:
        getCoordinates in class MeasurementMonitor
        Parameters:
        c - allocated array where coordinates will be put
      • draw

        public void draw()
        Draws the anglemonitor as lines between the components, and an arc between the lines.
        Overrides:
        draw in class GraphicComponent