diff --git a/MekHQ/src/mekhq/gui/ForceRenderer.java b/MekHQ/src/mekhq/gui/ForceRenderer.java index a1ddb73f6b..236d718440 100644 --- a/MekHQ/src/mekhq/gui/ForceRenderer.java +++ b/MekHQ/src/mekhq/gui/ForceRenderer.java @@ -33,6 +33,7 @@ import mekhq.campaign.force.Force; import mekhq.campaign.personnel.Person; import mekhq.campaign.unit.Unit; +import mekhq.utilities.ReportingUtilities; public class ForceRenderer extends DefaultTreeCellRenderer { private static final MMLogger logger = MMLogger.create(ForceRenderer.class); @@ -51,7 +52,8 @@ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean setOpaque(false); if (value instanceof Unit) { - String name = "No Crew"; + String name = ReportingUtilities.messageSurroundedBySpanWithColor( + MekHQ.getMHQOptions().getFontColorNegativeHexColor(), "No Crew"); if (((Unit) value).getEntity() instanceof GunEmplacement) { name = "AutoTurret"; } @@ -64,14 +66,14 @@ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean name += " (" + unit.getEntity().getCrew().getGunnery() + '/' + unit.getEntity().getCrew().getPiloting() + ')'; if (person.needsFixing() || (unit.getEntity().getCrew().getHits() > 0)) { - name = "" + name - + ""; + name = ReportingUtilities.messageSurroundedBySpanWithColor( + MekHQ.getMHQOptions().getFontColorNegativeHexColor(), name); } } - String uname = "" + unit.getName() + ""; + String unitName = "" + unit.getName() + ""; if (unit.isDamaged()) { - uname = "" + uname - + ""; + unitName = ReportingUtilities.messageSurroundedBySpanWithColor( + MekHQ.getMHQOptions().getFontColorNegativeHexColor(), unitName); } Entity entity = unit.getEntity(); @@ -127,7 +129,7 @@ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean transport.append("
Transported by: ") .append(unit.getTransportShipAssignment().getTransportShip().getName()); } - String text = name + ", " + uname + c3network + transport; + String text = name + ", " + unitName + c3network + transport; Force force = unit.getCampaign().getForce(unit.getForceId()); if((null != person) && (null != force) && (person.getId() == force.getForceCommanderID())) {