mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-21 19:50:01 +00:00
moved ColorMapTest out of the never executed gwt.ui.test project into com.sap.sailing.domain.test
Change-Id: I0a0962fa8b32182eb29f9107325d6f1e44c338e0
This commit is contained in:
1 parent
10ec0e3c35
commit
232fbe1d9a
2 files changed
+5
-7
No files matched your search
+4
-6
@@ -55,10 +55,6 @@ public class ColorMapImpl<T> implements ColorMap<T> {
|
|||||||
/** a list of already used colors which should be excluded from the automatic color assignment */
|
/** a list of already used colors which should be excluded from the automatic color assignment */
|
||||||
private List<HSVColor> blockedColors;
|
private List<HSVColor> blockedColors;
|
||||||
|
|
||||||
// public ColorMapImpl() {
|
|
||||||
// this(new ArrayList<Color>());
|
|
||||||
// }
|
|
||||||
|
|
||||||
public ColorMapImpl(List<Color> initialBlockedColors) {
|
public ColorMapImpl(List<Color> initialBlockedColors) {
|
||||||
baseColors = new HSVColor[11];
|
baseColors = new HSVColor[11];
|
||||||
idColor = new HashMap<>();
|
idColor = new HashMap<>();
|
||||||
@@ -122,9 +118,11 @@ public class ColorMapImpl<T> implements ColorMap<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean addBlockedColor(Color color) {
|
public boolean addBlockedColor(Color color) {
|
||||||
boolean result = false;
|
final boolean result;
|
||||||
if(color != null && !blockedColors.contains(color)) {
|
if (color != null && !blockedColors.contains(color)) {
|
||||||
result = blockedColors.add(convertFromColorToHSV(color));
|
result = blockedColors.add(convertFromColorToHSV(color));
|
||||||
|
} else {
|
||||||
|
result = false;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.sap.sailing.gwt.ui.test;
|
package com.sap.sailing.domain.common.test;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
Reference in new issue
Block a user