Class RealReadout.UnitProperty

All Implemented Interfaces:
Property
Enclosing class:
RealReadout

protected class RealReadout.UnitProperty extends NonVetoableProperty
Provides support for unit properties.
  • Constructor Details

    • UnitProperty

      public UnitProperty()
      Constructs from nothing.
  • Method Details

    • setSpecifiedUnit

      public void setSpecifiedUnit(String specifiedUnitString) throws NoSuchUnitException, ParseException
      Sets the client-supplied unit-specification.
      Parameters:
      specifiedUnitString - The client-supplied unit-specification.
      Throws:
      NoSuchUnitException - No such unit.
      ParseException - Couldn't decode specification.
    • setUnitUse

      public void setUnitUse(int which)
      Sets the type of unit-use.
      Parameters:
      which - The type of unit-use. One of REAL_UNIT, REALTYPE_UNIT, or SPECIFIED_UNIT.
    • setValue

      public void setValue(Real real)
      Sets the value from a Real.
      Parameters:
      real - The Real.
    • getUnitString

      public String getUnitString()
      Returns the unit-specification.
      Returns:
      The unit-specification.
    • getUnit

      public Unit getUnit()
      Returns the unit.
      Returns:
      The unit.