Class HistoryComboBoxModel

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<java.lang.String>, javax.swing.ComboBoxModel<java.lang.String>, javax.swing.ListModel<java.lang.String>, javax.swing.MutableComboBoxModel<java.lang.String>

    public class HistoryComboBoxModel
    extends AutoCompComboBoxModel<java.lang.String>
    A data model for the HistoryComboBox.

    This model is an AutoCompComboBoxModel specialized in Strings. It offers convenience functions to serialize to and from the JOSM preferences.

    Since:
    18173
    See Also:
    Serialized Form
    • Method Detail

      • addAllStrings

        public void addAllStrings​(java.util.List<java.lang.String> strings)
        Adds strings to the model.

        Strings are added only until the max. history size is reached.

        Parameters:
        strings - the strings to add
      • asStringList

        public java.util.List<java.lang.String> asStringList()
        Gets all items in the history as a list of strings.
        Returns:
        the items in the history