Class UnitsDisplayServiceImpl

java.lang.Object
rma.services.units.impl.UnitsDisplayServiceImpl
All Implemented Interfaces:
UnitsDisplayService

public class UnitsDisplayServiceImpl extends Object implements UnitsDisplayService
  • Constructor Details

    • UnitsDisplayServiceImpl

      public UnitsDisplayServiceImpl()
  • Method Details

    • addUnitsComponent

      public void addUnitsComponent(UnitsComponent uc)
      Description copied from interface: UnitsDisplayService
      add a UnitsComponent to listen for display units changes. When the UnitsComponent is initially added it will be notified of the current unit system
      Specified by:
      addUnitsComponent in interface UnitsDisplayService
    • removeUnitsComponent

      public void removeUnitsComponent(UnitsComponent uc)
      Specified by:
      removeUnitsComponent in interface UnitsDisplayService
    • addContainer

      public void addContainer(Container container)
      Description copied from interface: UnitsDisplayService
      add a Container to listen for display units changes. This will recurse through the Containers components looking for UnitsComponents to notify of the unit change. When the Container is initially added it will be notified of the current unit system
      Specified by:
      addContainer in interface UnitsDisplayService
    • removeContainer

      public void removeContainer(Container container)
      Specified by:
      removeContainer in interface UnitsDisplayService
    • getDisplayUnitsSystem

      public int getDisplayUnitsSystem()
      Description copied from interface: UnitsDisplayService
      This method allows the retrieves the units string for a given units system
      Specified by:
      getDisplayUnitsSystem in interface UnitsDisplayService
      Returns:
      one of hec.lang.UnitsConst.SI or hec.lang.UnitsConst.ENGLISH
      See Also:
    • setDisplayUnitSystem

      public void setDisplayUnitSystem(int system)
      Description copied from interface: UnitsDisplayService
      Sets the current Unit System and notifies all listeners if the unit system has changed
      Specified by:
      setDisplayUnitSystem in interface UnitsDisplayService
      Parameters:
      system - one of hec.lang.UnitsConst.SI or hec.lang.UnitsConst.ENGLISH
    • getDisplayScaleFactor

      public double getDisplayScaleFactor(int paramId)
      Gets a scaling factor to use when displaying the data.
      Specified by:
      getDisplayScaleFactor in interface UnitsDisplayService
      Parameters:
      paramId - This is the identifier of the parameter to scale. If the data is not of this type then it is ignored
      Returns:
      scaleFactor This is the scaling factor *to* be multiplied to the value when it is rendered. If not defined returns RMAConst.UNDEF_DOUBLE;
    • setDisplayScaleFactor

      public void setDisplayScaleFactor(int paramId, double scaleFactor)
      Description copied from interface: UnitsDisplayService
      Sets a scaling factor to use when displaying the data.
      Specified by:
      setDisplayScaleFactor in interface UnitsDisplayService
      Parameters:
      paramId - This is the identifier of the parameter to scale. If the data is not of this type then it is ignored
      scaleFactor - This is the scaling factor *to* be multiplied to the value when it is rendered
    • updateDisplayScale

      public void updateDisplayScale(Container c)
      Specified by:
      updateDisplayScale in interface UnitsDisplayService
    • updateUnitSystem

      public void updateUnitSystem(Container c)
      Description copied from interface: UnitsDisplayService
      This will recurse through the Container's components looking for UnitsComponents to notify of the current unit system.
      Specified by:
      updateUnitSystem in interface UnitsDisplayService