From a73d887dbb9597e6cc0b18d57efa535ec9273cbe Mon Sep 17 00:00:00 2001 From: Alberto Date: Thu, 11 Jan 2024 12:01:58 +0100 Subject: [PATCH] MapCanvas --- .../java/io/github/albertus82/eqbulletin/gui/MapCanvas.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/albertus82/eqbulletin/gui/MapCanvas.java b/src/main/java/io/github/albertus82/eqbulletin/gui/MapCanvas.java index 8f6e4382..842ae8ad 100644 --- a/src/main/java/io/github/albertus82/eqbulletin/gui/MapCanvas.java +++ b/src/main/java/io/github/albertus82/eqbulletin/gui/MapCanvas.java @@ -11,7 +11,7 @@ import java.util.LinkedList; import java.util.Map; import java.util.Map.Entry; -import java.util.TreeSet; +import java.util.stream.Collectors; import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.util.Util; @@ -61,7 +61,7 @@ public static class Defaults { private static final int AUTO_SCALE = 0; private static final int MAX_HQ_RESIZE_RATIO = 250; - private static final LinkedList zoomLevels = new LinkedList<>(new TreeSet<>(Arrays.asList(AUTO_SCALE, 10, 12, 15, 20, 25, 30, 40, 50, 60, 80, 100, 120, 150, 200, 250, 300, 400, 500))); + private static final LinkedList zoomLevels = Arrays.stream(new Integer[] { AUTO_SCALE, 10, 12, 15, 20, 25, 30, 40, 50, 60, 80, 100, 120, 150, 200, 250, 300, 400, 500 }).sorted().collect(Collectors.toCollection(LinkedList::new)); private final IPreferencesConfiguration configuration = EarthquakeBulletinConfig.getPreferencesConfiguration();