Omaha #5356 Fix hydro FFG color values.
Former-commit-id: 3f214b2efd25d182a8eb12e7d23ef8bf31f7ac7a
This commit is contained in:
parent
3b0ab35469
commit
15965413c8
1 changed files with 11 additions and 7 deletions
|
@ -45,6 +45,9 @@ import com.raytheon.viz.hydrocommon.whfslib.IHFSDbGenerated;
|
||||||
* Nov 10, 2008 randerso Initial creation
|
* Nov 10, 2008 randerso Initial creation
|
||||||
* May 27, 2014 3133 njensen Organized imports, fixed == to equals
|
* May 27, 2014 3133 njensen Organized imports, fixed == to equals
|
||||||
* Jul 21, 2015 4500 rjpeter Use Number in blind cast.
|
* Jul 21, 2015 4500 rjpeter Use Number in blind cast.
|
||||||
|
* Feb 12, 2016 5356 bsteffen Fall back to using the provided
|
||||||
|
* colorsets when no values are found.
|
||||||
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author randerso
|
* @author randerso
|
||||||
|
@ -135,7 +138,7 @@ public class GetColorValues {
|
||||||
if ("hydroview".equals(application_name)
|
if ("hydroview".equals(application_name)
|
||||||
&& "HEIGHT".equals(coloruse_name)) {
|
&& "HEIGHT".equals(coloruse_name)) {
|
||||||
cvHead = getDefaultColorSet(application_name, coloruse_name,
|
cvHead = getDefaultColorSet(application_name, coloruse_name,
|
||||||
threshold_unit);
|
threshold_unit, null);
|
||||||
} else {
|
} else {
|
||||||
// Try to find a user defined color set.
|
// Try to find a user defined color set.
|
||||||
cvHead = getUserColorSet(user_id, application_name, coloruse_name,
|
cvHead = getUserColorSet(user_id, application_name, coloruse_name,
|
||||||
|
@ -152,8 +155,11 @@ public class GetColorValues {
|
||||||
|
|
||||||
// Try to find a default color set.
|
// Try to find a default color set.
|
||||||
cvHead = getDefaultColorSet(application_name, coloruse_name,
|
cvHead = getDefaultColorSet(application_name, coloruse_name,
|
||||||
threshold_unit);// , pColorSetGroup);
|
threshold_unit, null);
|
||||||
|
if ((cvHead == null) || (cvHead.size() == 0)) {
|
||||||
|
cvHead = getDefaultColorSet(application_name,
|
||||||
|
coloruse_name, threshold_unit, pColorSetGroup);
|
||||||
|
}
|
||||||
if ((cvHead == null) || (cvHead.size() == 0)) {
|
if ((cvHead == null) || (cvHead.size() == 0)) {
|
||||||
statusHandler.handle(Priority.PROBLEM, "ERROR in " + method
|
statusHandler.handle(Priority.PROBLEM, "ERROR in " + method
|
||||||
+ " Colors/levels not defined for application "
|
+ " Colors/levels not defined for application "
|
||||||
|
@ -224,13 +230,11 @@ public class GetColorValues {
|
||||||
*/
|
*/
|
||||||
private static List<Colorvalue> getDefaultColorSet(
|
private static List<Colorvalue> getDefaultColorSet(
|
||||||
final String application_name, final String coloruse_name,
|
final String application_name, final String coloruse_name,
|
||||||
String threshold_unit) {// , final List<NamedColorUseSet>
|
String threshold_unit, List<NamedColorUseSet> pColorSetGroup) {
|
||||||
// pColorSetGroup) {
|
|
||||||
|
|
||||||
List<NamedColorUseSet> pColorSetGroup = null;
|
|
||||||
if (application_name.equals("hmapmpe")) {
|
if (application_name.equals("hmapmpe")) {
|
||||||
pColorSetGroup = MPEColors.build_mpe_colors();
|
pColorSetGroup = MPEColors.build_mpe_colors();
|
||||||
} else {
|
} else if (pColorSetGroup == null) {
|
||||||
pColorSetGroup = HydroDisplayManager.getInstance()
|
pColorSetGroup = HydroDisplayManager.getInstance()
|
||||||
.getDefaultNamedColorUseSetList();
|
.getDefaultNamedColorUseSetList();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue