private void setMetadata(Display display) { if (display == null) { metadata.setText(""); } else { metadata.setText(display.getUpperDisplayLimit() + " - " + display.getLowerDisplayLimit()); } }
lowerDisplayLimit = getDoubleValue(displayStructure, "limitLow", noDisplay.getLowerDisplayLimit()); upperDisplayLimit = getDoubleValue(displayStructure, "limitHigh", noDisplay.getUpperDisplayLimit()); format = noDisplay.getFormat(); else format = createNumberFormat(formatField.get()); units = noDisplay.getUnits(); else units = unitsField.get(); lowerDisplayLimit = noDisplay.getLowerDisplayLimit(); upperDisplayLimit = noDisplay.getUpperDisplayLimit(); format = noDisplay.getFormat(); units = noDisplay.getUnits(); lowerCtrlLimit = getDoubleValue(controlStructure, "limitLow", noDisplay.getLowerCtrlLimit()); upperCtrlLimit = getDoubleValue(controlStructure, "limitHigh", noDisplay.getUpperCtrlLimit()); lowerCtrlLimit = noDisplay.getLowerCtrlLimit(); upperCtrlLimit = noDisplay.getUpperCtrlLimit(); lowerAlarmLimit = getDoubleValue(valueAlarmStructure, "lowAlarmLimit", noDisplay.getLowerAlarmLimit()); lowerWarningLimit = getDoubleValue(valueAlarmStructure, "lowWarningLimit", noDisplay.getLowerWarningLimit()); upperWarningLimit = getDoubleValue(valueAlarmStructure, "highWarningLimit", noDisplay.getUpperWarningLimit()); upperAlarmLimit = getDoubleValue(valueAlarmStructure, "highAlarmLimit", noDisplay.getUpperAlarmLimit()); lowerAlarmLimit = noDisplay.getLowerAlarmLimit(); lowerWarningLimit = noDisplay.getLowerWarningLimit();
public JsonVTypeBuilder addDisplay(Display display) { return add("display", new JsonVTypeBuilder() .add("lowAlarm", display.getLowerAlarmLimit()) .add("highAlarm", display.getUpperAlarmLimit()) .add("lowDisplay", display.getLowerDisplayLimit()) .add("highDisplay", display.getUpperDisplayLimit()) .add("lowWarning", display.getLowerWarningLimit()) .add("highWarning", display.getUpperDisplayLimit()) .add("units", display.getUnits())); }
public static Range toRange(Display display) { if (display == null) { return null; } Double min = display.getLowerDisplayLimit(); Double max = display.getUpperDisplayLimit(); if (min != null && max != null) { return Ranges.range(min, max); } else { return null; } }