ASM #14453 - Make color for same weather type consistent in different grids

Change-Id: Ib8f58c39e903d208718ed505a9fe3ac6b6f9be7d

Former-commit-id: 3dbd14e31b4d25bc9806f2fc71e3144550f5de91
This commit is contained in:
Yun.Teng 2016-01-27 16:02:22 +00:00
parent 4329bda2f6
commit 39f2bc919d

View file

@ -42,7 +42,9 @@ import com.raytheon.viz.gfe.core.wxvalue.WxValue;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 18, 2010 randerso Initial creation
*
* Jan 27, 2016 14453 yteng Make color for same weather type
* consistent in different grids
*
* </pre>
*
* @author randerso
@ -63,6 +65,8 @@ public class WeatherColorTable extends ColorTable {
private Map<String, String> typeIntenNamesToColors;
private Map<String, String> genericNamesToColors = new HashMap<String, String>();
public WeatherColorTable() {
super();
@ -146,8 +150,13 @@ public class WeatherColorTable extends ColorTable {
color = typeNamesToColors.get(comp.types());
}
if (color == null) {
color = genericNamesToColors.get(comp.types());
}
if (color == null) {
color = getUniqueColor();
genericNamesToColors.put(comp.types(), color);
}
imageAttr.add(new ImageAttr(color, fillName));