Interface UnitsDisplayService

All Known Implementing Classes:
UnitsDisplayServiceImpl

public interface UnitsDisplayService
  • Method Details

    • addUnitsComponent

      void addUnitsComponent(UnitsComponent uc)
      add a UnitsComponent to listen for display units changes. When the UnitsComponent is initially added it will be notified of the current unit system
    • removeUnitsComponent

      void removeUnitsComponent(UnitsComponent uc)
    • addContainer

      void addContainer(Container container)
      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
      Parameters:
      container -
    • removeContainer

      void removeContainer(Container container)
    • getDisplayUnitsSystem

      int getDisplayUnitsSystem()
      This method allows the retrieves the units string for a given units system
      Returns:
      one of hec.lang.UnitsConst.SI or hec.lang.UnitsConst.ENGLISH
      See Also:
    • setDisplayUnitSystem

      void setDisplayUnitSystem(int system)
      Sets the current Unit System and notifies all listeners if the unit system has changed
      Parameters:
      system - one of hec.lang.UnitsConst.SI or hec.lang.UnitsConst.ENGLISH
    • setDisplayScaleFactor

      void setDisplayScaleFactor(int paramId, double scaleFactor)
      Sets a scaling factor to use when displaying the data.
      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
    • getDisplayScaleFactor

      double getDisplayScaleFactor(int paramId)
      Gets a scaling factor to use when displaying the data.
      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
    • updateUnitSystem

      void updateUnitSystem(Container container)
      This will recurse through the Container's components looking for UnitsComponents to notify of the current unit system.
      Parameters:
      container -
    • updateDisplayScale

      void updateDisplayScale(Container container)