Skip to content

Commit

Permalink
Added extra color coding for when only one of the compared designs go…
Browse files Browse the repository at this point in the history
…es over 85% heat.
  • Loading branch information
MauveCloud committed Apr 11, 2019
1 parent 0e29d80 commit 73ad434
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions src/Ic2ExpReactorPlanner/ReactorPlannerFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -2430,10 +2430,19 @@ private void updateComparison() {
simpleDecimal(rightData.predepleteMinTemp)));
}
if (alwaysDiff || Math.abs(leftData.predepleteMaxTemp - rightData.predepleteMaxTemp) > 10) {
String leftMaxTempDecimal = simpleDecimal(leftData.predepleteMaxTemp);
String rightMaxTempDecimal = simpleDecimal(rightData.predepleteMaxTemp);
if ((leftData.predepleteMaxTemp >= tempReactor.getMaxHeat() * 0.85) != (rightData.predepleteMaxTemp >= prevReactor.getMaxHeat() * 0.85)) {
if (leftData.predepleteMaxTemp >= tempReactor.getMaxHeat() * 0.85) {
leftMaxTempDecimal = "<font color=\"red\">" + leftMaxTempDecimal + "</font>";
rightMaxTempDecimal = "<font color=\"green\">" + rightMaxTempDecimal + "</font>";
} else {
leftMaxTempDecimal = "<font color=\"green\">" + leftMaxTempDecimal + "</font>";
rightMaxTempDecimal = "<font color=\"red\">" + rightMaxTempDecimal + "</font>";
}
}
text.append(formatI18n("Comparison.PredepleteMaxTemp",
colorDecimal(leftData.predepleteMaxTemp - rightData.predepleteMaxTemp, moxStyleReactor ? 10 : -10),
simpleDecimal(leftData.predepleteMaxTemp),
simpleDecimal(rightData.predepleteMaxTemp)));
colorDecimal(leftData.predepleteMaxTemp - rightData.predepleteMaxTemp, moxStyleReactor ? 10 : -10), leftMaxTempDecimal, rightMaxTempDecimal));
}
}
text.append("<br>");
Expand Down Expand Up @@ -2512,10 +2521,19 @@ private void updateComparison() {
simpleDecimal(rightData.minTemp)));
}
if (alwaysDiff || Math.abs(leftData.maxTemp - rightData.maxTemp) > 10) {
String leftMaxTempDecimal = simpleDecimal(leftData.maxTemp);
String rightMaxTempDecimal = simpleDecimal(rightData.maxTemp);
if ((leftData.maxTemp >= tempReactor.getMaxHeat() * 0.85) != (rightData.maxTemp >= prevReactor.getMaxHeat() * 0.85)) {
if (leftData.maxTemp >= tempReactor.getMaxHeat() * 0.85) {
leftMaxTempDecimal = "<font color=\"red\">" + leftMaxTempDecimal + "</font>";
rightMaxTempDecimal = "<font color=\"green\">" + rightMaxTempDecimal + "</font>";
} else {
leftMaxTempDecimal = "<font color=\"green\">" + leftMaxTempDecimal + "</font>";
rightMaxTempDecimal = "<font color=\"red\">" + rightMaxTempDecimal + "</font>";
}
}
text.append(formatI18n("Comparison.PostsimMaxTemp",
colorDecimal(leftData.maxTemp - rightData.maxTemp, moxStyleReactor ? 10 : -10),
simpleDecimal(leftData.maxTemp),
simpleDecimal(rightData.maxTemp)));
colorDecimal(leftData.maxTemp - rightData.maxTemp, moxStyleReactor ? 10 : -10), leftMaxTempDecimal, rightMaxTempDecimal));
}
text.append("<br>");

Expand Down

0 comments on commit 73ad434

Please sign in to comment.