Package jmri
Class ScaleManager
- java.lang.Object
- 
- jmri.ScaleManager
 
- 
 public class ScaleManager extends java.lang.Object Create a list of layout scale objects and provide retrieval methods.See Scalefor details of each scale object.- Since:
- 4.13.6
 
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddScale(java.lang.String scaleName, java.lang.String userName, double scaleRatio)Create a scale instance and add it to the map.static ScalegetScale(java.lang.String name)Get the scale that corresponds to the supplied scale name, otherwise null.static ScalegetScaleByName(java.lang.String name)Get the scale that matches the user name, the scale name, or null.static java.util.ArrayList<Scale>getScales()Get a list of all scale entries sorted by user name.
 
- 
- 
- 
Method Detail- 
addScalepublic static void addScale(java.lang.String scaleName, java.lang.String userName, double scaleRatio) 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.
 
 - 
getScalepublic static Scale getScale(@Nonnull java.lang.String name) Get the scale that corresponds to the supplied scale name, otherwise null.- Parameters:
- name- The scale name.
- Returns:
- The selected scale or null.
 
 - 
getScalespublic static java.util.ArrayList<Scale> getScales() Get a list of all scale entries sorted by user name.- Returns:
- The sorted scale list.
 
 - 
getScaleByNamepublic static Scale getScaleByName(@Nonnull java.lang.String name) 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.
 
 
- 
 
-