Class FlatThemeFileEditor.SortedComboBoxModel<E>

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.ComboBoxModel<E>, javax.swing.ListModel<E>, javax.swing.MutableComboBoxModel<E>
    Enclosing class:
    FlatThemeFileEditor

    private static class FlatThemeFileEditor.SortedComboBoxModel<E>
    extends javax.swing.DefaultComboBoxModel<E>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Comparator<E> comparator  
      • Fields inherited from class javax.swing.AbstractListModel

        listenerList
    • Constructor Summary

      Constructors 
      Constructor Description
      SortedComboBoxModel​(E[] items, java.util.Comparator<E> c)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addElement​(E obj)  
      (package private) static <E> int binarySearch​(javax.swing.ListModel<E> model, E key, java.util.Comparator<E> c)  
      (package private) static <E> E[] sort​(E[] items, java.util.Comparator<E> c)  
      • Methods inherited from class javax.swing.DefaultComboBoxModel

        addAll, addAll, getElementAt, getIndexOf, getSelectedItem, getSize, insertElementAt, removeAllElements, removeElement, removeElementAt, setSelectedItem
      • Methods inherited from class javax.swing.AbstractListModel

        addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.swing.ListModel

        addListDataListener, removeListDataListener
    • Field Detail

      • comparator

        private final java.util.Comparator<E> comparator
    • Constructor Detail

      • SortedComboBoxModel

        SortedComboBoxModel​(E[] items,
                            java.util.Comparator<E> c)
    • Method Detail

      • addElement

        public void addElement​(E obj)
        Specified by:
        addElement in interface javax.swing.MutableComboBoxModel<E>
        Overrides:
        addElement in class javax.swing.DefaultComboBoxModel<E>
      • sort

        static <E> E[] sort​(E[] items,
                            java.util.Comparator<E> c)
      • binarySearch

        static <E> int binarySearch​(javax.swing.ListModel<E> model,
                                    E key,
                                    java.util.Comparator<E> c)