From 3c2cb48eeda321982ab07cf7f56138ed529b8ce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Ple=C3=9F?= Date: Wed, 23 Apr 2014 22:35:04 +0200 Subject: [PATCH] changed offline lines to "no data" --- .../src/main/java/de/psychose/ActorDisplay.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/healthdisplay/src/main/java/de/psychose/ActorDisplay.java b/healthdisplay/src/main/java/de/psychose/ActorDisplay.java index abef1e0..6bed33b 100644 --- a/healthdisplay/src/main/java/de/psychose/ActorDisplay.java +++ b/healthdisplay/src/main/java/de/psychose/ActorDisplay.java @@ -11,6 +11,7 @@ import java.awt.event.ActionEvent; public class ActorDisplay { private final static Color onColor = Color.WHITE; private final static Color offColor = Color.RED; + private final static String offText = "no data"; private JPanel actorPanel; private JLabel lblCaption; @@ -78,43 +79,49 @@ public class ActorDisplay { if (++counterTemperature > timeout) { lblTemperature.setForeground(offColor); + lblTemperature.setText(offText); } else { lblTemperature.setForeground(onColor); } if (++counterPulse > timeout) { lblPulse.setForeground(offColor); + lblPulse.setText(offText); } else { lblPulse.setForeground(onColor); } if (++counterOxy > timeout) { lblOxy.setForeground(offColor); + lblOxy.setText(offText); } else { lblOxy.setForeground(onColor); } if (++counterEkg > timeout) { lblEkg.setForeground(offColor); + lblEkg.setText(offText); } else { lblEkg.setForeground(onColor); } if (++counterEmg > timeout) { lblEmg.setForeground(offColor); + lblEkg.setText(offText); } else { lblEmg.setForeground(onColor); } if (++counterHeartbeat > timeout) { lblHeartbeat.setForeground(offColor); - lblHeartbeat.setText("no data"); + lblHeartbeat.setText(offText); } else { lblHeartbeat.setForeground(onColor); } if (++counterBreath > timeout) { lblBreath.setForeground(offColor); + lblBreath.setText(offText); } else { lblBreath.setForeground(onColor); }