Class FlatComboBoxUI.FlatKeySelectionManager

  • All Implemented Interfaces:
    javax.swing.JComboBox.KeySelectionManager, javax.swing.plaf.UIResource
    Enclosing class:
    FlatComboBoxUI

    private class FlatComboBoxUI.FlatKeySelectionManager
    extends java.lang.Object
    implements javax.swing.JComboBox.KeySelectionManager, javax.swing.plaf.UIResource
    Key selection manager that delegates to the default manager. Shows the popup if Space key is pressed and "typed characters" buffer is empty. If items contain spaces (e.g. "a b") it is still possible to select them by pressing keys 'a', 'Space' and 'b'.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.swing.JComboBox.KeySelectionManager delegate  
      private long lastTime  
      private long timeFactor  
    • Constructor Summary

      Constructors 
      Constructor Description
      FlatKeySelectionManager​(javax.swing.JComboBox.KeySelectionManager delegate)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int selectionForKey​(char aKey, javax.swing.ComboBoxModel aModel)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • delegate

        private final javax.swing.JComboBox.KeySelectionManager delegate
      • timeFactor

        private final long timeFactor
      • lastTime

        private long lastTime
    • Constructor Detail

      • FlatKeySelectionManager

        FlatKeySelectionManager​(javax.swing.JComboBox.KeySelectionManager delegate)
    • Method Detail

      • selectionForKey

        public int selectionForKey​(char aKey,
                                   javax.swing.ComboBoxModel aModel)
        Specified by:
        selectionForKey in interface javax.swing.JComboBox.KeySelectionManager