Skip to content

Commit

Permalink
CSSTUDIO-1920 Add "Not set" to messages.properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
abrahamwolk committed Aug 21, 2023
1 parent 0ebc2e0 commit 2cba771
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public class Messages
MacrosTable_ValueHint,
MoveDown,
MoveUp,
NotSet,
OpenInExternalEditor,
Password,
Password_Caption,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.csstudio.display.builder.model.properties.StringWidgetProperty;
import org.csstudio.display.builder.representation.Preferences;
import org.csstudio.display.builder.representation.javafx.JFXPreferences;
import org.csstudio.display.builder.representation.javafx.Messages;
import org.epics.util.stats.Range;
import org.epics.vtype.Alarm;
import org.epics.vtype.AlarmSeverity;
Expand Down Expand Up @@ -111,10 +112,10 @@ public static void attach(final Node node, final WidgetProperty<String> tooltip_
double low = warningRange.getMinimum();
double high = warningRange.getMaximum();

String pv_alarm_limits = "HiHi: " + (Double.isNaN(hihi) ? "Not set" : hihi) + System.lineSeparator() +
"High: " + (Double.isNaN(high) ? "Not set" : high) + System.lineSeparator() +
"Low: " + (Double.isNaN(low) ? "Not set" : low) + System.lineSeparator() +
"LoLo: " + (Double.isNaN(lolo) ? "Not set" : lolo);
String pv_alarm_limits = "HiHi: " + (Double.isNaN(hihi) ? Messages.NotSet : hihi) + System.lineSeparator() +
"High: " + (Double.isNaN(high) ? Messages.NotSet : high) + System.lineSeparator() +
"Low: " + (Double.isNaN(low) ? Messages.NotSet : low) + System.lineSeparator() +
"LoLo: " + (Double.isNaN(lolo) ? Messages.NotSet : lolo);
spec = spec.replace("$(pv_value)", "$(pv_value)" + System.lineSeparator() + pv_alarm_limits);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ MacrosTable_ToolTip=Edit names or values. Add new macro in last row
MacrosTable_ValueHint=<Enter value>
MoveDown=Down
MoveUp=Up
NotSet=Not set
OpenInExternalEditor=Open in external editor
Password=Password
Password_Caption=Password:
Expand Down

0 comments on commit 2cba771

Please sign in to comment.