Package jmri
Class ScaleManager
java.lang.Object
jmri.ScaleManager
Create a list of layout scale objects and provide retrieval methods.
See Scale for details of each scale object.
- Since:
- 4.13.6
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidCreate a scale instance and add it to the map.static ScaleGet the scale that corresponds to the supplied scale name, otherwise null.static ScalegetScaleByName(String name) Get the scale that matches the user name, the scale name, or null.Get a list of all scale entries sorted by user name.
-
Method Details
-
addScale
Create a scale instance and add it to the map.- Parameters:
scaleName- The scale name, such as HO.userName- The user name. By default the same as the scale name.scaleRatio- The ratio for the scale, such as 87.1.
-
getScale
Get the scale that corresponds to the supplied scale name, otherwise null.- Parameters:
name- The scale name.- Returns:
- The selected scale or null.
-
getScales
Get a list of all scale entries sorted by user name.- Returns:
- The sorted scale list.
-
getScaleByName
Get the scale that matches the user name, the scale name, or null. The user names are searched first. If not found then the scale name is used.- Parameters:
name- The user name or scale name.- Returns:
- The selected scale or null.
-