private void setListSelection ( int selectedIndex ) { if ( selectedIndex == - 1 ) { list . clearSelection ( ) ; } else { list . setSelectedIndex ( selectedIndex ) ; list . ensureIndexIsVisible ( selectedIndex ) ; } }
Sets the list selection index to the selectedIndex . This method is used to synchronize the list selection with the combo box selection .