Package rma.services.units.impl
Class UnitsDisplayServiceImpl
java.lang.Object
rma.services.units.impl.UnitsDisplayServiceImpl
- All Implemented Interfaces:
UnitsDisplayService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContainer(Container container) add a Container to listen for display units changes.voidadd a UnitsComponent to listen for display units changes.doublegetDisplayScaleFactor(int paramId) Gets a scaling factor to use when displaying the data.intThis method allows the retrieves the units string for a given units systemvoidremoveContainer(Container container) voidvoidsetDisplayScaleFactor(int paramId, double scaleFactor) Sets a scaling factor to use when displaying the data.voidsetDisplayUnitSystem(int system) Sets the current Unit System and notifies all listeners if the unit system has changedvoidvoidThis will recurse through the Container's components looking for UnitsComponents to notify of the current unit system.
-
Constructor Details
-
UnitsDisplayServiceImpl
public UnitsDisplayServiceImpl()
-
-
Method Details
-
addUnitsComponent
Description copied from interface:UnitsDisplayServiceadd 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:
addUnitsComponentin interfaceUnitsDisplayService
-
removeUnitsComponent
- Specified by:
removeUnitsComponentin interfaceUnitsDisplayService
-
addContainer
Description copied from interface:UnitsDisplayServiceadd 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:
addContainerin interfaceUnitsDisplayService
-
removeContainer
- Specified by:
removeContainerin interfaceUnitsDisplayService
-
getDisplayUnitsSystem
public int getDisplayUnitsSystem()Description copied from interface:UnitsDisplayServiceThis method allows the retrieves the units string for a given units system- Specified by:
getDisplayUnitsSystemin interfaceUnitsDisplayService- Returns:
- one of hec.lang.UnitsConst.SI or hec.lang.UnitsConst.ENGLISH
- See Also:
-
setDisplayUnitSystem
public void setDisplayUnitSystem(int system) Description copied from interface:UnitsDisplayServiceSets the current Unit System and notifies all listeners if the unit system has changed- Specified by:
setDisplayUnitSystemin interfaceUnitsDisplayService- 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:
getDisplayScaleFactorin interfaceUnitsDisplayService- 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:UnitsDisplayServiceSets a scaling factor to use when displaying the data.- Specified by:
setDisplayScaleFactorin interfaceUnitsDisplayService- Parameters:
paramId- This is the identifier of the parameter to scale. If the data is not of this type then it is ignoredscaleFactor- This is the scaling factor *to* be multiplied to the value when it is rendered
-
updateDisplayScale
- Specified by:
updateDisplayScalein interfaceUnitsDisplayService
-
updateUnitSystem
Description copied from interface:UnitsDisplayServiceThis will recurse through the Container's components looking for UnitsComponents to notify of the current unit system.- Specified by:
updateUnitSystemin interfaceUnitsDisplayService
-