Package rma.services.units
Interface UnitsDisplayService
- All Known Implementing Classes:
UnitsDisplayServiceImpl
public interface UnitsDisplayService
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addContainer
(Container container) add a Container to listen for display units changes.void
add a UnitsComponent to listen for display units changes.double
getDisplayScaleFactor
(int paramId) Gets a scaling factor to use when displaying the data.int
This method allows the retrieves the units string for a given units systemvoid
removeContainer
(Container container) void
void
setDisplayScaleFactor
(int paramId, double scaleFactor) Sets a scaling factor to use when displaying the data.void
setDisplayUnitSystem
(int system) Sets the current Unit System and notifies all listeners if the unit system has changedvoid
updateDisplayScale
(Container container) void
updateUnitSystem
(Container container) This will recurse through the Container's components looking for UnitsComponents to notify of the current unit system.
-
Method Details
-
addUnitsComponent
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
-
addContainer
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
-
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 ignoredscaleFactor
- 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
This will recurse through the Container's components looking for UnitsComponents to notify of the current unit system.- Parameters:
container
-
-
updateDisplayScale
-