Changeset 113 for bbtracker/trunk/src/org/bbtracker/mobile/Preferences.java
- Timestamp:
- 09/15/07 12:02:30 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
bbtracker/trunk/src/org/bbtracker/mobile/Preferences.java
r102 r113 33 33 import org.bbtracker.ImperialUnitConverter; 34 34 import org.bbtracker.MetricUnitConverter; 35 import org.bbtracker.NauticalUnitConverter; 35 36 import org.bbtracker.UnitConverter; 36 37 … … 63 64 public static final int UNITS_IMPERIAL = 1; 64 65 65 public static String[] UNITS = new String[] { "Metric (km/h, km, m)", "Imperial (mph, miles, feet)" }; 66 public static final int UNITS_NAUTICAL = 2; 67 68 public static String[] UNITS = new String[] { "Metric (km/h, km, m)", "Imperial (mph, miles, feet)", 69 "Nautical (nm/h, nm, feet)" }; 66 70 67 71 private static Preferences instance; … … 153 157 154 158 public void setUnits(final int units) { 155 if (units != UNITS_METRIC && units != UNITS_IMPERIAL ) {159 if (units != UNITS_METRIC && units != UNITS_IMPERIAL && units != UNITS_NAUTICAL) { 156 160 throw new IllegalArgumentException(); 157 161 } … … 168 172 case UNITS_IMPERIAL: 169 173 unitConverter = new ImperialUnitConverter(); 174 break; 175 case UNITS_NAUTICAL: 176 unitConverter = new NauticalUnitConverter(); 170 177 break; 171 178 default:
Note: See TracChangeset
for help on using the changeset viewer.