Changeset 9395 in josm for trunk/src/org
- Timestamp:
- 2016-01-10T18:40:36+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
r9338 r9395 12 12 import java.awt.Stroke; 13 13 import java.util.ArrayList; 14 import java.util.Arrays; 14 15 import java.util.Collection; 15 16 import java.util.Collections; … … 106 107 */ 107 108 public enum ColorMode { 108 NONE, VELOCITY, HDOP, DIRECTION, TIME 109 NONE, VELOCITY, HDOP, DIRECTION, TIME; 110 111 static ColorMode fromIndex(final int index) { 112 return values()[index]; 113 } 114 115 int toIndex() { 116 return Arrays.asList(values()).indexOf(this); 117 } 109 118 } 110 119 … … 141 150 try { 142 151 int i = Main.pref.getInteger("draw.rawgps.colors", specName(layerName), 0); 143 return ColorMode. values()[i];152 return ColorMode.fromIndex(i); 144 153 } catch (Exception e) { 145 154 Main.warn(e);
Note:
See TracChangeset
for help on using the changeset viewer.