1 /** 2 * Copyright (C) 2010-14 pvmanager developers. See COPYRIGHT.TXT 3 * All rights reserved. Use is subject to license terms. See LICENSE.TXT 4 */ 5 package org.epics.vtype; 6 7 import java.text.NumberFormat; 8 9 /** 10 * Limit and unit information needed for display and control. 11 * <p> 12 * The numeric limits are given in double precision no matter which numeric 13 * type. The unit is a simple String, which can be empty if no unit information 14 * is provided. The number format can be used to convert the value to a String. 15 * 16 * @author carcassi 17 */ 18 public interface Display { 19 20 /** 21 * Lowest possible value to be displayed. Never null. 22 * 23 * @return lower display limit 24 */ 25 Double getLowerDisplayLimit(); 26 27 /** 28 * Lowest possible value (included). Never null. 29 * 30 * @return lower limit 31 */ 32 Double getLowerCtrlLimit(); 33 34 /** 35 * Lowest value before the alarm region. Never null. 36 * 37 * @return lower alarm limit 38 */ 39 Double getLowerAlarmLimit(); 40 41 /** 42 * Lowest value before the warning region. Never null. 43 * 44 * @return lower warning limit 45 */ 46 Double getLowerWarningLimit(); 47 48 /** 49 * String representation of the units using for all values. 50 * Never null. If not available, returns the empty String. 51 * 52 * @return units 53 */ 54 String getUnits(); 55 56 /** 57 * Returns a NumberFormat that creates a String with just the value (no units). 58 * Format is locale independent and should be used for all values (values and 59 * lower/upper limits). Never null. 60 * 61 * @return the default format for all values 62 */ 63 NumberFormat getFormat(); 64 65 /** 66 * Highest value before the warning region. Never null. 67 * 68 * @return upper warning limit 69 */ 70 Double getUpperWarningLimit(); 71 72 /** 73 * Highest value before the alarm region. Never null. 74 * 75 * @return upper alarm limit 76 */ 77 Double getUpperAlarmLimit(); 78 79 /** 80 * Highest possible value (included). Never null. 81 * @return upper limit 82 */ 83 Double getUpperCtrlLimit(); 84 85 /** 86 * Highest possible value to be displayed. Never null. 87 * 88 * @return upper display limit 89 */ 90 Double getUpperDisplayLimit(); 91 }