Class ListBoxValues


  • public class ListBoxValues
    extends Object
    Class containing a list of values for a ValueListBox. This is used by the ListBoxes in the DataIOEditor to keep their drop-down lists up to date with updated with new values (CustomDataTypes / Constants) as the user adds them.
    • Field Detail

      • acceptableValuesWithCustomValues

        protected List<String> acceptableValuesWithCustomValues
      • acceptableValuesWithoutCustomValues

        protected List<String> acceptableValuesWithoutCustomValues
      • customValues

        protected List<String> customValues
      • mapDisplayValuesToValues

        protected Map<String,​String> mapDisplayValuesToValues
      • customPrompt

        protected String customPrompt
      • editPrefix

        protected String editPrefix
      • maxDisplayLength

        protected int maxDisplayLength
      • DEFAULT_MAX_DISPLAY_LENGTH

        protected static final int DEFAULT_MAX_DISPLAY_LENGTH
        See Also:
        Constant Field Values
    • Method Detail

      • getEditPrefix

        public String getEditPrefix()
      • addValues

        public void addValues​(List<String> acceptableValues)
      • getAcceptableValuesWithCustomValues

        public List<String> getAcceptableValuesWithCustomValues()
      • getAcceptableValuesWithoutCustomValues

        public List<String> getAcceptableValuesWithoutCustomValues()
      • isCustomValue

        public boolean isCustomValue​(String value)
      • clear

        protected void clear()
      • getEditValuePrompt

        protected String getEditValuePrompt​(String editPrefix)
      • createDisplayValues

        protected List<String> createDisplayValues​(List<String> acceptableValues)
      • addDisplayValue

        protected String addDisplayValue​(String value)
        Function for handling values which are longer than MAX_DISPLAY_LENGTH such as very long string constants.

        Creates display value for a value and adds it to the mapDisplayValuesToValues map. If display value already present in mapDisplayValuesToValues, returns it.

        The first display value for values which are the same is of the form "\"abcdeabcde...\"" and subsequent display values are of the form "\"abcdeabcde...(01)\""

        Parameters:
        value - the value
        Returns:
        the displayValue for value
      • getValueForDisplayValue

        public String getValueForDisplayValue​(String key)
        Returns real unquoted value for a DisplayValue
        Parameters:
        key -
        Returns:
      • getNonCustomValueForUserString

        public String getNonCustomValueForUserString​(String userValue)