Changeset 11436 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r11424 r11436 32 32 import java.util.MissingResourceException; 33 33 import java.util.Objects; 34 import java.util.Optional; 34 35 import java.util.ResourceBundle; 35 36 import java.util.Set; … … 68 69 import org.openstreetmap.josm.data.preferences.Setting; 69 70 import org.openstreetmap.josm.data.preferences.StringSetting; 71 import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry; 70 72 import org.openstreetmap.josm.gui.preferences.validator.ValidatorTagCheckerRulesPreference; 71 73 import org.openstreetmap.josm.gui.preferences.validator.ValidatorTagCheckerRulesPreference.RulePrefHelper; … … 1584 1586 if (l.stream().noneMatch(x -> x.values().contains(url))) { 1585 1587 RulePrefHelper helper = ValidatorTagCheckerRulesPreference.RulePrefHelper.INSTANCE; 1586 l.add(helper.serialize(helper.getDefault().stream().filter(x -> url.equals(x.url)).findFirst().get())); 1588 Optional<ExtendedSourceEntry> val = helper.getDefault().stream().filter(x -> url.equals(x.url)).findFirst(); 1589 if (val.isPresent()) { 1590 l.add(helper.serialize(val.get())); 1591 } 1587 1592 putListOfStructs(key, l); 1588 1593 } -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
r11431 r11436 144 144 145 145 // copied value for line drawing 146 private List<Integer> heatMapPolyX = new ArrayList<>();147 private List<Integer> heatMapPolyY = new ArrayList<>();146 private final List<Integer> heatMapPolyX = new ArrayList<>(); 147 private final List<Integer> heatMapPolyY = new ArrayList<>(); 148 148 149 149 // setup color maps used by heat map … … 369 369 "(" + 370 370 "segments= " + visibleSegments.size() + 371 ", per 10000 = " + Utils.getDurationString(10 000 * timeDiff / visibleSegments.size()) +371 ", per 10000 = " + Utils.getDurationString(10_000 * timeDiff / visibleSegments.size()) + 372 372 ")" 373 373 ); … … 449 449 dateScale.setRange(minval, maxval); 450 450 } 451 452 451 453 452 // Now the colors for all the points will be assigned … … 719 718 } 720 719 721 /**720 /** 722 721 * Draw GPX lines by using alpha blending 723 722 * @param g the common draw object to use … … 853 852 // transform into lookup table 854 853 return colorTable; 855 }856 857 /**858 * Creates a colormap by using a static color map with 1..n colors (RGB 0.0 ..1.0)859 * @param data array of multiple RGB color [n][3]860 * @return a dynamic list of color objects861 */862 protected static Color[] createColorFromRawArray(double[][] data) {863 864 // create the array865 Color[] color = new Color[ data.length ];866 867 for (int k = 0; k < data.length; k++) {868 // cast an map to linear array869 color[k] = new Color((float) data[k][0], (float) data[k][1], (float) data[k][2]);870 }871 872 // forward873 return createColorLut(color);874 854 } 875 855 -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java
r11433 r11436 65 65 */ 66 66 @Parameters 67 public static Collection<Object[]> testRuns() {67 public static Collection<Object[]> runs() { 68 68 return Stream.of( 69 69 /** Tests for StyledMapRenderer#drawNodeSymbol */ … … 89 89 */ 90 90 @Test 91 public void render() throws Exception {91 public void testRender() throws Exception { 92 92 // load the data 93 93 DataSet dataSet = testConfig.getOsmDataSet();
Note:
See TracChangeset
for help on using the changeset viewer.