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 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
void
This 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: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 interfaceUnitsDisplayService
-
removeUnitsComponent
- Specified by:
removeUnitsComponent
in interfaceUnitsDisplayService
-
addContainer
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 interfaceUnitsDisplayService
-
removeContainer
- Specified by:
removeContainer
in interfaceUnitsDisplayService
-
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 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:UnitsDisplayService
Sets the current Unit System and notifies all listeners if the unit system has changed- Specified by:
setDisplayUnitSystem
in 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:
getDisplayScaleFactor
in 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:UnitsDisplayService
Sets a scaling factor to use when displaying the data.- Specified by:
setDisplayScaleFactor
in 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:
updateDisplayScale
in interfaceUnitsDisplayService
-
updateUnitSystem
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 interfaceUnitsDisplayService
-