Measurement
Date: 2019-10-22

org.jmol.modelset

## Class Measurement

- java.lang.Object
- - org.jmol.modelset.Measurement

- Direct Known Subclasses:
    MeasurementPending

      public class Measurement
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `short` | `colix`
    `int` | `count`
    `int[]` | `countPlusIndices`
    `int` | `index`
    `boolean` | `isHidden`
    `boolean` | `isTrajectory`
    `boolean` | `isValid`
    `boolean` | `isVisible`
    `short` | `labelColix`
    `int` | `mad`
    `ModelSet` | `ms`
    `static int` | `NMR_DC`
    `static int` | `NMR_JC`
    `static int` | `NMR_NOT`
    `Point3fi[]` | `pts`
    `javajs.util.P3` | `renderArc`
    `javajs.util.A4` | `renderAxis`
    `java.lang.String` | `strFormat`
    `private java.lang.String` | `strMeasurement`
    `private boolean` | `tainted`
    `Text` | `text`
    `java.lang.String` | `thisID`
    `TickInfo` | `tickInfo`
    `int` | `traceX`
    `int` | `traceY`
    `private java.lang.String` | `type`
    `float` | `value`
    `private Viewer` | `vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Measurement()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `find(javajs.util.Lst<Measurement> measurements, Measurement m)`
    `private static java.lang.String` | `fixUnits(java.lang.String units)`
    `float` | `fixValue(java.lang.String units, boolean andRound)`
    `private java.lang.String` | `formatAngle(float angle)`
    `private java.lang.String` | `formatDistance(java.lang.String units)`
    `void` | `formatMeasurement(java.lang.String units)`
    `void` | `formatMeasurementAs(java.lang.String strFormat, java.lang.String units, boolean useDefault)`
    `private java.lang.String` | `formatString(float value, java.lang.String units, java.lang.String label)`
    `Point3fi` | `getAtom(int n)`
    `int` | `getAtomIndex(int n)`
    `java.lang.String` | `getInfoAsString(java.lang.String units)`
    `java.lang.String` | `getLabel(int i, boolean asBitSet, boolean withModelIndex)`
    `private java.lang.String` | `getLabelString()`
    `int` | `getLastIndex()`
    `float` | `getMeasurement(Point3fi[] pts)`
    `java.lang.String` | `getMeasurementScript(java.lang.String sep, boolean withModelIndex)` Used by MouseManager and Picking Manager to build the script
    `java.lang.String` | `getString()`
    `java.lang.String` | `getStringDetail()`
    `java.lang.String` | `getStringUsing(Viewer vwr, java.lang.String strFormat, java.lang.String units)`
    `boolean` | `isConnected(Atom[] atoms, int count)`
    `boolean` | `isInRange(RadiusData radiusData, float value)`
    `boolean` | `isIntramolecular(Atom[] atoms, int count)`
    `boolean` | `isMin(java.util.Map<java.lang.String,java.lang.Integer> htMin)`
    `boolean` | `isTainted()`
    `boolean` | `isValid()`
    `static int` | `nmrType(java.lang.String units)`
    `void` | `reformatDistanceIfSelected()`
    `void` | `refresh(Point3fi[] pts)`
    `boolean` | `sameAs(int i, int j)`
    `private boolean` | `sameAsIJ(int[] atoms, Point3fi[] points, int i, int j)`
    `boolean` | `sameAsPoints(int[] indices, Point3fi[] points)`
    `void` | `setCount(int count)`
    `protected void` | `setCountM(int count)`
    `Measurement` | `setM(ModelSet modelSet, Measurement m, float value, short colix, java.lang.String strFormat, int index)`
    `void` | `setModelIndex(short modelIndex)`
    `Measurement` | `setPoints(ModelSet modelSet, int[] indices, Point3fi[] points, TickInfo tickInfo)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### thisID

          public java.lang.String thisID

    - #### ms

          public ModelSet ms

    - #### index

          public int index

    - #### isVisible

          public boolean isVisible

    - #### isHidden

          public boolean isHidden

    - #### isTrajectory

          public boolean isTrajectory

    - #### isValid

          public boolean isValid

    - #### colix

          public short colix

    - #### labelColix

          public short labelColix

    - #### mad

          public int mad

    - #### tickInfo

          public TickInfo tickInfo

    - #### traceX

          public int traceX

    - #### traceY

          public int traceY

    - #### count

          public int count

    - #### countPlusIndices

          public int[] countPlusIndices

    - #### pts

          public Point3fi[] pts

    - #### value

          public float value

    - #### strFormat

          public java.lang.String strFormat

    - #### text

          public Text text

    - #### vwr

          private Viewer vwr

    - #### strMeasurement

          private java.lang.String strMeasurement

    - #### type

          private java.lang.String type

    - #### tainted

          private boolean tainted

    - #### renderAxis

          public javajs.util.A4 renderAxis

    - #### renderArc

          public javajs.util.P3 renderArc

    - #### NMR_NOT

          public static final int NMR_NOT

      See Also:
        Constant Field Values

    - #### NMR_DC

          public static final int NMR_DC

      See Also:
        Constant Field Values

    - #### NMR_JC

          public static final int NMR_JC

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Measurement

          public Measurement()

  - ### Method Detail

    - #### isTainted

          public boolean isTainted()

    - #### setM

          public Measurement setM(ModelSet modelSet,
                                  Measurement m,
                                  float value,
                                  short colix,
                                  java.lang.String strFormat,
                                  int index)

    - #### setPoints

          public Measurement setPoints(ModelSet modelSet,
                                       int[] indices,
                                       Point3fi[] points,
                                       TickInfo tickInfo)

    - #### setCount

          public void setCount(int count)

    - #### setCountM

          protected void setCountM(int count)

    - #### getAtomIndex

          public int getAtomIndex(int n)

    - #### getAtom

          public Point3fi getAtom(int n)

    - #### getLastIndex

          public int getLastIndex()

    - #### getString

          public java.lang.String getString()

    - #### getStringUsing

          public java.lang.String getStringUsing(Viewer vwr,
                                                 java.lang.String strFormat,
                                                 java.lang.String units)

    - #### getStringDetail

          public java.lang.String getStringDetail()

    - #### refresh

          public void refresh(Point3fi[] pts)

    - #### getMeasurementScript

          public java.lang.String getMeasurementScript(java.lang.String sep,
                                                       boolean withModelIndex)

      Used by MouseManager and Picking Manager to build the script
      Parameters:
        `sep` -
        `withModelIndex` - is needed for points only
      Returns:
        measure ((1}) ({2})....

    - #### formatMeasurementAs

          public void formatMeasurementAs(java.lang.String strFormat,
                                          java.lang.String units,
                                          boolean useDefault)

    - #### formatMeasurement

          public void formatMeasurement(java.lang.String units)

    - #### reformatDistanceIfSelected

          public void reformatDistanceIfSelected()

    - #### formatDistance

          private java.lang.String formatDistance(java.lang.String units)

    - #### fixUnits

          private static java.lang.String fixUnits(java.lang.String units)

    - #### fixValue

          public float fixValue(java.lang.String units,
                                boolean andRound)

    - #### nmrType

          public static int nmrType(java.lang.String units)

    - #### formatAngle

          private java.lang.String formatAngle(float angle)

    - #### getLabelString

          private java.lang.String getLabelString()

    - #### formatString

          private java.lang.String formatString(float value,
                                                java.lang.String units,
                                                java.lang.String label)

    - #### sameAsPoints

          public boolean sameAsPoints(int[] indices,
                                      Point3fi[] points)

    - #### sameAsIJ

          private boolean sameAsIJ(int[] atoms,
                                   Point3fi[] points,
                                   int i,
                                   int j)

    - #### sameAs

          public boolean sameAs(int i,
                                int j)

    - #### getMeasurement

          public float getMeasurement(Point3fi[] pts)

    - #### getLabel

          public java.lang.String getLabel(int i,
                                           boolean asBitSet,
                                           boolean withModelIndex)

    - #### setModelIndex

          public void setModelIndex(short modelIndex)

    - #### isValid

          public boolean isValid()

    - #### find

          public static int find(javajs.util.Lst<Measurement> measurements,
                                 Measurement m)

    - #### isConnected

          public boolean isConnected(Atom[] atoms,
                                     int count)

    - #### getInfoAsString

          public java.lang.String getInfoAsString(java.lang.String units)

    - #### isInRange

          public boolean isInRange(RadiusData radiusData,
                                   float value)

    - #### isIntramolecular

          public boolean isIntramolecular(Atom[] atoms,
                                          int count)

    - #### isMin

          public boolean isMin(java.util.Map<java.lang.String,java.lang.Integer> htMin)